2 * cfg80211 - wext compat code
4 * This is temporary code until all wireless functionality is migrated
5 * into cfg80211, when that happens all the exports here go away and
6 * we directly assign the wireless handlers of wireless interfaces.
8 * Copyright 2008 Johannes Berg <johannes@sipsolutions.net>
11 #include <linux/wireless.h>
12 #include <linux/nl80211.h>
13 #include <net/iw_handler.h>
14 #include <net/wireless.h>
15 #include <net/cfg80211.h>
18 int cfg80211_wext_giwname(struct net_device *dev,
19 struct iw_request_info *info,
20 char *name, char *extra)
22 struct wireless_dev *wdev = dev->ieee80211_ptr;
23 struct ieee80211_supported_band *sband;
24 bool is_ht = false, is_a = false, is_b = false, is_g = false;
29 sband = wdev->wiphy->bands[IEEE80211_BAND_5GHZ];
32 is_ht |= sband->ht_cap.ht_supported;
35 sband = wdev->wiphy->bands[IEEE80211_BAND_2GHZ];
38 /* Check for mandatory rates */
39 for (i = 0; i < sband->n_bitrates; i++) {
40 if (sband->bitrates[i].bitrate == 10)
42 if (sband->bitrates[i].bitrate == 60)
45 is_ht |= sband->ht_cap.ht_supported;
48 strcpy(name, "IEEE 802.11");
60 EXPORT_SYMBOL(cfg80211_wext_giwname);