Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wext: remove a/b/g/n from SIOCGIWNAME

Since a/b/g/n no longer exist as spec amendements and VHT (ex 802.11ac)
wasn't handled at all, it's better to just remove the amendment strings
to avoid confusion.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

-35
-35
net/wireless/wext-compat.c
··· 25 25 struct iw_request_info *info, 26 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 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 29 return 0; 65 30 } 66 31 EXPORT_WEXT_HANDLER(cfg80211_wext_giwname);