]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix send_mlme to use monitor interface only for AP interface
authorAjay Singh <ajay.kathat@microchip.com>
Tue, 13 Jul 2021 19:05:23 +0000 (19:05 +0000)
committerJouni Malinen <j@w1.fi>
Wed, 25 Aug 2021 13:20:17 +0000 (16:20 +0300)
Use monitor interface to send_mlme only when the interface is configured
in AP mode. In multiple interface setup, one interface can be configured
in AP mode using monitor interface and another interface in station
mode. The station interface may also require sending the management
frames without using monitor interface, e.g., support external SAE
authentication to send Authentication frames without monitor interface.
This change allows sending management frames to the driver for a station
interface where the AP interface uses monitor interface.

Additionally, the monitor interface is only valid for AP mode
(nl80211_create_monitor_interface() is called in nl80211_setup_ap) so
interface type check ensures to use monitor interface only when required
by the specific interface.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Peter Reen <peter.reen@microchip.com>
src/drivers/driver_nl80211.c

index 2aefa336cc95a95575977acaf8689bc496a06b1a..f04934454efac91e92c9f14eecde35d0090e7646 100644 (file)
@@ -4083,7 +4083,7 @@ static int wpa_driver_nl80211_send_mlme(struct i802_bss *bss, const u8 *data,
                freq = bss->freq;
        }
 
-       if (drv->use_monitor) {
+       if (drv->use_monitor && is_ap_interface(drv->nlmode)) {
                wpa_printf(MSG_DEBUG,
                           "nl80211: send_frame(freq=%u bss->freq=%u) -> send_monitor",
                           freq, bss->freq);