nl80211: Fix off-channel Action frame TX from GO with use_monitor
authorJouni Malinen <j@w1.fi>
Sat, 28 Sep 2013 09:05:03 +0000 (12:05 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 28 Sep 2013 09:08:19 +0000 (12:08 +0300)
TX frequency gets lost when going through the monitor send MLME option
and this resulted in P2P operations like invitation from a GO failing
when the driver needs monitor socket, but would support offchannel TX.
Fix this by using frame_cmd path instead in case the monitor socket
would have been hit for action frame TX.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/drivers/driver_nl80211.c

index a6a410d..86a6046 100644 (file)
@@ -9326,7 +9326,10 @@ static int wpa_driver_nl80211_send_action(struct i802_bss *bss,
        os_memcpy(hdr->addr2, src, ETH_ALEN);
        os_memcpy(hdr->addr3, bssid, ETH_ALEN);
 
-       if (is_ap_interface(drv->nlmode))
+       if (is_ap_interface(drv->nlmode) &&
+           (!(drv->capa.flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX) ||
+            (int) freq == bss->freq || drv->device_ap_sme ||
+            !drv->use_monitor))
                ret = wpa_driver_nl80211_send_mlme(bss, buf, 24 + data_len,
                                                   0, freq, no_cck, 1,
                                                   wait_time);