summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>2018-10-20 12:13:28 +0200
committerFelix Fietkau <nbd@nbd.name>2018-11-30 12:21:41 +0100
commitc2756a1c41e4d6433e9e994d97bae88a0b6033cf (patch)
tree48cedcebdfef7e27ae5344d4689d072310cd6ddf /drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
parent82b5c239417a4abe16c46f5bb25383f6f2363921 (diff)
mt76: move mt76x02_sw_scan and mt76x02_sw_scan_complete in mt76x02-lib module
Move mt76x02_sw_scan and mt76x02_sw_scan_complete utility routines in mt76x02_util.c in order to be reused by mt76x0 and mt76x2u drivers and remove duplicated code 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.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
index 1b3b9594c2a2..36042331e4b2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
@@ -176,25 +176,6 @@ mt76x2_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps)
}
static void
-mt76x2_sw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- const u8 *mac)
-{
- struct mt76x02_dev *dev = hw->priv;
-
- tasklet_disable(&dev->pre_tbtt_tasklet);
- set_bit(MT76_SCANNING, &dev->mt76.state);
-}
-
-static void
-mt76x2_sw_scan_complete(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
-{
- struct mt76x02_dev *dev = hw->priv;
-
- clear_bit(MT76_SCANNING, &dev->mt76.state);
- tasklet_enable(&dev->pre_tbtt_tasklet);
-}
-
-static void
mt76x2_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u32 queues, bool drop)
{
@@ -292,8 +273,8 @@ const struct ieee80211_ops mt76x2_ops = {
.sta_remove = mt76x02_sta_remove,
.set_key = mt76x02_set_key,
.conf_tx = mt76x02_conf_tx,
- .sw_scan_start = mt76x2_sw_scan,
- .sw_scan_complete = mt76x2_sw_scan_complete,
+ .sw_scan_start = mt76x02_sw_scan,
+ .sw_scan_complete = mt76x02_sw_scan_complete,
.flush = mt76x2_flush,
.ampdu_action = mt76x02_ampdu_action,
.get_txpower = mt76x2_get_txpower,