Skip to content

Commit c6522a5

Browse files
Loic PoulainKalle Valo
authored andcommitted
wcn36xx: Disable bmps when encryption is disabled
For whatever reason, when connected to an open/no-security BSS, the wcn36xx controller in bmps mode does not forward 'wake-up' beacons despite AP sends DTIM with station AID. Meaning that AP is not able to wakeup the station and needs to wait for the station to wakeup by its own (TX data, keep alive pkt...), causing serious latency issues and unexpected deauth. When connected to AP with encryption enabled, this issue does not occur. So a simple workaround is to only enable bmps support in that case. Ideally, it should be propertly fixed to allow bmps support with open BSS, whatever the issue is at driver or firmware level. Tested on wcn3620 and wcn3680. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1598363127-26066-1-git-send-email-loic.poulain@linaro.org
1 parent 1fcdb56 commit c6522a5

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

‎drivers/net/wireless/ath/wcn36xx/main.c‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,15 @@ static int wcn36xx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
610610
}
611611
}
612612
}
613+
/* FIXME: Only enable bmps support when encryption is enabled.
614+
* For any reasons, when connected to open/no-security BSS,
615+
* the wcn36xx controller in bmps mode does not forward
616+
* 'wake-up' beacons despite AP sends DTIM with station AID.
617+
* It could be due to a firmware issue or to the way driver
618+
* configure the station.
619+
*/
620+
if (vif->type == NL80211_IFTYPE_STATION)
621+
vif_priv->allow_bmps = true;
613622
break;
614623
case DISABLE_KEY:
615624
if (!(IEEE80211_KEY_FLAG_PAIRWISE & key_conf->flags)) {
@@ -891,6 +900,7 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
891900
vif->addr,
892901
bss_conf->aid);
893902
vif_priv->sta_assoc = false;
903+
vif_priv->allow_bmps = false;
894904
wcn36xx_smd_set_link_st(wcn,
895905
bss_conf->bssid,
896906
vif->addr,

‎drivers/net/wireless/ath/wcn36xx/pmc.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ int wcn36xx_pmc_enter_bmps_state(struct wcn36xx *wcn,
2323
{
2424
int ret = 0;
2525
struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
26-
/* TODO: Make sure the TX chain clean */
26+
27+
if (!vif_priv->allow_bmps)
28+
return -ENOTSUPP;
29+
2730
ret = wcn36xx_smd_enter_bmps(wcn, vif);
2831
if (!ret) {
2932
wcn36xx_dbg(WCN36XX_DBG_PMC, "Entered BMPS\n");

‎drivers/net/wireless/ath/wcn36xx/wcn36xx.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ struct wcn36xx_vif {
122122
enum wcn36xx_hal_bss_type bss_type;
123123

124124
/* Power management */
125+
bool allow_bmps;
125126
enum wcn36xx_power_state pw_state;
126127

127128
u8 bss_index;

0 commit comments

Comments
 (0)