aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2012-09-12 02:04:17 +0300
committerEyal Shapira <eyal@wizery.com>2012-09-13 03:18:37 +0300
commit7973c9ed86ff9694d4cb4fa81eeb5b6bf7267e64 (patch)
tree028e117110ea114e0598d694c30ee7ce87d2f4b2
parentd4ae515851ff23bb8d0e79ebf629fe88c40646f1 (diff)
downloadexternal_wpa_supplicant_8_ti-7973c9ed86ff9694d4cb4fa81eeb5b6bf7267e64.zip
external_wpa_supplicant_8_ti-7973c9ed86ff9694d4cb4fa81eeb5b6bf7267e64.tar.gz
external_wpa_supplicant_8_ti-7973c9ed86ff9694d4cb4fa81eeb5b6bf7267e64.tar.bz2
nl80211: make unicast RX filter always match STA iface mac (ANDROID)
This is part of changing the RX filters configuration to being global and not dependent on the interface context. RX filter #0 should point to a filter matching any unicast frame sent to the STA (wlan0) mac. The configuration is done by querying the mac address of the interface. As we now have reconfiguration of filters done from the context of the p2p interface filter #0 would get reconfigured with the P2P dev mac. Avoid this by hard coded querying for the mac of wlan0 when creating the pattern for RX filter #0. Signed-off-by: Eyal Shapira <eyal@wizery.com>
-rw-r--r--src/drivers/driver_nl80211.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e0bf84f..35a818f 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -8922,13 +8922,13 @@ static u8 *nl80211_rx_filter_get_pattern(struct rx_filter *filter, void *arg)
}
static int
-nl80211_self_filter_get_pattern_handler(u8 *buf, int buflen, void *arg)
+nl80211_sta_unicast_filter_get_pattern_handler(u8 *buf, int buflen, void *arg)
{
int ret;
struct i802_bss *bss = (struct i802_bss *)arg;
ret = linux_get_ifhwaddr(bss->drv->global->ioctl_sock,
- bss->ifname, buf);
+ "wlan0", buf);
if (ret) {
wpa_printf(MSG_ERROR, "Failed to get own HW addr (%d)", ret);
return -1;
@@ -8940,12 +8940,12 @@ nl80211_self_filter_get_pattern_handler(u8 *buf, int buflen, void *arg)
static struct rx_filter rx_filters[NUM_RX_FILTERS] = {
/* ID 0 */
- {.name = "self",
+ {.name = "sta_unicast",
.pattern = {},
.pattern_len = 6,
.mask = { BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) },
.mask_len = 1,
- .get_pattern_handler = nl80211_self_filter_get_pattern_handler,
+ .get_pattern_handler = nl80211_sta_unicast_filter_get_pattern_handler,
.action = NL80211_WOWLAN_ACTION_ALLOW,
},