Lines Matching refs:rdev
39 struct cfg80211_registered_device *rdev; in cfg80211_wext_siwmode() local
44 rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_siwmode()
66 ret = cfg80211_change_iface(rdev, dev, type, &vifparams); in cfg80211_wext_siwmode()
257 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_siwrts() local
261 wiphy_lock(&rdev->wiphy); in cfg80211_wext_siwrts()
271 err = rdev_set_wiphy_params(rdev, WIPHY_PARAM_RTS_THRESHOLD); in cfg80211_wext_siwrts()
277 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_siwrts()
301 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_siwfrag() local
305 wiphy_lock(&rdev->wiphy); in cfg80211_wext_siwfrag()
316 err = rdev_set_wiphy_params(rdev, WIPHY_PARAM_FRAG_THRESHOLD); in cfg80211_wext_siwfrag()
320 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_siwfrag()
345 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_siwretry() local
355 wiphy_lock(&rdev->wiphy); in cfg80211_wext_siwretry()
369 err = rdev_set_wiphy_params(rdev, changed); in cfg80211_wext_siwretry()
374 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_siwretry()
409 static int __cfg80211_set_encryption(struct cfg80211_registered_device *rdev, in __cfg80211_set_encryption() argument
446 if (!rdev->ops->set_default_mgmt_key) in __cfg80211_set_encryption()
465 __cfg80211_leave_ibss(rdev, wdev->netdev, true); in __cfg80211_set_encryption()
470 !(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN)) in __cfg80211_set_encryption()
473 err = rdev_del_key(rdev, dev, -1, idx, pairwise, in __cfg80211_set_encryption()
497 err = cfg80211_ibss_wext_join(rdev, wdev); in __cfg80211_set_encryption()
505 if (cfg80211_validate_key_settings(rdev, params, idx, pairwise, addr)) in __cfg80211_set_encryption()
512 err = rdev_add_key(rdev, dev, -1, idx, pairwise, addr, params); in __cfg80211_set_encryption()
546 __cfg80211_leave_ibss(rdev, wdev->netdev, true); in __cfg80211_set_encryption()
549 err = rdev_set_default_key(rdev, dev, -1, idx, true, in __cfg80211_set_encryption()
555 err = cfg80211_ibss_wext_join(rdev, wdev); in __cfg80211_set_encryption()
565 err = rdev_set_default_mgmt_key(rdev, dev, -1, idx); in __cfg80211_set_encryption()
574 static int cfg80211_set_encryption(struct cfg80211_registered_device *rdev, in cfg80211_set_encryption() argument
582 err = __cfg80211_set_encryption(rdev, dev, pairwise, addr, in cfg80211_set_encryption()
594 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_siwencode() local
604 if (!rdev->ops->del_key || in cfg80211_wext_siwencode()
605 !rdev->ops->add_key || in cfg80211_wext_siwencode()
606 !rdev->ops->set_default_key) in cfg80211_wext_siwencode()
609 wiphy_lock(&rdev->wiphy); in cfg80211_wext_siwencode()
636 err = rdev_set_default_key(rdev, dev, -1, idx, true, in cfg80211_wext_siwencode()
656 err = cfg80211_set_encryption(rdev, dev, false, NULL, remove, in cfg80211_wext_siwencode()
660 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_siwencode()
670 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_siwencodeext() local
684 if (!rdev->ops->del_key || in cfg80211_wext_siwencodeext()
685 !rdev->ops->add_key || in cfg80211_wext_siwencodeext()
686 !rdev->ops->set_default_key) in cfg80211_wext_siwencodeext()
758 rdev, dev, in cfg80211_wext_siwencodeext()
810 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_siwfreq() local
816 wiphy_lock(&rdev->wiphy); in cfg80211_wext_siwfreq()
836 chandef.chan = ieee80211_get_channel(&rdev->wiphy, freq); in cfg80211_wext_siwfreq()
841 ret = cfg80211_set_monitor_channel(rdev, &chandef); in cfg80211_wext_siwfreq()
854 chandef.chan = ieee80211_get_channel(&rdev->wiphy, freq); in cfg80211_wext_siwfreq()
859 ret = cfg80211_set_mesh_channel(rdev, wdev, &chandef); in cfg80211_wext_siwfreq()
866 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_siwfreq()
876 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_giwfreq() local
880 wiphy_lock(&rdev->wiphy); in cfg80211_wext_giwfreq()
889 if (!rdev->ops->get_channel) { in cfg80211_wext_giwfreq()
894 ret = rdev_get_channel(rdev, wdev, 0, &chandef); in cfg80211_wext_giwfreq()
906 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_giwfreq()
916 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_siwtxpower() local
926 if (!rdev->ops->set_tx_power) in cfg80211_wext_siwtxpower()
931 rfkill_set_sw_state(rdev->wiphy.rfkill, false); in cfg80211_wext_siwtxpower()
956 if (rfkill_set_sw_state(rdev->wiphy.rfkill, true)) in cfg80211_wext_siwtxpower()
957 schedule_work(&rdev->rfkill_block); in cfg80211_wext_siwtxpower()
961 wiphy_lock(&rdev->wiphy); in cfg80211_wext_siwtxpower()
962 ret = rdev_set_tx_power(rdev, wdev, type, DBM_TO_MBM(dbm)); in cfg80211_wext_siwtxpower()
963 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_siwtxpower()
973 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_giwtxpower() local
981 if (!rdev->ops->get_tx_power) in cfg80211_wext_giwtxpower()
984 wiphy_lock(&rdev->wiphy); in cfg80211_wext_giwtxpower()
985 err = rdev_get_tx_power(rdev, wdev, &val); in cfg80211_wext_giwtxpower()
986 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_giwtxpower()
992 data->txpower.disabled = rfkill_blocked(rdev->wiphy.rfkill); in cfg80211_wext_giwtxpower()
1195 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_siwpower() local
1203 if (!rdev->ops->set_power_mgmt) in cfg80211_wext_siwpower()
1226 wiphy_lock(&rdev->wiphy); in cfg80211_wext_siwpower()
1227 err = rdev_set_power_mgmt(rdev, dev, ps, timeout); in cfg80211_wext_siwpower()
1228 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_siwpower()
1255 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_siwrate() local
1262 if (!rdev->ops->set_bitrate_mask) in cfg80211_wext_siwrate()
1298 wiphy_lock(&rdev->wiphy); in cfg80211_wext_siwrate()
1302 ret = rdev_set_bitrate_mask(rdev, dev, 0, NULL, &mask); in cfg80211_wext_siwrate()
1303 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_siwrate()
1313 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_giwrate() local
1321 if (!rdev->ops->get_station) in cfg80211_wext_giwrate()
1335 wiphy_lock(&rdev->wiphy); in cfg80211_wext_giwrate()
1336 err = rdev_get_station(rdev, dev, addr, &sinfo); in cfg80211_wext_giwrate()
1337 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_giwrate()
1357 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wireless_stats() local
1367 if (!rdev->ops->get_station) in cfg80211_wireless_stats()
1381 wiphy_lock(&rdev->wiphy); in cfg80211_wireless_stats()
1382 ret = rdev_get_station(rdev, dev, bssid, &sinfo); in cfg80211_wireless_stats()
1383 wiphy_unlock(&rdev->wiphy); in cfg80211_wireless_stats()
1390 switch (rdev->wiphy.signal_type) { in cfg80211_wireless_stats()
1436 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_siwap() local
1439 wiphy_lock(&rdev->wiphy); in cfg80211_wext_siwap()
1451 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_siwap()
1461 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_giwap() local
1464 wiphy_lock(&rdev->wiphy); in cfg80211_wext_giwap()
1476 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_giwap()
1486 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_siwessid() local
1489 wiphy_lock(&rdev->wiphy); in cfg80211_wext_siwessid()
1501 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_siwessid()
1511 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_giwessid() local
1517 wiphy_lock(&rdev->wiphy); in cfg80211_wext_giwessid()
1529 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_giwessid()
1539 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_wext_siwpmksa() local
1552 wiphy_lock(&rdev->wiphy); in cfg80211_wext_siwpmksa()
1555 if (!rdev->ops->set_pmksa) { in cfg80211_wext_siwpmksa()
1560 ret = rdev_set_pmksa(rdev, dev, &cfg_pmksa); in cfg80211_wext_siwpmksa()
1563 if (!rdev->ops->del_pmksa) { in cfg80211_wext_siwpmksa()
1568 ret = rdev_del_pmksa(rdev, dev, &cfg_pmksa); in cfg80211_wext_siwpmksa()
1571 if (!rdev->ops->flush_pmksa) { in cfg80211_wext_siwpmksa()
1576 ret = rdev_flush_pmksa(rdev, dev); in cfg80211_wext_siwpmksa()
1582 wiphy_unlock(&rdev->wiphy); in cfg80211_wext_siwpmksa()