Lines Matching refs:iwr
45 struct iwreq iwr; in wpa_driver_wext_set_auth_param() local
48 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_set_auth_param()
49 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_set_auth_param()
50 iwr.u.param.flags = idx & IW_AUTH_INDEX; in wpa_driver_wext_set_auth_param()
51 iwr.u.param.value = value; in wpa_driver_wext_set_auth_param()
53 if (ioctl(drv->ioctl_sock, SIOCSIWAUTH, &iwr) < 0) { in wpa_driver_wext_set_auth_param()
75 struct iwreq iwr; in wpa_driver_wext_get_bssid() local
78 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_get_bssid()
79 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_get_bssid()
81 if (ioctl(drv->ioctl_sock, SIOCGIWAP, &iwr) < 0) { in wpa_driver_wext_get_bssid()
85 os_memcpy(bssid, iwr.u.ap_addr.sa_data, ETH_ALEN); in wpa_driver_wext_get_bssid()
100 struct iwreq iwr; in wpa_driver_wext_set_bssid() local
103 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_set_bssid()
104 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_set_bssid()
105 iwr.u.ap_addr.sa_family = ARPHRD_ETHER; in wpa_driver_wext_set_bssid()
107 os_memcpy(iwr.u.ap_addr.sa_data, bssid, ETH_ALEN); in wpa_driver_wext_set_bssid()
109 os_memset(iwr.u.ap_addr.sa_data, 0, ETH_ALEN); in wpa_driver_wext_set_bssid()
111 if (ioctl(drv->ioctl_sock, SIOCSIWAP, &iwr) < 0) { in wpa_driver_wext_set_bssid()
129 struct iwreq iwr; in wpa_driver_wext_get_ssid() local
132 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_get_ssid()
133 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_get_ssid()
134 iwr.u.essid.pointer = (caddr_t) ssid; in wpa_driver_wext_get_ssid()
135 iwr.u.essid.length = SSID_MAX_LEN; in wpa_driver_wext_get_ssid()
137 if (ioctl(drv->ioctl_sock, SIOCGIWESSID, &iwr) < 0) { in wpa_driver_wext_get_ssid()
142 ret = iwr.u.essid.length; in wpa_driver_wext_get_ssid()
168 struct iwreq iwr; in wpa_driver_wext_set_ssid() local
175 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_set_ssid()
176 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_set_ssid()
178 iwr.u.essid.flags = (ssid_len != 0); in wpa_driver_wext_set_ssid()
181 iwr.u.essid.pointer = (caddr_t) buf; in wpa_driver_wext_set_ssid()
194 iwr.u.essid.length = ssid_len; in wpa_driver_wext_set_ssid()
196 if (ioctl(drv->ioctl_sock, SIOCSIWESSID, &iwr) < 0) { in wpa_driver_wext_set_ssid()
215 struct iwreq iwr; in wpa_driver_wext_set_freq() local
218 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_set_freq()
219 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_set_freq()
220 iwr.u.freq.m = freq * 100000; in wpa_driver_wext_set_freq()
221 iwr.u.freq.e = 1; in wpa_driver_wext_set_freq()
223 if (ioctl(drv->ioctl_sock, SIOCSIWFREQ, &iwr) < 0) { in wpa_driver_wext_set_freq()
1086 struct iwreq iwr; in wpa_driver_wext_scan() local
1098 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_scan()
1099 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_scan()
1107 iwr.u.data.pointer = (caddr_t) &req; in wpa_driver_wext_scan()
1108 iwr.u.data.length = sizeof(req); in wpa_driver_wext_scan()
1109 iwr.u.data.flags = IW_SCAN_THIS_ESSID; in wpa_driver_wext_scan()
1112 if (ioctl(drv->ioctl_sock, SIOCSIWSCAN, &iwr) < 0) { in wpa_driver_wext_scan()
1142 struct iwreq iwr; in wpa_driver_wext_giwscan() local
1151 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_giwscan()
1152 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_giwscan()
1153 iwr.u.data.pointer = res_buf; in wpa_driver_wext_giwscan()
1154 iwr.u.data.length = res_buf_len; in wpa_driver_wext_giwscan()
1156 if (ioctl(drv->ioctl_sock, SIOCGIWSCAN, &iwr) == 0) in wpa_driver_wext_giwscan()
1176 if (iwr.u.data.length > res_buf_len) { in wpa_driver_wext_giwscan()
1180 *len = iwr.u.data.length; in wpa_driver_wext_giwscan()
1599 struct iwreq iwr; in wpa_driver_wext_get_range() local
1612 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_get_range()
1613 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_get_range()
1614 iwr.u.data.pointer = (caddr_t) range; in wpa_driver_wext_get_range()
1615 iwr.u.data.length = buflen; in wpa_driver_wext_get_range()
1620 if (ioctl(drv->ioctl_sock, SIOCGIWRANGE, &iwr) < 0) { in wpa_driver_wext_get_range()
1625 } else if (iwr.u.data.length >= minlen && in wpa_driver_wext_get_range()
1677 struct iwreq iwr; in wpa_driver_wext_set_psk() local
1688 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_set_psk()
1689 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_set_psk()
1695 iwr.u.encoding.pointer = (caddr_t) ext; in wpa_driver_wext_set_psk()
1696 iwr.u.encoding.length = sizeof(*ext) + PMK_LEN; in wpa_driver_wext_set_psk()
1701 ret = ioctl(drv->ioctl_sock, SIOCSIWENCODEEXT, &iwr); in wpa_driver_wext_set_psk()
1718 struct iwreq iwr; in wpa_driver_wext_set_key_ext() local
1731 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_set_key_ext()
1732 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_set_key_ext()
1733 iwr.u.encoding.flags = key_idx + 1; in wpa_driver_wext_set_key_ext()
1734 iwr.u.encoding.flags |= IW_ENCODE_TEMP; in wpa_driver_wext_set_key_ext()
1736 iwr.u.encoding.flags |= IW_ENCODE_DISABLED; in wpa_driver_wext_set_key_ext()
1737 iwr.u.encoding.pointer = (caddr_t) ext; in wpa_driver_wext_set_key_ext()
1738 iwr.u.encoding.length = sizeof(*ext) + key_len; in wpa_driver_wext_set_key_ext()
1787 if (ioctl(drv->ioctl_sock, SIOCSIWENCODEEXT, &iwr) < 0) { in wpa_driver_wext_set_key_ext()
1837 struct iwreq iwr; in wpa_driver_wext_set_key() local
1861 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_set_key()
1862 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_set_key()
1863 iwr.u.encoding.flags = key_idx + 1; in wpa_driver_wext_set_key()
1864 iwr.u.encoding.flags |= IW_ENCODE_TEMP; in wpa_driver_wext_set_key()
1866 iwr.u.encoding.flags |= IW_ENCODE_DISABLED; in wpa_driver_wext_set_key()
1867 iwr.u.encoding.pointer = (caddr_t) key; in wpa_driver_wext_set_key()
1868 iwr.u.encoding.length = key_len; in wpa_driver_wext_set_key()
1870 if (ioctl(drv->ioctl_sock, SIOCSIWENCODE, &iwr) < 0) { in wpa_driver_wext_set_key()
1877 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_set_key()
1878 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_set_key()
1879 iwr.u.encoding.flags = key_idx + 1; in wpa_driver_wext_set_key()
1880 iwr.u.encoding.flags |= IW_ENCODE_TEMP; in wpa_driver_wext_set_key()
1881 iwr.u.encoding.pointer = (caddr_t) NULL; in wpa_driver_wext_set_key()
1882 iwr.u.encoding.length = 0; in wpa_driver_wext_set_key()
1883 if (ioctl(drv->ioctl_sock, SIOCSIWENCODE, &iwr) < 0) { in wpa_driver_wext_set_key()
1920 struct iwreq iwr; in wpa_driver_wext_mlme() local
1924 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_mlme()
1925 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_mlme()
1931 iwr.u.data.pointer = (caddr_t) &mlme; in wpa_driver_wext_mlme()
1932 iwr.u.data.length = sizeof(mlme); in wpa_driver_wext_mlme()
1934 if (ioctl(drv->ioctl_sock, SIOCSIWMLME, &iwr) < 0) { in wpa_driver_wext_mlme()
1946 struct iwreq iwr; in wpa_driver_wext_disconnect() local
1956 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_disconnect()
1957 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_disconnect()
1958 if (ioctl(drv->ioctl_sock, SIOCGIWMODE, &iwr) < 0) { in wpa_driver_wext_disconnect()
1961 iwr.u.mode = IW_MODE_INFRA; in wpa_driver_wext_disconnect()
1964 if (iwr.u.mode == IW_MODE_INFRA) { in wpa_driver_wext_disconnect()
2016 struct iwreq iwr; in wpa_driver_wext_set_gen_ie() local
2019 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_set_gen_ie()
2020 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_set_gen_ie()
2021 iwr.u.data.pointer = (caddr_t) ie; in wpa_driver_wext_set_gen_ie()
2022 iwr.u.data.length = ie_len; in wpa_driver_wext_set_gen_ie()
2024 if (ioctl(drv->ioctl_sock, SIOCSIWGENIE, &iwr) < 0) { in wpa_driver_wext_set_gen_ie()
2071 struct iwreq iwr; in wpa_driver_wext_auth_alg_fallback() local
2077 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_auth_alg_fallback()
2078 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_auth_alg_fallback()
2080 iwr.u.encoding.flags = 0; in wpa_driver_wext_auth_alg_fallback()
2081 iwr.u.encoding.pointer = (caddr_t) NULL; in wpa_driver_wext_auth_alg_fallback()
2082 iwr.u.encoding.length = 0; in wpa_driver_wext_auth_alg_fallback()
2094 iwr.u.encoding.flags |= IW_ENCODE_DISABLED; in wpa_driver_wext_auth_alg_fallback()
2097 iwr.u.encoding.flags |= IW_ENCODE_OPEN; in wpa_driver_wext_auth_alg_fallback()
2099 iwr.u.encoding.flags |= IW_ENCODE_RESTRICTED; in wpa_driver_wext_auth_alg_fallback()
2102 if (ioctl(drv->ioctl_sock, SIOCSIWENCODE, &iwr) < 0) { in wpa_driver_wext_auth_alg_fallback()
2268 struct iwreq iwr; in wpa_driver_wext_set_mode() local
2272 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_set_mode()
2273 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_set_mode()
2274 iwr.u.mode = new_mode; in wpa_driver_wext_set_mode()
2275 if (ioctl(drv->ioctl_sock, SIOCSIWMODE, &iwr) == 0) { in wpa_driver_wext_set_mode()
2290 if (ioctl(drv->ioctl_sock, SIOCGIWMODE, &iwr) < 0) { in wpa_driver_wext_set_mode()
2296 if (iwr.u.mode == new_mode) { in wpa_driver_wext_set_mode()
2303 iwr.u.mode = new_mode; in wpa_driver_wext_set_mode()
2304 if (ioctl(drv->ioctl_sock, SIOCSIWMODE, &iwr) < 0) in wpa_driver_wext_set_mode()
2321 struct iwreq iwr; in wpa_driver_wext_pmksa() local
2325 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_pmksa()
2326 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_pmksa()
2334 iwr.u.data.pointer = (caddr_t) &pmksa; in wpa_driver_wext_pmksa()
2335 iwr.u.data.length = sizeof(pmksa); in wpa_driver_wext_pmksa()
2337 if (ioctl(drv->ioctl_sock, SIOCSIWPMKSA, &iwr) < 0) { in wpa_driver_wext_pmksa()
2431 struct iwreq iwr; in wpa_driver_wext_signal_poll() local
2438 os_memset(&iwr, 0, sizeof(iwr)); in wpa_driver_wext_signal_poll()
2439 os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); in wpa_driver_wext_signal_poll()
2440 iwr.u.data.pointer = (caddr_t) &stats; in wpa_driver_wext_signal_poll()
2441 iwr.u.data.length = sizeof(stats); in wpa_driver_wext_signal_poll()
2442 iwr.u.data.flags = 1; in wpa_driver_wext_signal_poll()
2444 if (ioctl(drv->ioctl_sock, SIOCGIWSTATS, &iwr) < 0) { in wpa_driver_wext_signal_poll()