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;
588 struct wireless_dev *wdev = dev->ieee80211_ptr;
589 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
594 if (wdev->iftype != NL80211_IFTYPE_STATION &&
595 wdev->iftype != NL80211_IFTYPE_ADHOC)
605 if (wdev->valid_links) {
612 idx = wdev->wext.default_key;
627 if (wdev->connected ||
628 (wdev->iftype == NL80211_IFTYPE_ADHOC &&
629 wdev->u.ibss.current_bss))
633 wdev->wext.default_key = idx;
650 wdev->wext.default_key == -1,
663 struct wireless_dev *wdev = dev->ieee80211_ptr;
664 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
673 if (wdev->iftype != NL80211_IFTYPE_STATION &&
674 wdev->iftype != NL80211_IFTYPE_ADHOC)
683 if (wdev->valid_links)
718 idx = wdev->wext.default_mgmt_key;
725 idx = wdev->wext.default_key;
746 wiphy_lock(wdev->wiphy);
753 wiphy_unlock(wdev->wiphy);
763 struct wireless_dev *wdev = dev->ieee80211_ptr;
766 if (wdev->iftype != NL80211_IFTYPE_STATION &&
767 wdev->iftype != NL80211_IFTYPE_ADHOC)
772 idx = wdev->wext.default_key;
782 if (!wdev->wext.keys || !wdev->wext.keys->params[idx].cipher) {
789 wdev->wext.keys->params[idx].key_len);
790 memcpy(keybuf, wdev->wext.keys->params[idx].key, erq->length);
801 struct wireless_dev *wdev = dev->ieee80211_ptr;
802 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
810 switch (wdev->iftype) {
851 ret = cfg80211_set_mesh_channel(rdev, wdev, &chandef);
868 struct wireless_dev *wdev = dev->ieee80211_ptr;
869 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
874 switch (wdev->iftype) {
887 ret = rdev_get_channel(rdev, wdev, 0, &chandef);
908 struct wireless_dev *wdev = dev->ieee80211_ptr;
909 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
955 ret = rdev_set_tx_power(rdev, wdev, type, DBM_TO_MBM(dbm));
965 struct wireless_dev *wdev = dev->ieee80211_ptr;
966 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
978 err = rdev_get_tx_power(rdev, wdev, &val);
992 static int cfg80211_set_auth_alg(struct wireless_dev *wdev,
1007 wdev->wext.connect.auth_type = NL80211_AUTHTYPE_OPEN_SYSTEM;
1012 wdev->wext.connect.auth_type = NL80211_AUTHTYPE_SHARED_KEY;
1017 wdev->wext.connect.auth_type = NL80211_AUTHTYPE_NETWORK_EAP;
1021 wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC;
1026 static int cfg80211_set_wpa_version(struct wireless_dev *wdev, u32 wpa_versions)
1039 wdev->wext.connect.crypto.wpa_versions &=
1043 wdev->wext.connect.crypto.wpa_versions |=
1047 wdev->wext.connect.crypto.wpa_versions |=
1053 static int cfg80211_set_cipher_group(struct wireless_dev *wdev, u32 cipher)
1056 wdev->wext.connect.crypto.cipher_group =
1059 wdev->wext.connect.crypto.cipher_group =
1062 wdev->wext.connect.crypto.cipher_group =
1065 wdev->wext.connect.crypto.cipher_group =
1068 wdev->wext.connect.crypto.cipher_group =
1071 wdev->wext.connect.crypto.cipher_group = 0;
1078 static int cfg80211_set_cipher_pairwise(struct wireless_dev *wdev, u32 cipher)
1081 u32 *ciphers_pairwise = wdev->wext.connect.crypto.ciphers_pairwise;
1110 wdev->wext.connect.crypto.n_ciphers_pairwise = nr_ciphers;
1116 static int cfg80211_set_key_mgt(struct wireless_dev *wdev, u32 key_mgt)
1125 wdev->wext.connect.crypto.akm_suites[nr_akm_suites] =
1131 wdev->wext.connect.crypto.akm_suites[nr_akm_suites] =
1136 wdev->wext.connect.crypto.n_akm_suites = nr_akm_suites;
1146 struct wireless_dev *wdev = dev->ieee80211_ptr;
1148 if (wdev->iftype != NL80211_IFTYPE_STATION)
1153 wdev->wext.connect.privacy = data->value;
1156 return cfg80211_set_wpa_version(wdev, data->value);
1158 return cfg80211_set_cipher_group(wdev, data->value);
1160 return cfg80211_set_key_mgt(wdev, data->value);
1162 return cfg80211_set_cipher_pairwise(wdev, data->value);
1164 return cfg80211_set_auth_alg(wdev, data->value);
1189 struct wireless_dev *wdev = dev->ieee80211_ptr;
1190 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1192 int timeout = wdev->ps_timeout;
1195 if (wdev->iftype != NL80211_IFTYPE_STATION)
1227 wdev->ps = ps;
1228 wdev->ps_timeout = timeout;
1239 struct wireless_dev *wdev = dev->ieee80211_ptr;
1241 wrq->disabled = !wdev->ps;
1251 struct wireless_dev *wdev = dev->ieee80211_ptr;
1252 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1275 sband = wdev->wiphy->bands[band];
1310 struct wireless_dev *wdev = dev->ieee80211_ptr;
1311 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1316 if (wdev->iftype != NL80211_IFTYPE_STATION)
1323 if (!wdev->valid_links && wdev->links[0].client.current_bss)
1324 memcpy(addr, wdev->links[0].client.current_bss->pub.bssid,
1352 struct wireless_dev *wdev = dev->ieee80211_ptr;
1353 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1368 if (wdev->valid_links || !wdev->links[0].client.current_bss) {
1372 memcpy(bssid, wdev->links[0].client.current_bss->pub.bssid, ETH_ALEN);
1430 struct wireless_dev *wdev = dev->ieee80211_ptr;
1431 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1435 switch (wdev->iftype) {
1456 struct wireless_dev *wdev = dev->ieee80211_ptr;
1457 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1461 switch (wdev->iftype) {
1482 struct wireless_dev *wdev = dev->ieee80211_ptr;
1483 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1487 switch (wdev->iftype) {
1508 struct wireless_dev *wdev = dev->ieee80211_ptr;
1509 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1516 switch (wdev->iftype) {
1536 struct wireless_dev *wdev = dev->ieee80211_ptr;
1537 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1544 if (wdev->iftype != NL80211_IFTYPE_STATION)