Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching refs:wpa_s

21 wpas_get_tx_interface(struct wpa_supplicant *wpa_s, const u8 *src)
25 if (os_memcmp(src, wpa_s->own_addr, ETH_ALEN) == 0)
26 return wpa_s;
31 iface = wpa_s->global->ifaces;
33 if (os_memcmp(wpa_s->pending_action_src,
41 iface->ifname, wpa_s->ifname);
45 return wpa_s;
51 struct wpa_supplicant *wpa_s = eloop_ctx;
56 without_roc = wpa_s->pending_action_without_roc;
57 wpa_s->pending_action_without_roc = 0;
60 without_roc, wpa_s->pending_action_tx);
62 if (wpa_s->pending_action_tx == NULL)
74 iface = wpas_get_tx_interface(wpa_s, wpa_s->pending_action_src);
76 if (wpa_s->off_channel_freq != wpa_s->pending_action_freq &&
77 wpa_s->pending_action_freq != 0 &&
78 wpa_s->pending_action_freq != iface->assoc_freq) {
82 wpa_s->pending_action_freq,
83 wpa_s->off_channel_freq,
85 if (without_roc && wpa_s->off_channel_freq == 0) {
94 wpa_s, wpa_s->pending_action_freq, 200) <
99 "TX", wpa_s->pending_action_freq);
101 wpa_s->off_channel_freq = 0;
102 wpa_s->roc_waiting_drv_freq =
103 wpa_s->pending_action_freq;
111 MAC2STR(wpa_s->pending_action_dst), iface->ifname);
112 res = wpa_drv_send_action(iface, wpa_s->pending_action_freq, 0,
113 wpa_s->pending_action_dst,
114 wpa_s->pending_action_src,
115 wpa_s->pending_action_bssid,
116 wpabuf_head(wpa_s->pending_action_tx),
117 wpabuf_len(wpa_s->pending_action_tx),
118 wpa_s->pending_action_no_cck);
127 wpa_s, wpa_s->pending_action_dst,
128 wpabuf_head(wpa_s->pending_action_tx),
129 wpabuf_len(wpa_s->pending_action_tx),
136 struct wpa_supplicant *wpa_s, const u8 *dst, const u8 *data,
139 if (wpa_s->pending_action_tx == NULL) {
145 if (os_memcmp(dst, wpa_s->pending_action_dst, ETH_ALEN) != 0) {
151 wpabuf_free(wpa_s->pending_action_tx);
152 wpa_s->pending_action_tx = NULL;
155 result, wpa_s->pending_action_tx_status_cb);
157 if (wpa_s->pending_action_tx_status_cb) {
158 wpa_s->pending_action_tx_status_cb(
159 wpa_s, wpa_s->pending_action_freq,
160 wpa_s->pending_action_dst, wpa_s->pending_action_src,
161 wpa_s->pending_action_bssid,
167 int offchannel_send_action(struct wpa_supplicant *wpa_s, unsigned int freq,
170 void (*tx_cb)(struct wpa_supplicant *wpa_s,
183 wpa_s->pending_action_tx_status_cb = tx_cb;
185 if (wpa_s->pending_action_tx) {
188 MAC2STR(wpa_s->pending_action_dst));
189 wpabuf_free(wpa_s->pending_action_tx);
191 wpa_s->pending_action_tx = wpabuf_alloc(len);
192 if (wpa_s->pending_action_tx == NULL) {
198 wpabuf_put_data(wpa_s->pending_action_tx, buf, len);
199 os_memcpy(wpa_s->pending_action_src, src, ETH_ALEN);
200 os_memcpy(wpa_s->pending_action_dst, dst, ETH_ALEN);
201 os_memcpy(wpa_s->pending_action_bssid, bssid, ETH_ALEN);
202 wpa_s->pending_action_freq = freq;
203 wpa_s->pending_action_no_cck = no_cck;
205 if (freq != 0 && wpa_s->drv_flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX) {
208 iface = wpas_get_tx_interface(wpa_s,
209 wpa_s->pending_action_src);
210 wpa_s->action_tx_wait_time = wait_time;
213 iface, wpa_s->pending_action_freq,
214 wait_time, wpa_s->pending_action_dst,
215 wpa_s->pending_action_src, wpa_s->pending_action_bssid,
216 wpabuf_head(wpa_s->pending_action_tx),
217 wpabuf_len(wpa_s->pending_action_tx),
218 wpa_s->pending_action_no_cck);
223 tx_iface = wpas_get_tx_interface(wpa_s, src);
232 if (wpa_s->off_channel_freq == freq || freq == 0) {
237 wpa_s->pending_action_without_roc = 1;
238 eloop_cancel_timeout(wpas_send_action_cb, wpa_s, NULL);
239 eloop_register_timeout(0, 0, wpas_send_action_cb, wpa_s, NULL);
242 wpa_s->pending_action_without_roc = 0;
244 if (wpa_s->roc_waiting_drv_freq == freq) {
254 if (wait_time > wpa_s->max_remain_on_chan)
255 wait_time = wpa_s->max_remain_on_chan;
256 if (wpa_drv_remain_on_channel(wpa_s, freq, wait_time) < 0) {
262 wpa_s->off_channel_freq = 0;
263 wpa_s->roc_waiting_drv_freq = freq;
269 void offchannel_send_action_done(struct wpa_supplicant *wpa_s)
273 wpabuf_free(wpa_s->pending_action_tx);
274 wpa_s->pending_action_tx = NULL;
275 if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX &&
276 wpa_s->action_tx_wait_time)
277 wpa_drv_send_action_cancel_wait(wpa_s);
279 if (wpa_s->off_channel_freq || wpa_s->roc_waiting_drv_freq) {
280 wpa_drv_cancel_remain_on_channel(wpa_s);
281 wpa_s->off_channel_freq = 0;
282 wpa_s->roc_waiting_drv_freq = 0;
287 void offchannel_remain_on_channel_cb(struct wpa_supplicant *wpa_s,
290 wpa_s->roc_waiting_drv_freq = 0;
291 wpa_s->off_channel_freq = freq;
292 wpas_send_action_cb(wpa_s, NULL);
296 void offchannel_cancel_remain_on_channel_cb(struct wpa_supplicant *wpa_s,
299 wpa_s->off_channel_freq = 0;
303 void offchannel_deinit(struct wpa_supplicant *wpa_s)
305 wpabuf_free(wpa_s->pending_action_tx);
306 wpa_s->pending_action_tx = NULL;
307 eloop_cancel_timeout(wpas_send_action_cb, wpa_s, NULL);