Lines Matching defs:wdev

39 	struct wireless_dev *wdev = dev->ieee80211_ptr;
45 rdev = wiphy_to_rdev(wdev->wiphy);
61 if (type == wdev->iftype)
66 wiphy_lock(wdev->wiphy);
68 wiphy_unlock(wdev->wiphy);
78 struct wireless_dev *wdev = dev->ieee80211_ptr;
80 if (!wdev)
83 switch (wdev->iftype) {
116 struct wireless_dev *wdev = dev->ieee80211_ptr;
121 if (!wdev)
142 switch (wdev->wiphy->signal_type) {
166 for (i = 0; i < wdev->wiphy->n_cipher_suites; i++) {
167 switch (wdev->wiphy->cipher_suites[i]) {
193 sband = wdev->wiphy->bands[band];
218 if (wdev->wiphy->max_scan_ssids > 0)
260 struct wireless_dev *wdev = dev->ieee80211_ptr;
261 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
262 u32 orts = wdev->wiphy->rts_threshold;
267 wdev->wiphy->rts_threshold = (u32) -1;
272 wdev->wiphy->rts_threshold = rts->value;
278 wdev->wiphy->rts_threshold = orts;
291 struct wireless_dev *wdev = dev->ieee80211_ptr;
293 rts->value = wdev->wiphy->rts_threshold;
306 struct wireless_dev *wdev = dev->ieee80211_ptr;
307 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
308 u32 ofrag = wdev->wiphy->frag_threshold;
313 wdev->wiphy->frag_threshold = (u32) -1;
319 wdev->wiphy->frag_threshold = frag->value & ~0x1;
324 wdev->wiphy->frag_threshold = ofrag;
337 struct wireless_dev *wdev = dev->ieee80211_ptr;
339 frag->value = wdev->wiphy->frag_threshold;
352 struct wireless_dev *wdev = dev->ieee80211_ptr;
353 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
355 u8 olong = wdev->wiphy->retry_long;
356 u8 oshort = wdev->wiphy->retry_short;
365 wdev->wiphy->retry_long = retry->value;
368 wdev->wiphy->retry_short = retry->value;
371 wdev->wiphy->retry_short = retry->value;
372 wdev->wiphy->retry_long = retry->value;
379 wdev->wiphy->retry_short = oshort;
380 wdev->wiphy->retry_long = olong;
392 struct wireless_dev *wdev = dev->ieee80211_ptr;
402 retry->value = wdev->wiphy->retry_short;
403 if (wdev->wiphy->retry_long == wdev->wiphy->retry_short)
411 retry->value = wdev->wiphy->retry_long;
423 struct wireless_dev *wdev = dev->ieee80211_ptr;
427 if (wdev->valid_links)
437 if (!wdev->wext.keys) {
438 wdev->wext.keys = kzalloc(sizeof(*wdev->wext.keys),
440 if (!wdev->wext.keys)
443 wdev->wext.keys->params[i].key =
444 wdev->wext.keys->data[i];
447 if (wdev->iftype != NL80211_IFTYPE_ADHOC &&
448 wdev->iftype != NL80211_IFTYPE_STATION)
452 if (!wdev->connected)
465 if (wdev->connected ||
466 (wdev->iftype == NL80211_IFTYPE_ADHOC &&
467 wdev->u.ibss.current_bss)) {
472 if (idx == wdev->wext.default_key &&
473 wdev->iftype == NL80211_IFTYPE_ADHOC) {
474 __cfg80211_leave_ibss(rdev, wdev->netdev, true);
485 wdev->wext.connect.privacy = false;
494 memset(wdev->wext.keys->data[idx], 0,
495 sizeof(wdev->wext.keys->data[idx]));
496 wdev->wext.keys->params[idx].key_len = 0;
497 wdev->wext.keys->params[idx].cipher = 0;
499 if (idx == wdev->wext.default_key)
500 wdev->wext.default_key = -1;
501 else if (idx == wdev->wext.default_mgmt_key)
502 wdev->wext.default_mgmt_key = -1;
506 err = cfg80211_ibss_wext_join(rdev, wdev);
518 if (wdev->connected ||
519 (wdev->iftype == NL80211_IFTYPE_ADHOC &&
520 wdev->u.ibss.current_bss))
535 wdev->wext.keys->params[idx] = *params;
536 memcpy(wdev->wext.keys->data[idx],
538 wdev->wext.keys->params[idx].key =
539 wdev->wext.keys->data[idx];
544 (tx_key || (!addr && wdev->wext.default_key == -1))) {
545 if (wdev->connected ||
546 (wdev->iftype == NL80211_IFTYPE_ADHOC &&
547 wdev->u.ibss.current_bss)) {
553 if (wdev->iftype == NL80211_IFTYPE_ADHOC &&
554 wdev->wext.default_key == -1) {
555 __cfg80211_leave_ibss(rdev, wdev->netdev, true);
562 wdev->wext.default_key = idx;
564 err = cfg80211_ibss_wext_join(rdev, wdev);
570 (tx_key || (!addr && wdev->wext.default_mgmt_key == -1))) {
571 if (wdev->connected ||
572 (wdev->iftype == NL80211_IFTYPE_ADHOC &&
573 wdev->u.ibss.current_bss))
576 wdev->wext.default_mgmt_key = idx;
603 struct wireless_dev *wdev = dev->ieee80211_ptr;
604 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
609 if (wdev->iftype != NL80211_IFTYPE_STATION &&
610 wdev->iftype != NL80211_IFTYPE_ADHOC)
620 if (wdev->valid_links) {
627 idx = wdev->wext.default_key;
642 wdev_lock(wdev);
643 if (wdev->connected ||
644 (wdev->iftype == NL80211_IFTYPE_ADHOC &&
645 wdev->u.ibss.current_bss))
649 wdev->wext.default_key = idx;
650 wdev_unlock(wdev);
667 wdev->wext.default_key == -1,
680 struct wireless_dev *wdev = dev->ieee80211_ptr;
681 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
690 if (wdev->iftype != NL80211_IFTYPE_STATION &&
691 wdev->iftype != NL80211_IFTYPE_ADHOC)
700 wdev_lock(wdev);
701 if (wdev->valid_links) {
702 wdev_unlock(wdev);
705 wdev_unlock(wdev);
739 idx = wdev->wext.default_mgmt_key;
746 idx = wdev->wext.default_key;
767 wiphy_lock(wdev->wiphy);
774 wiphy_unlock(wdev->wiphy);
784 struct wireless_dev *wdev = dev->ieee80211_ptr;
787 if (wdev->iftype != NL80211_IFTYPE_STATION &&
788 wdev->iftype != NL80211_IFTYPE_ADHOC)
793 idx = wdev->wext.default_key;
803 if (!wdev->wext.keys || !wdev->wext.keys->params[idx].cipher) {
810 wdev->wext.keys->params[idx].key_len);
811 memcpy(keybuf, wdev->wext.keys->params[idx].key, erq->length);
822 struct wireless_dev *wdev = dev->ieee80211_ptr;
823 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
831 switch (wdev->iftype) {
872 ret = cfg80211_set_mesh_channel(rdev, wdev, &chandef);
889 struct wireless_dev *wdev = dev->ieee80211_ptr;
890 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
895 switch (wdev->iftype) {
908 ret = rdev_get_channel(rdev, wdev, 0, &chandef);
929 struct wireless_dev *wdev = dev->ieee80211_ptr;
930 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
976 ret = rdev_set_tx_power(rdev, wdev, type, DBM_TO_MBM(dbm));
986 struct wireless_dev *wdev = dev->ieee80211_ptr;
987 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
999 err = rdev_get_tx_power(rdev, wdev, &val);
1013 static int cfg80211_set_auth_alg(struct wireless_dev *wdev,
1028 wdev->wext.connect.auth_type = NL80211_AUTHTYPE_OPEN_SYSTEM;
1033 wdev->wext.connect.auth_type = NL80211_AUTHTYPE_SHARED_KEY;
1038 wdev->wext.connect.auth_type = NL80211_AUTHTYPE_NETWORK_EAP;
1042 wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC;
1047 static int cfg80211_set_wpa_version(struct wireless_dev *wdev, u32 wpa_versions)
1060 wdev->wext.connect.crypto.wpa_versions &=
1064 wdev->wext.connect.crypto.wpa_versions |=
1068 wdev->wext.connect.crypto.wpa_versions |=
1074 static int cfg80211_set_cipher_group(struct wireless_dev *wdev, u32 cipher)
1077 wdev->wext.connect.crypto.cipher_group =
1080 wdev->wext.connect.crypto.cipher_group =
1083 wdev->wext.connect.crypto.cipher_group =
1086 wdev->wext.connect.crypto.cipher_group =
1089 wdev->wext.connect.crypto.cipher_group =
1092 wdev->wext.connect.crypto.cipher_group = 0;
1099 static int cfg80211_set_cipher_pairwise(struct wireless_dev *wdev, u32 cipher)
1102 u32 *ciphers_pairwise = wdev->wext.connect.crypto.ciphers_pairwise;
1131 wdev->wext.connect.crypto.n_ciphers_pairwise = nr_ciphers;
1137 static int cfg80211_set_key_mgt(struct wireless_dev *wdev, u32 key_mgt)
1146 wdev->wext.connect.crypto.akm_suites[nr_akm_suites] =
1152 wdev->wext.connect.crypto.akm_suites[nr_akm_suites] =
1157 wdev->wext.connect.crypto.n_akm_suites = nr_akm_suites;
1167 struct wireless_dev *wdev = dev->ieee80211_ptr;
1169 if (wdev->iftype != NL80211_IFTYPE_STATION)
1174 wdev->wext.connect.privacy = data->value;
1177 return cfg80211_set_wpa_version(wdev, data->value);
1179 return cfg80211_set_cipher_group(wdev, data->value);
1181 return cfg80211_set_key_mgt(wdev, data->value);
1183 return cfg80211_set_cipher_pairwise(wdev, data->value);
1185 return cfg80211_set_auth_alg(wdev, data->value);
1210 struct wireless_dev *wdev = dev->ieee80211_ptr;
1211 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1213 int timeout = wdev->ps_timeout;
1216 if (wdev->iftype != NL80211_IFTYPE_STATION)
1248 wdev->ps = ps;
1249 wdev->ps_timeout = timeout;
1260 struct wireless_dev *wdev = dev->ieee80211_ptr;
1262 wrq->disabled = !wdev->ps;
1272 struct wireless_dev *wdev = dev->ieee80211_ptr;
1273 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1296 sband = wdev->wiphy->bands[band];
1331 struct wireless_dev *wdev = dev->ieee80211_ptr;
1332 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1337 if (wdev->iftype != NL80211_IFTYPE_STATION)
1344 wdev_lock(wdev);
1345 if (!wdev->valid_links && wdev->links[0].client.current_bss)
1346 memcpy(addr, wdev->links[0].client.current_bss->pub.bssid,
1350 wdev_unlock(wdev);
1375 struct wireless_dev *wdev = dev->ieee80211_ptr;
1376 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1390 wdev_lock(wdev);
1391 if (wdev->valid_links || !wdev->links[0].client.current_bss) {
1392 wdev_unlock(wdev);
1395 memcpy(bssid, wdev->links[0].client.current_bss->pub.bssid, ETH_ALEN);
1396 wdev_unlock(wdev);
1455 struct wireless_dev *wdev = dev->ieee80211_ptr;
1456 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1460 switch (wdev->iftype) {
1481 struct wireless_dev *wdev = dev->ieee80211_ptr;
1482 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1486 switch (wdev->iftype) {
1507 struct wireless_dev *wdev = dev->ieee80211_ptr;
1508 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1512 switch (wdev->iftype) {
1533 struct wireless_dev *wdev = dev->ieee80211_ptr;
1534 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1541 switch (wdev->iftype) {
1561 struct wireless_dev *wdev = dev->ieee80211_ptr;
1562 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1569 if (wdev->iftype != NL80211_IFTYPE_STATION)