Commit 83322eb8 authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville

ath9k_hw: disable hardware ad-hoc flag on ar934x rev 3

On AR934x rev 3, settin the ad-hoc flag completely messes up hardware
state - beacons get stuck, almost no packets make it out, hardware is
constantly reset.

When leaving out that flag and setting up the hw like in AP mode, TSF
timers won't be automatically synced, but at least the rest works.

AR934x rev 2 and older are not affected by this bug
Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 09c74f7b
...@@ -1189,9 +1189,12 @@ static void ath9k_hw_set_operating_mode(struct ath_hw *ah, int opmode) ...@@ -1189,9 +1189,12 @@ static void ath9k_hw_set_operating_mode(struct ath_hw *ah, int opmode)
switch (opmode) { switch (opmode) {
case NL80211_IFTYPE_ADHOC: case NL80211_IFTYPE_ADHOC:
set |= AR_STA_ID1_ADHOC; if (!AR_SREV_9340_13(ah)) {
REG_SET_BIT(ah, AR_CFG, AR_CFG_AP_ADHOC_INDICATION); set |= AR_STA_ID1_ADHOC;
break; REG_SET_BIT(ah, AR_CFG, AR_CFG_AP_ADHOC_INDICATION);
break;
}
/* fall through */
case NL80211_IFTYPE_MESH_POINT: case NL80211_IFTYPE_MESH_POINT:
case NL80211_IFTYPE_AP: case NL80211_IFTYPE_AP:
set |= AR_STA_ID1_STA_AP; set |= AR_STA_ID1_STA_AP;
......
...@@ -903,6 +903,10 @@ ...@@ -903,6 +903,10 @@
#define AR_SREV_9340(_ah) \ #define AR_SREV_9340(_ah) \
(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9340)) (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9340))
#define AR_SREV_9340_13(_ah) \
(AR_SREV_9340((_ah)) && \
((_ah)->hw_version.macRev == AR_SREV_REVISION_9340_13))
#define AR_SREV_9340_13_OR_LATER(_ah) \ #define AR_SREV_9340_13_OR_LATER(_ah) \
(AR_SREV_9340((_ah)) && \ (AR_SREV_9340((_ah)) && \
((_ah)->hw_version.macRev >= AR_SREV_REVISION_9340_13)) ((_ah)->hw_version.macRev >= AR_SREV_REVISION_9340_13))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment