aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c30
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.h2
-rw-r--r--drivers/net/wireless/ath/ath6kl/core.h3
-rw-r--r--drivers/net/wireless/ath/ath6kl/init.c3
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.c19
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.h11
6 files changed, 68 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
1515set_iface_type: 1521set_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
2627void 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
2621static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon, 2651static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon,
2622 u8 *rsn_capab) 2652 u8 *rsn_capab)
2623{ 2653{
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.h b/drivers/net/wireless/ath/ath6kl/cfg80211.h
index 5ea8cbb79f4..b992046a1b0 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.h
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.h
@@ -62,5 +62,7 @@ void ath6kl_cfg80211_cleanup(struct ath6kl *ar);
62 62
63struct ath6kl *ath6kl_cfg80211_create(void); 63struct ath6kl *ath6kl_cfg80211_create(void);
64void ath6kl_cfg80211_destroy(struct ath6kl *ar); 64void ath6kl_cfg80211_destroy(struct ath6kl *ar);
65/* TODO: remove this once ath6kl_vif_cleanup() is moved to cfg80211.c */
66void ath6kl_cfg80211_sta_bmiss_enhance(struct ath6kl_vif *vif, bool enable);
65 67
66#endif /* ATH6KL_CFG80211_H */ 68#endif /* ATH6KL_CFG80211_H */
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index 79c7055674b..99169794ff3 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -107,6 +107,9 @@ enum ath6kl_fw_capability {
107 */ 107 */
108 ATH6KL_FW_CAPABILITY_WOW_MULTICAST_FILTER, 108 ATH6KL_FW_CAPABILITY_WOW_MULTICAST_FILTER,
109 109
110 /* Firmware supports enhanced bmiss detection */
111 ATH6KL_FW_CAPABILITY_BMISS_ENHANCE,
112
110 /* this needs to be last */ 113 /* this needs to be last */
111 ATH6KL_FW_CAPABILITY_MAX, 114 ATH6KL_FW_CAPABILITY_MAX,
112}; 115};
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index 7eb0515f458..10de1322e70 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -1659,6 +1659,9 @@ void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready)
1659 cfg80211_scan_done(vif->scan_req, true); 1659 cfg80211_scan_done(vif->scan_req, true);
1660 vif->scan_req = NULL; 1660 vif->scan_req = NULL;
1661 } 1661 }
1662
1663 /* need to clean up enhanced bmiss detection fw state */
1664 ath6kl_cfg80211_sta_bmiss_enhance(vif, false);
1662} 1665}
1663 1666
1664void ath6kl_stop_txrx(struct ath6kl *ar) 1667void ath6kl_stop_txrx(struct ath6kl *ar)
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index bdd3b2c5563..6ad762daa42 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -2997,6 +2997,25 @@ int ath6kl_wmi_add_del_mcast_filter_cmd(struct wmi *wmi, u8 if_idx,
2997 return ret; 2997 return ret;
2998} 2998}
2999 2999
3000int ath6kl_wmi_sta_bmiss_enhance_cmd(struct wmi *wmi, u8 if_idx, bool enhance)
3001{
3002 struct sk_buff *skb;
3003 struct wmi_sta_bmiss_enhance_cmd *cmd;
3004 int ret;
3005
3006 skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
3007 if (!skb)
3008 return -ENOMEM;
3009
3010 cmd = (struct wmi_sta_bmiss_enhance_cmd *) skb->data;
3011 cmd->enable = enhance ? 1 : 0;
3012
3013 ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb,
3014 WMI_STA_BMISS_ENHANCE_CMDID,
3015 NO_SYNC_WMIFLAG);
3016 return ret;
3017}
3018
3000s32 ath6kl_wmi_get_rate(s8 rate_index) 3019s32 ath6kl_wmi_get_rate(s8 rate_index)
3001{ 3020{
3002 if (rate_index == RATE_AUTO) 3021 if (rate_index == RATE_AUTO)
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index 3518550e350..8c07e3858b1 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -624,6 +624,10 @@ enum wmi_cmd_id {
624 WMI_SEND_MGMT_CMDID, 624 WMI_SEND_MGMT_CMDID,
625 WMI_BEGIN_SCAN_CMDID, 625 WMI_BEGIN_SCAN_CMDID,
626 626
627 WMI_SET_BLACK_LIST,
628 WMI_SET_MCASTRATE,
629
630 WMI_STA_BMISS_ENHANCE_CMDID,
627}; 631};
628 632
629enum wmi_mgmt_frame_type { 633enum wmi_mgmt_frame_type {
@@ -1017,6 +1021,11 @@ struct wmi_bmiss_time_cmd {
1017 __le16 num_beacons; 1021 __le16 num_beacons;
1018}; 1022};
1019 1023
1024/* WMI_STA_ENHANCE_BMISS_CMDID */
1025struct wmi_sta_bmiss_enhance_cmd {
1026 u8 enable;
1027} __packed;
1028
1020/* WMI_SET_POWER_MODE_CMDID */ 1029/* WMI_SET_POWER_MODE_CMDID */
1021enum wmi_power_mode { 1030enum wmi_power_mode {
1022 REC_POWER = 0x01, 1031 REC_POWER = 0x01,
@@ -2547,6 +2556,8 @@ int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode);
2547int ath6kl_wmi_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, bool mc_all_on); 2556int ath6kl_wmi_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, bool mc_all_on);
2548int ath6kl_wmi_add_del_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, 2557int ath6kl_wmi_add_del_mcast_filter_cmd(struct wmi *wmi, u8 if_idx,
2549 u8 *filter, bool add_filter); 2558 u8 *filter, bool add_filter);
2559int ath6kl_wmi_sta_bmiss_enhance_cmd(struct wmi *wmi, u8 if_idx, bool enable);
2560
2550/* AP mode uAPSD */ 2561/* AP mode uAPSD */
2551int ath6kl_wmi_ap_set_apsd(struct wmi *wmi, u8 if_idx, u8 enable); 2562int ath6kl_wmi_ap_set_apsd(struct wmi *wmi, u8 if_idx, u8 enable);
2552 2563