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.c36
-rw-r--r--drivers/net/wireless/ath/ath6kl/core.h4
-rw-r--r--drivers/net/wireless/ath/ath6kl/main.c4
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.c2
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.h10
5 files changed, 51 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index a8a7570e22a0..b8489772c373 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3419,6 +3419,7 @@ err:
3419int ath6kl_cfg80211_init(struct ath6kl *ar) 3419int ath6kl_cfg80211_init(struct ath6kl *ar)
3420{ 3420{
3421 struct wiphy *wiphy = ar->wiphy; 3421 struct wiphy *wiphy = ar->wiphy;
3422 bool band_2gig = false, band_5gig = false, ht = false;
3422 int ret; 3423 int ret;
3423 3424
3424 wiphy->mgmt_stypes = ath6kl_mgmt_stypes; 3425 wiphy->mgmt_stypes = ath6kl_mgmt_stypes;
@@ -3439,8 +3440,39 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
3439 /* max num of ssids that can be probed during scanning */ 3440 /* max num of ssids that can be probed during scanning */
3440 wiphy->max_scan_ssids = MAX_PROBED_SSID_INDEX; 3441 wiphy->max_scan_ssids = MAX_PROBED_SSID_INDEX;
3441 wiphy->max_scan_ie_len = 1000; /* FIX: what is correct limit? */ 3442 wiphy->max_scan_ie_len = 1000; /* FIX: what is correct limit? */
3442 wiphy->bands[IEEE80211_BAND_2GHZ] = &ath6kl_band_2ghz; 3443 switch (ar->hw.cap) {
3443 wiphy->bands[IEEE80211_BAND_5GHZ] = &ath6kl_band_5ghz; 3444 case WMI_11AN_CAP:
3445 ht = true;
3446 case WMI_11A_CAP:
3447 band_5gig = true;
3448 break;
3449 case WMI_11GN_CAP:
3450 ht = true;
3451 case WMI_11G_CAP:
3452 band_2gig = true;
3453 break;
3454 case WMI_11AGN_CAP:
3455 ht = true;
3456 case WMI_11AG_CAP:
3457 band_2gig = true;
3458 band_5gig = true;
3459 break;
3460 default:
3461 ath6kl_err("invalid phy capability!\n");
3462 return -EINVAL;
3463 }
3464
3465 if (!ht) {
3466 ath6kl_band_2ghz.ht_cap.cap = 0;
3467 ath6kl_band_2ghz.ht_cap.ht_supported = false;
3468 ath6kl_band_5ghz.ht_cap.cap = 0;
3469 ath6kl_band_5ghz.ht_cap.ht_supported = false;
3470 }
3471 if (band_2gig)
3472 wiphy->bands[IEEE80211_BAND_2GHZ] = &ath6kl_band_2ghz;
3473 if (band_5gig)
3474 wiphy->bands[IEEE80211_BAND_5GHZ] = &ath6kl_band_5ghz;
3475
3444 wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; 3476 wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
3445 3477
3446 wiphy->cipher_suites = cipher_suites; 3478 wiphy->cipher_suites = cipher_suites;
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index a97cb836106a..c26f0a269168 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -683,6 +683,7 @@ struct ath6kl {
683 u32 refclk_hz; 683 u32 refclk_hz;
684 u32 uarttx_pin; 684 u32 uarttx_pin;
685 u32 testscript_addr; 685 u32 testscript_addr;
686 enum wmi_phy_cap cap;
686 687
687 struct ath6kl_hw_fw { 688 struct ath6kl_hw_fw {
688 const char *dir; 689 const char *dir;
@@ -816,7 +817,8 @@ void aggr_reset_state(struct aggr_info_conn *aggr_conn);
816struct ath6kl_sta *ath6kl_find_sta(struct ath6kl_vif *vif, u8 *node_addr); 817struct ath6kl_sta *ath6kl_find_sta(struct ath6kl_vif *vif, u8 *node_addr);
817struct ath6kl_sta *ath6kl_find_sta_by_aid(struct ath6kl *ar, u8 aid); 818struct ath6kl_sta *ath6kl_find_sta_by_aid(struct ath6kl *ar, u8 aid);
818 819
819void ath6kl_ready_event(void *devt, u8 *datap, u32 sw_ver, u32 abi_ver); 820void ath6kl_ready_event(void *devt, u8 *datap, u32 sw_ver, u32 abi_ver,
821 enum wmi_phy_cap cap);
820int ath6kl_control_tx(void *devt, struct sk_buff *skb, 822int ath6kl_control_tx(void *devt, struct sk_buff *skb,
821 enum htc_endpoint_id eid); 823 enum htc_endpoint_id eid);
822void ath6kl_connect_event(struct ath6kl_vif *vif, u16 channel, 824void ath6kl_connect_event(struct ath6kl_vif *vif, u16 channel,
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
index 4f3aab22008a..ff0b999f6f66 100644
--- a/drivers/net/wireless/ath/ath6kl/main.c
+++ b/drivers/net/wireless/ath/ath6kl/main.c
@@ -548,7 +548,8 @@ void ath6kl_disconnect(struct ath6kl_vif *vif)
548 548
549/* WMI Event handlers */ 549/* WMI Event handlers */
550 550
551void ath6kl_ready_event(void *devt, u8 *datap, u32 sw_ver, u32 abi_ver) 551void ath6kl_ready_event(void *devt, u8 *datap, u32 sw_ver, u32 abi_ver,
552 enum wmi_phy_cap cap)
552{ 553{
553 struct ath6kl *ar = devt; 554 struct ath6kl *ar = devt;
554 555
@@ -558,6 +559,7 @@ void ath6kl_ready_event(void *devt, u8 *datap, u32 sw_ver, u32 abi_ver)
558 559
559 ar->version.wlan_ver = sw_ver; 560 ar->version.wlan_ver = sw_ver;
560 ar->version.abi_ver = abi_ver; 561 ar->version.abi_ver = abi_ver;
562 ar->hw.cap = cap;
561 563
562 snprintf(ar->wiphy->fw_version, 564 snprintf(ar->wiphy->fw_version,
563 sizeof(ar->wiphy->fw_version), 565 sizeof(ar->wiphy->fw_version),
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index db688a2e1f6c..2eb771aa88f3 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -690,7 +690,7 @@ static int ath6kl_wmi_ready_event_rx(struct wmi *wmi, u8 *datap, int len)
690 690
691 ath6kl_ready_event(wmi->parent_dev, ev->mac_addr, 691 ath6kl_ready_event(wmi->parent_dev, ev->mac_addr,
692 le32_to_cpu(ev->sw_version), 692 le32_to_cpu(ev->sw_version),
693 le32_to_cpu(ev->abi_version)); 693 le32_to_cpu(ev->abi_version), ev->phy_cap);
694 694
695 return 0; 695 return 0;
696} 696}
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index 190b2c4e382f..996614038fd4 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -1417,6 +1417,16 @@ struct wmi_ready_event_2 {
1417 u8 phy_cap; 1417 u8 phy_cap;
1418} __packed; 1418} __packed;
1419 1419
1420/* WMI_PHY_CAPABILITY */
1421enum wmi_phy_cap {
1422 WMI_11A_CAP = 0x01,
1423 WMI_11G_CAP = 0x02,
1424 WMI_11AG_CAP = 0x03,
1425 WMI_11AN_CAP = 0x04,
1426 WMI_11GN_CAP = 0x05,
1427 WMI_11AGN_CAP = 0x06,
1428};
1429
1420/* Connect Event */ 1430/* Connect Event */
1421struct wmi_connect_event { 1431struct wmi_connect_event {
1422 union { 1432 union {