diff options
author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2018-10-20 12:40:54 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-11-30 12:21:41 +0100 |
commit | 317ed42b701b088013fb8c909c10ca7f44bdf2b3 (patch) | |
tree | 8717459f34b43bd9393ec3ceeab726819479d21a /drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c | |
parent | mt76x0: update init vals for MT_TX_PROT registers (diff) | |
download | wireguard-linux-317ed42b701b088013fb8c909c10ca7f44bdf2b3.tar.xz wireguard-linux-317ed42b701b088013fb8c909c10ca7f44bdf2b3.zip |
mt76: move tx protection routines in mt76x02-lib module
Move mt76x02_set_rts_threshold and mt76x02_mac_set_tx_protection
routines in mt76x02-lib module and remove duplicated code in mt76x0
and mt76x2 drivers. Remove pci_mac.c and mt76x0/mac.c since now are
empty files
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/mt76x2/pci_main.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c index f984bb0f9aa1..f1bd36c46036 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c @@ -210,21 +210,6 @@ static int mt76x2_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, return 0; } -static int -mt76x2_set_rts_threshold(struct ieee80211_hw *hw, u32 val) -{ - struct mt76x02_dev *dev = hw->priv; - - if (val != ~0 && val > 0xffff) - return -EINVAL; - - mutex_lock(&dev->mutex); - mt76x2_mac_set_tx_protection(dev, val); - mutex_unlock(&dev->mutex); - - return 0; -} - const struct ieee80211_ops mt76x2_ops = { .tx = mt76x02_tx, .start = mt76x2_start, @@ -251,6 +236,6 @@ const struct ieee80211_ops mt76x2_ops = { .set_tim = mt76x2_set_tim, .set_antenna = mt76x2_set_antenna, .get_antenna = mt76x2_get_antenna, - .set_rts_threshold = mt76x2_set_rts_threshold, + .set_rts_threshold = mt76x02_set_rts_threshold, }; |