Lines Matching refs:drv
81 static int broadcom_ioctl(struct wpa_driver_broadcom_data *drv, int cmd, in broadcom_ioctl() argument
89 drv->ifname, cmd, len, buf); in broadcom_ioctl()
95 os_strncpy(ifr.ifr_name, drv->ifname, IFNAMSIZ); in broadcom_ioctl()
97 if ((ret = ioctl(drv->ioctl_sock, SIOCDEVPRIVATE, &ifr)) < 0) { in broadcom_ioctl()
109 struct wpa_driver_broadcom_data *drv = priv; in wpa_driver_broadcom_get_bssid() local
110 if (broadcom_ioctl(drv, WLC_GET_BSSID, bssid, ETH_ALEN) == 0) in wpa_driver_broadcom_get_bssid()
119 struct wpa_driver_broadcom_data *drv = priv; in wpa_driver_broadcom_get_ssid() local
122 if (broadcom_ioctl(drv, WLC_GET_SSID, &s, sizeof(s)) == -1) in wpa_driver_broadcom_get_ssid()
131 struct wpa_driver_broadcom_data *drv = priv; in wpa_driver_broadcom_set_wpa() local
136 if (broadcom_ioctl(drv, WLC_GET_WPA_AUTH, &wauth, sizeof(wauth)) == in wpa_driver_broadcom_set_wpa()
138 broadcom_ioctl(drv, WLC_GET_WSEC, &wsec, sizeof(wsec)) == -1) in wpa_driver_broadcom_set_wpa()
149 if (broadcom_ioctl(drv, WLC_SET_WPA_AUTH, &wauth, sizeof(wauth)) == in wpa_driver_broadcom_set_wpa()
151 broadcom_ioctl(drv, WLC_SET_WSEC, &wsec, sizeof(wsec)) == -1) in wpa_driver_broadcom_set_wpa()
155 broadcom_ioctl(drv, 122, &ea, sizeof(ea)); in wpa_driver_broadcom_set_wpa()
165 struct wpa_driver_broadcom_data *drv = priv; in wpa_driver_broadcom_set_key() local
214 ret = broadcom_ioctl(drv, WLC_SET_KEY, &wkt, sizeof(wkt)); in wpa_driver_broadcom_set_key()
217 broadcom_ioctl(drv, 121, &wkt.ea, sizeof(wkt.ea)); in wpa_driver_broadcom_set_key()
296 struct wpa_driver_broadcom_data *drv; in wpa_driver_broadcom_init() local
312 drv = os_zalloc(sizeof(*drv)); in wpa_driver_broadcom_init()
313 if (drv == NULL) in wpa_driver_broadcom_init()
315 drv->ctx = ctx; in wpa_driver_broadcom_init()
316 os_strncpy(drv->ifname, ifname, sizeof(drv->ifname)); in wpa_driver_broadcom_init()
317 drv->ioctl_sock = s; in wpa_driver_broadcom_init()
322 close(drv->ioctl_sock); in wpa_driver_broadcom_init()
323 os_free(drv); in wpa_driver_broadcom_init()
338 close(drv->ioctl_sock); in wpa_driver_broadcom_init()
339 os_free(drv); in wpa_driver_broadcom_init()
345 drv->event_sock = s; in wpa_driver_broadcom_init()
347 return drv; in wpa_driver_broadcom_init()
352 struct wpa_driver_broadcom_data *drv = priv; in wpa_driver_broadcom_deinit() local
353 eloop_cancel_timeout(wpa_driver_broadcom_scan_timeout, drv, drv->ctx); in wpa_driver_broadcom_deinit()
354 eloop_unregister_read_sock(drv->event_sock); in wpa_driver_broadcom_deinit()
355 close(drv->event_sock); in wpa_driver_broadcom_deinit()
356 close(drv->ioctl_sock); in wpa_driver_broadcom_deinit()
357 os_free(drv); in wpa_driver_broadcom_deinit()
364 struct wpa_driver_broadcom_data *drv = priv; in wpa_driver_broadcom_set_countermeasures()
366 return broadcom_ioctl(drv, WLC_SET_TKIP_COUNTERMEASURES, &enabled, in wpa_driver_broadcom_set_countermeasures()
375 struct wpa_driver_broadcom_data *drv = priv; in wpa_driver_broadcom_set_drop_unencrypted() local
379 if (broadcom_ioctl(drv, WLC_SET_WEP_RESTRICT, in wpa_driver_broadcom_set_drop_unencrypted()
381 broadcom_ioctl(drv, WLC_SET_EAP_RESTRICT, in wpa_driver_broadcom_set_drop_unencrypted()
398 struct wpa_driver_broadcom_data *drv = priv; in wpa_driver_broadcom_scan() local
406 if (broadcom_ioctl(drv, WLC_SCAN, &wst, sizeof(wst)) < 0) in wpa_driver_broadcom_scan()
409 eloop_cancel_timeout(wpa_driver_broadcom_scan_timeout, drv, drv->ctx); in wpa_driver_broadcom_scan()
410 eloop_register_timeout(3, 0, wpa_driver_broadcom_scan_timeout, drv, in wpa_driver_broadcom_scan()
411 drv->ctx); in wpa_driver_broadcom_scan()
434 struct wpa_driver_broadcom_data *drv = priv; in wpa_driver_broadcom_get_scan_results() local
450 if (broadcom_ioctl(drv, WLC_SCAN_RESULTS, buf, WLC_IOCTL_MAXLEN) < 0) { in wpa_driver_broadcom_get_scan_results()
501 struct wpa_driver_broadcom_data *drv = priv; in wpa_driver_broadcom_deauthenticate() local
506 return broadcom_ioctl(drv, WLC_DEAUTHENTICATE_WITH_REASON, &wdt, in wpa_driver_broadcom_deauthenticate()
513 struct wpa_driver_broadcom_data *drv = priv; in wpa_driver_broadcom_disassociate() local
514 return broadcom_ioctl(drv, WLC_DISASSOC, 0, 0); in wpa_driver_broadcom_disassociate()
521 struct wpa_driver_broadcom_data *drv = priv; in wpa_driver_broadcom_associate() local
570 if (broadcom_ioctl(drv, WLC_SET_WSEC, &wsec, sizeof(wsec)) < 0 || in wpa_driver_broadcom_associate()
571 broadcom_ioctl(drv, WLC_SET_WPA_AUTH, &wpa_auth, in wpa_driver_broadcom_associate()
573 broadcom_ioctl(drv, WLC_GET_WEP, &dummy, sizeof(dummy)) < 0 || in wpa_driver_broadcom_associate()
574 broadcom_ioctl(drv, WLC_SET_INFRA, &infra, sizeof(infra)) < 0 || in wpa_driver_broadcom_associate()
575 broadcom_ioctl(drv, WLC_SET_AUTH, &auth, sizeof(auth)) < 0 || in wpa_driver_broadcom_associate()
576 broadcom_ioctl(drv, WLC_SET_WEP, &wsec, sizeof(wsec)) < 0 || in wpa_driver_broadcom_associate()
577 broadcom_ioctl(drv, WLC_SET_SSID, &s, sizeof(s)) < 0) in wpa_driver_broadcom_associate()