WNM: Minimal processing for WNM Notification Request frames on AP
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 22 Feb 2016 10:41:48 +0000 (12:41 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 22 Feb 2016 17:53:05 +0000 (19:53 +0200)
Write debug log entries on receiving WNM Notification Request frames.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/wnm_ap.c

index 0d52738..1cf84c6 100644 (file)
@@ -376,6 +376,27 @@ static void ieee802_11_rx_bss_trans_mgmt_resp(struct hostapd_data *hapd,
 }
 
 
+static void ieee802_11_rx_wnm_notification_req(struct hostapd_data *hapd,
+                                              const u8 *addr, const u8 *buf,
+                                              size_t len)
+{
+       u8 dialog_token, type;
+
+       if (len < 2)
+               return;
+       dialog_token = *buf++;
+       type = *buf++;
+       len -= 2;
+
+       wpa_printf(MSG_DEBUG,
+                  "WNM: Received WNM Notification Request frame from "
+                  MACSTR " (dialog_token=%u type=%u)",
+                  MAC2STR(addr), dialog_token, type);
+       wpa_hexdump(MSG_MSGDUMP, "WNM: Notification Request subelements",
+                   buf, len);
+}
+
+
 int ieee802_11_rx_wnm_action_ap(struct hostapd_data *hapd,
                                const struct ieee80211_mgmt *mgmt, size_t len)
 {
@@ -402,6 +423,10 @@ int ieee802_11_rx_wnm_action_ap(struct hostapd_data *hapd,
        case WNM_SLEEP_MODE_REQ:
                ieee802_11_rx_wnmsleep_req(hapd, mgmt->sa, payload, plen);
                return 0;
+       case WNM_NOTIFICATION_REQ:
+               ieee802_11_rx_wnm_notification_req(hapd, mgmt->sa, payload,
+                                                  plen);
+               return 0;
        }
 
        wpa_printf(MSG_DEBUG, "WNM: Unsupported WNM Action %u from " MACSTR,