diff options
author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2018-10-01 18:58:20 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-10-05 20:05:44 +0200 |
commit | c4ed5088e44e275d1968a38c82d52663b44928e1 (patch) | |
tree | 6a98f9a41d28d2c4ec05675e358f120d863f8c5a /drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | |
parent | 427f9ebec682f8fd44202f5582d745ead09d95ce (diff) | |
download | linux-c4ed5088e44e275d1968a38c82d52663b44928e1.tar.bz2 |
mt76: usb: use mt76x02u_tx_prepare_skb to fill txwi
Use mt76x02u_tx_prepare_skb routine to fill txwi in mt76x2u and
mt76x0u driver and remove duplicated code. Moreover add static
qualifier to mt76x02_mac_tx_rate_val and mt76x02_mac_fill_txwi
routines
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x0/usb.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c index 57862cacf22a..4cc11e29d81d 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c @@ -159,21 +159,6 @@ static const struct ieee80211_ops mt76x0u_ops = { .wake_tx_queue = mt76_wake_tx_queue, }; -static int mt76x0u_tx_prepare_skb(struct mt76_dev *mdev, void *data, - struct sk_buff *skb, struct mt76_queue *q, - struct mt76_wcid *wcid, struct ieee80211_sta *sta, - u32 *tx_info) -{ - struct mt76x0_dev *dev = container_of(mdev, struct mt76x0_dev, mt76); - struct mt76x02_txwi *txwi; - int len = skb->len; - - mt76x02_insert_hdr_pad(skb); - txwi = mt76x0_push_txwi(dev, skb, sta, wcid, len); - - return mt76x02u_set_txinfo(skb, wcid, q2ep(q->hw_idx)); -} - static int mt76x0u_register_device(struct mt76x0_dev *dev) { struct ieee80211_hw *hw = dev->mt76.hw; @@ -230,7 +215,7 @@ static int mt76x0u_probe(struct usb_interface *usb_intf, const struct usb_device_id *id) { static const struct mt76_driver_ops drv_ops = { - .tx_prepare_skb = mt76x0u_tx_prepare_skb, + .tx_prepare_skb = mt76x02u_tx_prepare_skb, .tx_complete_skb = mt76x02_tx_complete_skb, .tx_status_data = mt76x02_tx_status_data, .rx_skb = mt76x0_queue_rx_skb, |