diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 22843a1b9f2..e68b1077816 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -576,6 +576,9 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
576 | 576 | ||
577 | vif->nw_type = vif->next_mode; | 577 | vif->nw_type = vif->next_mode; |
578 | 578 | ||
579 | /* enable enhanced bmiss detection if applicable */ | ||
580 | ath6kl_cfg80211_sta_bmiss_enhance(vif, true); | ||
581 | |||
579 | if (vif->wdev.iftype == NL80211_IFTYPE_P2P_CLIENT) | 582 | if (vif->wdev.iftype == NL80211_IFTYPE_P2P_CLIENT) |
580 | nw_subtype = SUBTYPE_P2PCLIENT; | 583 | nw_subtype = SUBTYPE_P2PCLIENT; |
581 | 584 | ||
@@ -1512,6 +1515,9 @@ static int ath6kl_cfg80211_change_iface(struct wiphy *wiphy, | |||
1512 | } | 1515 | } |
1513 | } | 1516 | } |
1514 | 1517 | ||
1518 | /* need to clean up enhanced bmiss detection fw state */ | ||
1519 | ath6kl_cfg80211_sta_bmiss_enhance(vif, false); | ||
1520 | |||
1515 | set_iface_type: | 1521 | set_iface_type: |
1516 | switch (type) { | 1522 | switch (type) { |
1517 | case NL80211_IFTYPE_STATION: | 1523 | case NL80211_IFTYPE_STATION: |
@@ -2618,6 +2624,30 @@ static int ath6kl_set_channel(struct wiphy *wiphy, struct net_device *dev, | |||
2618 | return 0; | 2624 | return 0; |
2619 | } | 2625 | } |
2620 | 2626 | ||
2627 | void ath6kl_cfg80211_sta_bmiss_enhance(struct ath6kl_vif *vif, bool enable) | ||
2628 | { | ||
2629 | int err; | ||
2630 | |||
2631 | if (WARN_ON(!test_bit(WMI_READY, &vif->ar->flag))) | ||
2632 | return; | ||
2633 | |||
2634 | if (vif->nw_type != INFRA_NETWORK) | ||
2635 | return; | ||
2636 | |||
2637 | if (!test_bit(ATH6KL_FW_CAPABILITY_BMISS_ENHANCE, | ||
2638 | vif->ar->fw_capabilities)) | ||
2639 | return; | ||
2640 | |||
2641 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s fw bmiss enhance\n", | ||
2642 | enable ? "enable" : "disable"); | ||
2643 | |||
2644 | err = ath6kl_wmi_sta_bmiss_enhance_cmd(vif->ar->wmi, | ||
2645 | vif->fw_vif_idx, enable); | ||
2646 | if (err) | ||
2647 | ath6kl_err("failed to %s enhanced bmiss detection: %d\n", | ||
2648 | enable ? "enable" : "disable", err); | ||
2649 | } | ||
2650 | |||
2621 | static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon, | 2651 | static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon, |
2622 | u8 *rsn_capab) | 2652 | u8 *rsn_capab) |
2623 | { | 2653 | { |