]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Use wait_time with AP mode driver SME for offchannel
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 11 May 2012 15:24:31 +0000 (18:24 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 11 May 2012 15:24:31 +0000 (18:24 +0300)
When sending an offchannel frame (mainly, P2P Invitation Request), the
wait_time parameter was hardcoded to 0 for drivers that implement AP
mode SME. This is not correct and can cause problems for drivers that
support offloading of off-channel operations with driver/firmware based
AP SME.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/drivers/driver_nl80211.c

index 15f040774ebd7726c704928db149e6ab7619238f..693a8857b1425eafac9b8baeb70efdb0228c2586 100644 (file)
@@ -5217,7 +5217,9 @@ static int wpa_driver_nl80211_send_mlme_freq(struct i802_bss *bss,
        if (drv->device_ap_sme && is_ap_interface(drv->nlmode)) {
                if (freq == 0)
                        freq = bss->freq;
-               return nl80211_send_frame_cmd(bss, freq, 0,
+               return nl80211_send_frame_cmd(bss, freq,
+                                             (int) freq == bss->freq ? 0 :
+                                             wait_time,
                                              data, data_len,
                                              &drv->send_action_cookie,
                                              no_cck, noack, offchanok);