Lines 42-49
Link Here
|
42 |
enum nl80211_iftype type, u32 *flags, struct vif_params *params); |
42 |
enum nl80211_iftype type, u32 *flags, struct vif_params *params); |
43 |
static s32 __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, |
43 |
static s32 __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, |
44 |
struct cfg80211_scan_request *request, struct cfg80211_ssid *this_ssid); |
44 |
struct cfg80211_scan_request *request, struct cfg80211_ssid *this_ssid); |
|
|
45 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) |
46 |
static s32 wl_cfg80211_scan(struct wiphy *wiphy, |
47 |
struct cfg80211_scan_request *request); |
48 |
#else |
45 |
static s32 wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, |
49 |
static s32 wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, |
46 |
struct cfg80211_scan_request *request); |
50 |
struct cfg80211_scan_request *request); |
|
|
51 |
#endif |
47 |
static s32 wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed); |
52 |
static s32 wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed); |
48 |
static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, |
53 |
static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, |
49 |
struct cfg80211_ibss_params *params); |
54 |
struct cfg80211_ibss_params *params); |
Lines 56-62
Link Here
|
56 |
struct cfg80211_connect_params *sme); |
61 |
struct cfg80211_connect_params *sme); |
57 |
static s32 wl_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_code); |
62 |
static s32 wl_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_code); |
58 |
|
63 |
|
59 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) |
64 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) |
|
|
65 |
static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, |
66 |
enum nl80211_tx_power_setting type, s32 dbm); |
67 |
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) |
60 |
static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy, |
68 |
static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy, |
61 |
enum nl80211_tx_power_setting type, s32 dbm); |
69 |
enum nl80211_tx_power_setting type, s32 dbm); |
62 |
#else |
70 |
#else |
Lines 64-70
Link Here
|
64 |
enum tx_power_setting type, s32 dbm); |
72 |
enum tx_power_setting type, s32 dbm); |
65 |
#endif |
73 |
#endif |
66 |
|
74 |
|
|
|
75 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) |
76 |
static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, s32 *dbm); |
77 |
#else |
67 |
static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm); |
78 |
static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm); |
|
|
79 |
#endif |
68 |
|
80 |
|
69 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) |
81 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) |
70 |
static s32 wl_cfg80211_config_default_key(struct wiphy *wiphy, |
82 |
static s32 wl_cfg80211_config_default_key(struct wiphy *wiphy, |
Lines 570-579
Link Here
|
570 |
} |
582 |
} |
571 |
|
583 |
|
572 |
static s32 |
584 |
static s32 |
|
|
585 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) |
586 |
wl_cfg80211_scan(struct wiphy *wiphy, |
587 |
struct cfg80211_scan_request *request) |
588 |
#else |
573 |
wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, |
589 |
wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, |
574 |
struct cfg80211_scan_request *request) |
590 |
struct cfg80211_scan_request *request) |
|
|
591 |
#endif |
575 |
{ |
592 |
{ |
576 |
s32 err = 0; |
593 |
s32 err = 0; |
|
|
594 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) |
595 |
struct wl_priv *wl = wiphy_to_wl(wiphy); |
596 |
struct net_device *ndev = wl_to_ndev(wl); |
597 |
#endif |
577 |
|
598 |
|
578 |
CHECK_SYS_UP(); |
599 |
CHECK_SYS_UP(); |
579 |
err = __wl_cfg80211_scan(wiphy, ndev, request, NULL); |
600 |
err = __wl_cfg80211_scan(wiphy, ndev, request, NULL); |
Lines 742-748
Link Here
|
742 |
else |
763 |
else |
743 |
memset(&join_params.params.bssid, 0, ETHER_ADDR_LEN); |
764 |
memset(&join_params.params.bssid, 0, ETHER_ADDR_LEN); |
744 |
|
765 |
|
|
|
766 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) |
767 |
wl_ch_to_chanspec(params->chandef.chan, &join_params, &join_params_size); |
768 |
#else |
745 |
wl_ch_to_chanspec(params->channel, &join_params, &join_params_size); |
769 |
wl_ch_to_chanspec(params->channel, &join_params, &join_params_size); |
|
|
770 |
#endif |
746 |
|
771 |
|
747 |
err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size); |
772 |
err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size); |
748 |
if (err) { |
773 |
if (err) { |
Lines 1099-1105
Link Here
|
1099 |
return err; |
1124 |
return err; |
1100 |
} |
1125 |
} |
1101 |
|
1126 |
|
1102 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) |
1127 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) |
|
|
1128 |
static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, |
1129 |
enum nl80211_tx_power_setting type, s32 dbm) |
1130 |
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) |
1103 |
static s32 |
1131 |
static s32 |
1104 |
wl_cfg80211_set_tx_power(struct wiphy *wiphy, enum nl80211_tx_power_setting type, s32 dbm) |
1132 |
wl_cfg80211_set_tx_power(struct wiphy *wiphy, enum nl80211_tx_power_setting type, s32 dbm) |
1105 |
#else |
1133 |
#else |
Lines 1158-1164
Link Here
|
1158 |
return err; |
1186 |
return err; |
1159 |
} |
1187 |
} |
1160 |
|
1188 |
|
|
|
1189 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) |
1190 |
static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, s32 *dbm) |
1191 |
#else |
1161 |
static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm) |
1192 |
static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm) |
|
|
1193 |
#endif |
1162 |
{ |
1194 |
{ |
1163 |
struct wl_priv *wl = wiphy_to_wl(wiphy); |
1195 |
struct wl_priv *wl = wiphy_to_wl(wiphy); |
1164 |
struct net_device *ndev = wl_to_ndev(wl); |
1196 |
struct net_device *ndev = wl_to_ndev(wl); |
Lines 2074-2081
Link Here
|
2074 |
beacon_interval = cpu_to_le16(bi->beacon_period); |
2106 |
beacon_interval = cpu_to_le16(bi->beacon_period); |
2075 |
} else { |
2107 |
} else { |
2076 |
WL_DBG(("Found the AP in the list - BSSID %pM\n", bss->bssid)); |
2108 |
WL_DBG(("Found the AP in the list - BSSID %pM\n", bss->bssid)); |
|
|
2109 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) |
2110 |
ie = bss->ies->data; |
2111 |
ie_len = bss->ies->len; |
2112 |
#else |
2077 |
ie = bss->information_elements; |
2113 |
ie = bss->information_elements; |
2078 |
ie_len = bss->len_information_elements; |
2114 |
ie_len = bss->len_information_elements; |
|
|
2115 |
#endif |
2079 |
beacon_interval = bss->beacon_interval; |
2116 |
beacon_interval = bss->beacon_interval; |
2080 |
cfg80211_put_bss(bss); |
2117 |
cfg80211_put_bss(bss); |
2081 |
} |
2118 |
} |