diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2009-10-08 21:56:35 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:47:54 -0400 |
commit | 1922167b9de575d9d1a56be9b80f0fa3b22785f9 (patch) | |
tree | c97c48f93fd5ef307bca6f46c73ee0b289924f45 /drivers/net/wireless/wl12xx/wl1271_acx.c | |
parent | b771eee583343782c8b44d2b78cf53c29d0f3303 (diff) | |
download | lwn-1922167b9de575d9d1a56be9b80f0fa3b22785f9.tar.gz lwn-1922167b9de575d9d1a56be9b80f0fa3b22785f9.zip |
wl1271: Configure beacon filtering on if PSM used
Enable beacon filtering when PSM is enabled
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_acx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_acx.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.c b/drivers/net/wireless/wl12xx/wl1271_acx.c index 4b5fd94921c9..b9dfa094f049 100644 --- a/drivers/net/wireless/wl12xx/wl1271_acx.c +++ b/drivers/net/wireless/wl12xx/wl1271_acx.c @@ -386,7 +386,7 @@ out: return ret; } -int wl1271_acx_beacon_filter_opt(struct wl1271 *wl) +int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter) { struct acx_beacon_filter_option *beacon_filter; int ret; @@ -399,7 +399,7 @@ int wl1271_acx_beacon_filter_opt(struct wl1271 *wl) goto out; } - beacon_filter->enable = 0; + beacon_filter->enable = enable_filter; beacon_filter->max_num_beacons = 0; ret = wl1271_cmd_configure(wl, ACX_BEACON_FILTER_OPT, @@ -417,6 +417,7 @@ out: int wl1271_acx_beacon_filter_table(struct wl1271 *wl) { struct acx_beacon_filter_ie_table *ie_table; + int idx = 0; int ret; wl1271_debug(DEBUG_ACX, "acx beacon filter table"); @@ -427,8 +428,10 @@ int wl1271_acx_beacon_filter_table(struct wl1271 *wl) goto out; } - ie_table->num_ie = 0; - memset(ie_table->table, 0, BEACON_FILTER_TABLE_MAX_SIZE); + /* configure default beacon pass-through rules */ + ie_table->num_ie = 1; + ie_table->table[idx++] = BEACON_FILTER_IE_ID_CHANNEL_SWITCH_ANN; + ie_table->table[idx++] = BEACON_RULE_PASS_ON_APPEARANCE; ret = wl1271_cmd_configure(wl, ACX_BEACON_FILTER_TABLE, ie_table, sizeof(*ie_table)); |