diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 5ede3d2f1f2a..b32843779c5f 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -626,55 +626,6 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason, | |||
626 | ar->sme_state = SME_DISCONNECTED; | 626 | ar->sme_state = SME_DISCONNECTED; |
627 | } | 627 | } |
628 | 628 | ||
629 | static inline bool is_ch_11a(u16 ch) | ||
630 | { | ||
631 | return (!((ch >= 2412) && (ch <= 2484))); | ||
632 | } | ||
633 | |||
634 | /* struct ath6kl_node_table::nt_nodelock is locked when calling this */ | ||
635 | void ath6kl_cfg80211_scan_node(struct wiphy *wiphy, struct bss *ni) | ||
636 | { | ||
637 | struct ieee80211_mgmt *mgmt; | ||
638 | struct ieee80211_channel *channel; | ||
639 | struct ieee80211_supported_band *band; | ||
640 | struct ath6kl_common_ie *cie; | ||
641 | s32 signal; | ||
642 | int freq; | ||
643 | |||
644 | cie = &ni->ni_cie; | ||
645 | |||
646 | if (is_ch_11a(cie->ie_chan)) | ||
647 | band = wiphy->bands[IEEE80211_BAND_5GHZ]; /* 11a */ | ||
648 | else if ((cie->ie_erp) || (cie->ie_xrates)) | ||
649 | band = wiphy->bands[IEEE80211_BAND_2GHZ]; /* 11g */ | ||
650 | else | ||
651 | band = wiphy->bands[IEEE80211_BAND_2GHZ]; /* 11b */ | ||
652 | |||
653 | freq = cie->ie_chan; | ||
654 | channel = ieee80211_get_channel(wiphy, freq); | ||
655 | signal = ni->ni_snr * 100; | ||
656 | |||
657 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, | ||
658 | "%s: bssid %pM ch %d freq %d size %d\n", __func__, | ||
659 | ni->ni_macaddr, channel->hw_value, freq, ni->ni_framelen); | ||
660 | /* | ||
661 | * Both Beacon and Probe Response frames have same payload structure, | ||
662 | * so it is fine to share the parser for both. | ||
663 | */ | ||
664 | if (ni->ni_framelen < 8 + 2 + 2) | ||
665 | return; | ||
666 | mgmt = (struct ieee80211_mgmt *) (ni->ni_buf - | ||
667 | offsetof(struct ieee80211_mgmt, u)); | ||
668 | cfg80211_inform_bss(wiphy, channel, ni->ni_macaddr, | ||
669 | le64_to_cpu(mgmt->u.beacon.timestamp), | ||
670 | le16_to_cpu(mgmt->u.beacon.capab_info), | ||
671 | le16_to_cpu(mgmt->u.beacon.beacon_int), | ||
672 | mgmt->u.beacon.variable, | ||
673 | ni->ni_buf + ni->ni_framelen - | ||
674 | mgmt->u.beacon.variable, | ||
675 | signal, GFP_ATOMIC); | ||
676 | } | ||
677 | |||
678 | static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, | 629 | static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, |
679 | struct cfg80211_scan_request *request) | 630 | struct cfg80211_scan_request *request) |
680 | { | 631 | { |
@@ -768,9 +719,6 @@ void ath6kl_cfg80211_scan_complete_event(struct ath6kl *ar, int status) | |||
768 | goto out; | 719 | goto out; |
769 | } | 720 | } |
770 | 721 | ||
771 | /* Translate data to cfg80211 mgmt format */ | ||
772 | wlan_iterate_nodes(&ar->scan_table, ar->wdev->wiphy); | ||
773 | |||
774 | cfg80211_scan_done(ar->scan_req, false); | 722 | cfg80211_scan_done(ar->scan_req, false); |
775 | 723 | ||
776 | if (ar->scan_req->n_ssids && ar->scan_req->ssids[0].ssid_len) { | 724 | if (ar->scan_req->n_ssids && ar->scan_req->ssids[0].ssid_len) { |