diff options
Diffstat (limited to 'net')
| -rw-r--r-- | net/wireless/wext-compat.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index 4c89f0ca61ba..9f27221c8913 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c | |||
| @@ -25,42 +25,7 @@ int cfg80211_wext_giwname(struct net_device *dev, | |||
| 25 | struct iw_request_info *info, | 25 | struct iw_request_info *info, |
| 26 | char *name, char *extra) | 26 | char *name, char *extra) |
| 27 | { | 27 | { |
| 28 | struct wireless_dev *wdev = dev->ieee80211_ptr; | ||
| 29 | struct ieee80211_supported_band *sband; | ||
| 30 | bool is_ht = false, is_a = false, is_b = false, is_g = false; | ||
| 31 | |||
| 32 | if (!wdev) | ||
| 33 | return -EOPNOTSUPP; | ||
| 34 | |||
| 35 | sband = wdev->wiphy->bands[NL80211_BAND_5GHZ]; | ||
| 36 | if (sband) { | ||
| 37 | is_a = true; | ||
| 38 | is_ht |= sband->ht_cap.ht_supported; | ||
| 39 | } | ||
| 40 | |||
| 41 | sband = wdev->wiphy->bands[NL80211_BAND_2GHZ]; | ||
| 42 | if (sband) { | ||
| 43 | int i; | ||
| 44 | /* Check for mandatory rates */ | ||
| 45 | for (i = 0; i < sband->n_bitrates; i++) { | ||
| 46 | if (sband->bitrates[i].bitrate == 10) | ||
| 47 | is_b = true; | ||
| 48 | if (sband->bitrates[i].bitrate == 60) | ||
| 49 | is_g = true; | ||
| 50 | } | ||
| 51 | is_ht |= sband->ht_cap.ht_supported; | ||
| 52 | } | ||
| 53 | |||
| 54 | strcpy(name, "IEEE 802.11"); | 28 | strcpy(name, "IEEE 802.11"); |
| 55 | if (is_a) | ||
| 56 | strcat(name, "a"); | ||
| 57 | if (is_b) | ||
| 58 | strcat(name, "b"); | ||
| 59 | if (is_g) | ||
| 60 | strcat(name, "g"); | ||
| 61 | if (is_ht) | ||
| 62 | strcat(name, "n"); | ||
| 63 | |||
| 64 | return 0; | 29 | return 0; |
| 65 | } | 30 | } |
| 66 | EXPORT_WEXT_HANDLER(cfg80211_wext_giwname); | 31 | EXPORT_WEXT_HANDLER(cfg80211_wext_giwname); |
