diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 36 |
1 files changed, 34 insertions, 2 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: | |||
3419 | int ath6kl_cfg80211_init(struct ath6kl *ar) | 3419 | int 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; |