Lines Matching defs:wdev
38 struct wireless_dev *wdev = dev->ieee80211_ptr;
43 rdev = wiphy_to_rdev(wdev->wiphy);
62 if (type == wdev->iftype)
74 struct wireless_dev *wdev = dev->ieee80211_ptr;
76 if (!wdev)
79 switch (wdev->iftype) {
111 struct wireless_dev *wdev = dev->ieee80211_ptr;
116 if (!wdev)
137 switch (wdev->wiphy->signal_type) {
161 for (i = 0; i < wdev->wiphy->n_cipher_suites; i++) {
162 switch (wdev->wiphy->cipher_suites[i]) {
188 sband = wdev->wiphy->bands[band];
213 if (wdev->wiphy->max_scan_ssids > 0)
254 struct wireless_dev *wdev = dev->ieee80211_ptr;
255 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
256 u32 orts = wdev->wiphy->rts_threshold;
260 wdev->wiphy->rts_threshold = (u32) -1;
264 wdev->wiphy->rts_threshold = rts->value;
268 wdev->wiphy->rts_threshold = orts;
278 struct wireless_dev *wdev = dev->ieee80211_ptr;
280 rts->value = wdev->wiphy->rts_threshold;
292 struct wireless_dev *wdev = dev->ieee80211_ptr;
293 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
294 u32 ofrag = wdev->wiphy->frag_threshold;
298 wdev->wiphy->frag_threshold = (u32) -1;
303 wdev->wiphy->frag_threshold = frag->value & ~0x1;
308 wdev->wiphy->frag_threshold = ofrag;
318 struct wireless_dev *wdev = dev->ieee80211_ptr;
320 frag->value = wdev->wiphy->frag_threshold;
332 struct wireless_dev *wdev = dev->ieee80211_ptr;
333 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
335 u8 olong = wdev->wiphy->retry_long;
336 u8 oshort = wdev->wiphy->retry_short;
344 wdev->wiphy->retry_long = retry->value;
347 wdev->wiphy->retry_short = retry->value;
350 wdev->wiphy->retry_short = retry->value;
351 wdev->wiphy->retry_long = retry->value;
358 wdev->wiphy->retry_short = oshort;
359 wdev->wiphy->retry_long = olong;
369 struct wireless_dev *wdev = dev->ieee80211_ptr;
379 retry->value = wdev->wiphy->retry_short;
380 if (wdev->wiphy->retry_long == wdev->wiphy->retry_short)
388 retry->value = wdev->wiphy->retry_long;
400 struct wireless_dev *wdev = dev->ieee80211_ptr;
411 if (!wdev->wext.keys) {
412 wdev->wext.keys = kzalloc(sizeof(*wdev->wext.keys),
414 if (!wdev->wext.keys)
417 wdev->wext.keys->params[i].key =
418 wdev->wext.keys->data[i];
421 if (wdev->iftype != NL80211_IFTYPE_ADHOC &&
422 wdev->iftype != NL80211_IFTYPE_STATION)
426 if (!wdev->current_bss)
439 if (wdev->current_bss) {
444 if (idx == wdev->wext.default_key &&
445 wdev->iftype == NL80211_IFTYPE_ADHOC) {
446 __cfg80211_leave_ibss(rdev, wdev->netdev, true);
457 wdev->wext.connect.privacy = false;
466 memset(wdev->wext.keys->data[idx], 0,
467 sizeof(wdev->wext.keys->data[idx]));
468 wdev->wext.keys->params[idx].key_len = 0;
469 wdev->wext.keys->params[idx].cipher = 0;
471 if (idx == wdev->wext.default_key)
472 wdev->wext.default_key = -1;
473 else if (idx == wdev->wext.default_mgmt_key)
474 wdev->wext.default_mgmt_key = -1;
478 err = cfg80211_ibss_wext_join(rdev, wdev);
490 if (wdev->current_bss)
505 wdev->wext.keys->params[idx] = *params;
506 memcpy(wdev->wext.keys->data[idx],
508 wdev->wext.keys->params[idx].key =
509 wdev->wext.keys->data[idx];
514 (tx_key || (!addr && wdev->wext.default_key == -1))) {
515 if (wdev->current_bss) {
521 if (wdev->iftype == NL80211_IFTYPE_ADHOC &&
522 wdev->wext.default_key == -1) {
523 __cfg80211_leave_ibss(rdev, wdev->netdev, true);
529 wdev->wext.default_key = idx;
531 err = cfg80211_ibss_wext_join(rdev, wdev);
537 (tx_key || (!addr && wdev->wext.default_mgmt_key == -1))) {
538 if (wdev->current_bss)
541 wdev->wext.default_mgmt_key = idx;
567 struct wireless_dev *wdev = dev->ieee80211_ptr;
568 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
573 if (wdev->iftype != NL80211_IFTYPE_STATION &&
574 wdev->iftype != NL80211_IFTYPE_ADHOC)
585 idx = wdev->wext.default_key;
598 wdev_lock(wdev);
599 if (wdev->current_bss)
603 wdev->wext.default_key = idx;
604 wdev_unlock(wdev);
619 wdev->wext.default_key == -1,
627 struct wireless_dev *wdev = dev->ieee80211_ptr;
628 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
636 if (wdev->iftype != NL80211_IFTYPE_STATION &&
637 wdev->iftype != NL80211_IFTYPE_ADHOC)
678 idx = wdev->wext.default_mgmt_key;
685 idx = wdev->wext.default_key;
718 struct wireless_dev *wdev = dev->ieee80211_ptr;
721 if (wdev->iftype != NL80211_IFTYPE_STATION &&
722 wdev->iftype != NL80211_IFTYPE_ADHOC)
727 idx = wdev->wext.default_key;
737 if (!wdev->wext.keys || !wdev->wext.keys->params[idx].cipher) {
744 wdev->wext.keys->params[idx].key_len);
745 memcpy(keybuf, wdev->wext.keys->params[idx].key, erq->length);
755 struct wireless_dev *wdev = dev->ieee80211_ptr;
756 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
762 switch (wdev->iftype) {
788 return cfg80211_set_mesh_channel(rdev, wdev, &chandef);
798 struct wireless_dev *wdev = dev->ieee80211_ptr;
799 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
803 switch (wdev->iftype) {
812 ret = rdev_get_channel(rdev, wdev, &chandef);
827 struct wireless_dev *wdev = dev->ieee80211_ptr;
828 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
872 return rdev_set_tx_power(rdev, wdev, type, DBM_TO_MBM(dbm));
879 struct wireless_dev *wdev = dev->ieee80211_ptr;
880 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
891 err = rdev_get_tx_power(rdev, wdev, &val);
904 static int cfg80211_set_auth_alg(struct wireless_dev *wdev,
919 wdev->wext.connect.auth_type = NL80211_AUTHTYPE_OPEN_SYSTEM;
924 wdev->wext.connect.auth_type = NL80211_AUTHTYPE_SHARED_KEY;
929 wdev->wext.connect.auth_type = NL80211_AUTHTYPE_NETWORK_EAP;
933 wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC;
938 static int cfg80211_set_wpa_version(struct wireless_dev *wdev, u32 wpa_versions)
951 wdev->wext.connect.crypto.wpa_versions &=
955 wdev->wext.connect.crypto.wpa_versions |=
959 wdev->wext.connect.crypto.wpa_versions |=
965 static int cfg80211_set_cipher_group(struct wireless_dev *wdev, u32 cipher)
968 wdev->wext.connect.crypto.cipher_group =
971 wdev->wext.connect.crypto.cipher_group =
974 wdev->wext.connect.crypto.cipher_group =
977 wdev->wext.connect.crypto.cipher_group =
980 wdev->wext.connect.crypto.cipher_group =
983 wdev->wext.connect.crypto.cipher_group = 0;
990 static int cfg80211_set_cipher_pairwise(struct wireless_dev *wdev, u32 cipher)
993 u32 *ciphers_pairwise = wdev->wext.connect.crypto.ciphers_pairwise;
1022 wdev->wext.connect.crypto.n_ciphers_pairwise = nr_ciphers;
1028 static int cfg80211_set_key_mgt(struct wireless_dev *wdev, u32 key_mgt)
1037 wdev->wext.connect.crypto.akm_suites[nr_akm_suites] =
1043 wdev->wext.connect.crypto.akm_suites[nr_akm_suites] =
1048 wdev->wext.connect.crypto.n_akm_suites = nr_akm_suites;
1057 struct wireless_dev *wdev = dev->ieee80211_ptr;
1059 if (wdev->iftype != NL80211_IFTYPE_STATION)
1064 wdev->wext.connect.privacy = data->value;
1067 return cfg80211_set_wpa_version(wdev, data->value);
1069 return cfg80211_set_cipher_group(wdev, data->value);
1071 return cfg80211_set_key_mgt(wdev, data->value);
1073 return cfg80211_set_cipher_pairwise(wdev, data->value);
1075 return cfg80211_set_auth_alg(wdev, data->value);
1099 struct wireless_dev *wdev = dev->ieee80211_ptr;
1100 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1101 bool ps = wdev->ps;
1102 int timeout = wdev->ps_timeout;
1105 if (wdev->iftype != NL80211_IFTYPE_STATION)
1135 wdev->ps = ps;
1136 wdev->ps_timeout = timeout;
1146 struct wireless_dev *wdev = dev->ieee80211_ptr;
1148 wrq->disabled = !wdev->ps;
1157 struct wireless_dev *wdev = dev->ieee80211_ptr;
1158 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1161 if (WARN_ON(wdev->iftype != NL80211_IFTYPE_WDS))
1177 memcpy(&wdev->wext.bssid, (u8 *) &addr->sa_data, ETH_ALEN);
1186 struct wireless_dev *wdev = dev->ieee80211_ptr;
1188 if (WARN_ON(wdev->iftype != NL80211_IFTYPE_WDS))
1192 memcpy(&addr->sa_data, wdev->wext.bssid, ETH_ALEN);
1201 struct wireless_dev *wdev = dev->ieee80211_ptr;
1202 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1225 sband = wdev->wiphy->bands[band];
1252 struct wireless_dev *wdev = dev->ieee80211_ptr;
1253 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1258 if (wdev->iftype != NL80211_IFTYPE_STATION)
1265 wdev_lock(wdev);
1266 if (wdev->current_bss)
1267 memcpy(addr, wdev->current_bss->pub.bssid, ETH_ALEN);
1270 wdev_unlock(wdev);
1293 struct wireless_dev *wdev = dev->ieee80211_ptr;
1294 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1307 wdev_lock(wdev);
1308 if (!wdev->current_bss) {
1309 wdev_unlock(wdev);
1312 memcpy(bssid, wdev->current_bss->pub.bssid, ETH_ALEN);
1313 wdev_unlock(wdev);
1367 struct wireless_dev *wdev = dev->ieee80211_ptr;
1369 switch (wdev->iftype) {
1385 struct wireless_dev *wdev = dev->ieee80211_ptr;
1387 switch (wdev->iftype) {
1403 struct wireless_dev *wdev = dev->ieee80211_ptr;
1405 switch (wdev->iftype) {
1419 struct wireless_dev *wdev = dev->ieee80211_ptr;
1424 switch (wdev->iftype) {
1438 struct wireless_dev *wdev = dev->ieee80211_ptr;
1439 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1445 if (wdev->iftype != NL80211_IFTYPE_STATION)