Patchwork [18/18] driver_nl80211: listen to unexpected 4addr events

login
register
mail settings
Submitter Johannes Berg
Date Nov. 4, 2011, 10:38 a.m.
Message ID <20111104103813.284388240@sipsolutions.net>
Download mbox | patch
Permalink /patch/123603/
State Superseded
Headers show

Comments

Johannes Berg - Nov. 4, 2011, 10:38 a.m.
From: Johannes Berg <johannes.berg@intel.com>

Monitor-less AP mode had lost the ability to do
4addr WDS, this adds it back.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
---
 src/drivers/driver_nl80211.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index fd71620..82b9400 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -1977,8 +1977,8 @@  static void nl80211_client_probe_event(struct wpa_driver_nl80211_data *drv,
 }
 
 
-static void nl80211_spurious_class3_frame(struct i802_bss *bss,
-					  struct nlattr **tb)
+static void nl80211_spurious_frame(struct i802_bss *bss, struct nlattr **tb,
+				   int wds)
 {
 	struct wpa_driver_nl80211_data *drv = bss->drv;
 	union wpa_event_data event;
@@ -1993,6 +1993,7 @@  static void nl80211_spurious_class3_frame(struct i802_bss *bss,
 	os_memset(&event, 0, sizeof(event));
 	event.rx_from_unknown.bssid = bssid;
 	event.rx_from_unknown.addr = nla_data(tb[NL80211_ATTR_MAC]);
+	event.rx_from_unknown.wds = wds;
 
 	wpa_supplicant_event(drv->ctx, EVENT_RX_FROM_UNKNOWN, &event);
 }
@@ -2181,7 +2182,10 @@  static int process_bss_event(struct nl_msg *msg, void *arg)
 			   tb[NL80211_ATTR_COOKIE]);
 		break;
 	case NL80211_CMD_UNEXPECTED_FRAME:
-		nl80211_spurious_class3_frame(bss, tb);
+		nl80211_spurious_frame(bss, tb, 0);
+		break;
+	case NL80211_CMD_UNEXPECTED_4ADDR_FRAME:
+		nl80211_spurious_frame(bss, tb, 1);
 		break;
 	default:
 		wpa_printf(MSG_DEBUG, "nl80211: Ignored unknown event "