mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 00:41:17 +00:00
740c755805
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43210
71 lines
2.3 KiB
Diff
71 lines
2.3 KiB
Diff
From: Ben Greear <greearb@candelatech.com>
|
|
Date: Tue, 4 Nov 2014 15:22:50 -0800
|
|
Subject: [PATCH] ath9k: fix regression in bssidmask calculation
|
|
|
|
The commit that went into 3.17:
|
|
|
|
ath9k: Summarize hw state per channel context
|
|
|
|
Group and set hw state (opmode, primary_sta, beacon conf) per
|
|
channel context instead of whole list of vifs. This would allow
|
|
each channel context to run in different mode (STA/AP).
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
|
|
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
broke multi-vif configuration due to not properly calculating
|
|
the bssid mask.
|
|
|
|
The test case that caught this was:
|
|
|
|
create wlan0 and sta0-4 (6 total), not sure how much that matters.
|
|
associate all 6 (works fine)
|
|
disconnect 5 of them, leaving sta0 up
|
|
Start trying to bring up the other 5 one at a time. It will
|
|
fail, with iw events looking like this (in these logs, several
|
|
sta are trying to come up, but symptom is the same with just one)
|
|
|
|
The patch causing the regression made quite a few changes, but
|
|
the part I think caused this particular problem was not
|
|
recalculating the bssid mask when adding and removing interfaces.
|
|
|
|
Re-adding those calls fixes my test case. Fix bad comment
|
|
as well.
|
|
|
|
Signed-off-by: Ben Greear <greearb@candelatech.com>
|
|
---
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/main.c
|
|
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
|
@@ -994,9 +994,8 @@ void ath9k_calculate_iter_data(struct at
|
|
struct ath_vif *avp;
|
|
|
|
/*
|
|
- * Pick the MAC address of the first interface as the new hardware
|
|
- * MAC address. The hardware will use it together with the BSSID mask
|
|
- * when matching addresses.
|
|
+ * The hardware will use primary station addr together with the
|
|
+ * BSSID mask when matching addresses.
|
|
*/
|
|
memset(iter_data, 0, sizeof(*iter_data));
|
|
memset(&iter_data->mask, 0xff, ETH_ALEN);
|
|
@@ -1225,6 +1224,8 @@ static int ath9k_add_interface(struct ie
|
|
list_add_tail(&avp->list, &avp->chanctx->vifs);
|
|
}
|
|
|
|
+ ath9k_calculate_summary_state(sc, avp->chanctx);
|
|
+
|
|
ath9k_assign_hw_queues(hw, vif);
|
|
|
|
an->sc = sc;
|
|
@@ -1294,6 +1295,8 @@ static void ath9k_remove_interface(struc
|
|
|
|
ath_tx_node_cleanup(sc, &avp->mcast_node);
|
|
|
|
+ ath9k_calculate_summary_state(sc, avp->chanctx);
|
|
+
|
|
mutex_unlock(&sc->mutex);
|
|
}
|
|
|