Lines Matching refs:drv
31 struct openbsd_driver_data *drv = priv;
36 os_strlcpy(ifr.ifr_name, drv->ifname, sizeof(ifr.ifr_name));
38 if (ioctl(drv->sock, SIOCG80211NWID, &ifr) < 0 ||
49 struct openbsd_driver_data *drv = priv;
52 os_strlcpy(id.i_name, drv->ifname, sizeof(id.i_name));
53 if (ioctl(drv->sock, SIOCG80211BSSID, &id) < 0)
75 struct openbsd_driver_data *drv = priv;
82 os_strlcpy(keyavail.i_name, drv->ifname, sizeof(keyavail.i_name));
87 if (ioctl(drv->sock, SIOCS80211KEYAVAIL, &keyavail) < 0)
96 struct openbsd_driver_data *drv;
98 drv = os_zalloc(sizeof(*drv));
99 if (drv == NULL)
102 drv->sock = socket(PF_INET, SOCK_DGRAM, 0);
103 if (drv->sock < 0)
106 drv->ctx = ctx;
107 os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname));
109 return drv;
112 os_free(drv);
120 struct openbsd_driver_data *drv = priv;
122 close(drv->sock);
123 os_free(drv);