diff options
author | Arik Nemtsov <arik@wizery.com> | 2011-04-18 07:15:22 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-05-02 03:30:48 -0400 |
commit | 521a4a23261354885c01bf75b42150629004ed83 (patch) | |
tree | b0a1257438b87f7db8777fcddd1e1d5fe5a446a7 /drivers/net/wireless/wl12xx | |
parent | 5f704d180e448d05859e1cb6572822ba27dbcdc7 (diff) |
wl12xx: AP-mode - disable beacon filtering on start up
New AP-mode FWs filter external beacons by default. Disable this
filtering on start up so we can properly configure ERP protection.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r-- | drivers/net/wireless/wl12xx/acx.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/acx.h | 10 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/init.c | 8 |
3 files changed, 42 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c index 729f72a7b912..6860d7e9df70 100644 --- a/drivers/net/wireless/wl12xx/acx.c +++ b/drivers/net/wireless/wl12xx/acx.c | |||
@@ -1679,6 +1679,31 @@ out: | |||
1679 | return ret; | 1679 | return ret; |
1680 | } | 1680 | } |
1681 | 1681 | ||
1682 | int wl1271_acx_set_ap_beacon_filter(struct wl1271 *wl, bool enable) | ||
1683 | { | ||
1684 | struct acx_ap_beacon_filter *acx = NULL; | ||
1685 | int ret; | ||
1686 | |||
1687 | wl1271_debug(DEBUG_ACX, "acx set ap beacon filter: %d", enable); | ||
1688 | |||
1689 | acx = kzalloc(sizeof(*acx), GFP_KERNEL); | ||
1690 | if (!acx) | ||
1691 | return -ENOMEM; | ||
1692 | |||
1693 | acx->enable = enable ? 1 : 0; | ||
1694 | |||
1695 | ret = wl1271_cmd_configure(wl, ACX_AP_BEACON_FILTER_OPT, | ||
1696 | acx, sizeof(*acx)); | ||
1697 | if (ret < 0) { | ||
1698 | wl1271_warning("acx set ap beacon filter failed: %d", ret); | ||
1699 | goto out; | ||
1700 | } | ||
1701 | |||
1702 | out: | ||
1703 | kfree(acx); | ||
1704 | return ret; | ||
1705 | } | ||
1706 | |||
1682 | int wl1271_acx_fm_coex(struct wl1271 *wl) | 1707 | int wl1271_acx_fm_coex(struct wl1271 *wl) |
1683 | { | 1708 | { |
1684 | struct wl1271_acx_fm_coex *acx; | 1709 | struct wl1271_acx_fm_coex *acx; |
diff --git a/drivers/net/wireless/wl12xx/acx.h b/drivers/net/wireless/wl12xx/acx.h index 828367d62668..75338f9947cf 100644 --- a/drivers/net/wireless/wl12xx/acx.h +++ b/drivers/net/wireless/wl12xx/acx.h | |||
@@ -303,7 +303,6 @@ struct acx_beacon_filter_option { | |||
303 | struct acx_header header; | 303 | struct acx_header header; |
304 | 304 | ||
305 | u8 enable; | 305 | u8 enable; |
306 | |||
307 | /* | 306 | /* |
308 | * The number of beacons without the unicast TIM | 307 | * The number of beacons without the unicast TIM |
309 | * bit set that the firmware buffers before | 308 | * bit set that the firmware buffers before |
@@ -1188,6 +1187,13 @@ struct wl1271_acx_inconnection_sta { | |||
1188 | u8 padding1[2]; | 1187 | u8 padding1[2]; |
1189 | } __packed; | 1188 | } __packed; |
1190 | 1189 | ||
1190 | struct acx_ap_beacon_filter { | ||
1191 | struct acx_header header; | ||
1192 | |||
1193 | u8 enable; | ||
1194 | u8 pad[3]; | ||
1195 | } __packed; | ||
1196 | |||
1191 | /* | 1197 | /* |
1192 | * ACX_FM_COEX_CFG | 1198 | * ACX_FM_COEX_CFG |
1193 | * set the FM co-existence parameters. | 1199 | * set the FM co-existence parameters. |
@@ -1265,6 +1271,7 @@ enum { | |||
1265 | ACX_TID_CFG = 0x001A, | 1271 | ACX_TID_CFG = 0x001A, |
1266 | ACX_PS_RX_STREAMING = 0x001B, | 1272 | ACX_PS_RX_STREAMING = 0x001B, |
1267 | ACX_BEACON_FILTER_OPT = 0x001F, | 1273 | ACX_BEACON_FILTER_OPT = 0x001F, |
1274 | ACX_AP_BEACON_FILTER_OPT = 0x0020, | ||
1268 | ACX_NOISE_HIST = 0x0021, | 1275 | ACX_NOISE_HIST = 0x0021, |
1269 | ACX_HDK_VERSION = 0x0022, /* ??? */ | 1276 | ACX_HDK_VERSION = 0x0022, /* ??? */ |
1270 | ACX_PD_THRESHOLD = 0x0023, | 1277 | ACX_PD_THRESHOLD = 0x0023, |
@@ -1388,6 +1395,7 @@ int wl1271_acx_ap_max_tx_retry(struct wl1271 *wl); | |||
1388 | int wl1271_acx_sta_max_tx_retry(struct wl1271 *wl); | 1395 | int wl1271_acx_sta_max_tx_retry(struct wl1271 *wl); |
1389 | int wl1271_acx_config_ps(struct wl1271 *wl); | 1396 | int wl1271_acx_config_ps(struct wl1271 *wl); |
1390 | int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr); | 1397 | int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr); |
1398 | int wl1271_acx_set_ap_beacon_filter(struct wl1271 *wl, bool enable); | ||
1391 | int wl1271_acx_fm_coex(struct wl1271 *wl); | 1399 | int wl1271_acx_fm_coex(struct wl1271 *wl); |
1392 | 1400 | ||
1393 | #endif /* __WL1271_ACX_H__ */ | 1401 | #endif /* __WL1271_ACX_H__ */ |
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c index 060ca31818eb..e0de041e38f1 100644 --- a/drivers/net/wireless/wl12xx/init.c +++ b/drivers/net/wireless/wl12xx/init.c | |||
@@ -475,6 +475,14 @@ static int wl1271_ap_hw_init_post_mem(struct wl1271 *wl) | |||
475 | if (ret < 0) | 475 | if (ret < 0) |
476 | return ret; | 476 | return ret; |
477 | 477 | ||
478 | /* | ||
479 | * when operating as AP we want to receive external beacons for | ||
480 | * configuring ERP protection. | ||
481 | */ | ||
482 | ret = wl1271_acx_set_ap_beacon_filter(wl, false); | ||
483 | if (ret < 0) | ||
484 | return ret; | ||
485 | |||
478 | return 0; | 486 | return 0; |
479 | } | 487 | } |
480 | 488 | ||