diff options
author | Arik Nemtsov <arik@wizery.com> | 2010-10-16 12:45:07 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-01-24 15:11:48 -0500 |
commit | ae113b57826b40f1962a6e2417efd757b638e6a9 (patch) | |
tree | 1cb667e29cb3d21521afc9c8f304fcb83947fa3e /drivers | |
parent | e0fe371b74326a85029fe8720506e021fe73905a (diff) |
wl12xx: AP specific RX filter configuration
Set filters according to the mode of operation.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/boot.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/rx.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/rx.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl12xx.h | 13 |
5 files changed, 28 insertions, 8 deletions
diff --git a/drivers/net/wireless/wl12xx/boot.c b/drivers/net/wireless/wl12xx/boot.c index b504367f281..2b1019f67d2 100644 --- a/drivers/net/wireless/wl12xx/boot.c +++ b/drivers/net/wireless/wl12xx/boot.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "boot.h" | 28 | #include "boot.h" |
29 | #include "io.h" | 29 | #include "io.h" |
30 | #include "event.h" | 30 | #include "event.h" |
31 | #include "rx.h" | ||
31 | 32 | ||
32 | static struct wl1271_partition_set part_table[PART_TABLE_LEN] = { | 33 | static struct wl1271_partition_set part_table[PART_TABLE_LEN] = { |
33 | [PART_DOWN] = { | 34 | [PART_DOWN] = { |
@@ -598,8 +599,7 @@ int wl1271_boot(struct wl1271 *wl) | |||
598 | wl1271_boot_enable_interrupts(wl); | 599 | wl1271_boot_enable_interrupts(wl); |
599 | 600 | ||
600 | /* set the wl1271 default filters */ | 601 | /* set the wl1271 default filters */ |
601 | wl->rx_config = WL1271_DEFAULT_RX_CONFIG; | 602 | wl1271_set_default_filters(wl); |
602 | wl->rx_filter = WL1271_DEFAULT_RX_FILTER; | ||
603 | 603 | ||
604 | wl1271_event_mbox_config(wl); | 604 | wl1271_event_mbox_config(wl); |
605 | 605 | ||
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 67f6db4354f..d1075a5ac40 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -1227,8 +1227,7 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw, | |||
1227 | 1227 | ||
1228 | static void wl1271_configure_filters(struct wl1271 *wl, unsigned int filters) | 1228 | static void wl1271_configure_filters(struct wl1271 *wl, unsigned int filters) |
1229 | { | 1229 | { |
1230 | wl->rx_config = WL1271_DEFAULT_RX_CONFIG; | 1230 | wl1271_set_default_filters(wl); |
1231 | wl->rx_filter = WL1271_DEFAULT_RX_FILTER; | ||
1232 | 1231 | ||
1233 | /* combine requested filters with current filter config */ | 1232 | /* combine requested filters with current filter config */ |
1234 | filters = wl->filters | filters; | 1233 | filters = wl->filters | filters; |
@@ -2758,8 +2757,8 @@ struct ieee80211_hw *wl1271_alloc_hw(void) | |||
2758 | wl->beacon_int = WL1271_DEFAULT_BEACON_INT; | 2757 | wl->beacon_int = WL1271_DEFAULT_BEACON_INT; |
2759 | wl->default_key = 0; | 2758 | wl->default_key = 0; |
2760 | wl->rx_counter = 0; | 2759 | wl->rx_counter = 0; |
2761 | wl->rx_config = WL1271_DEFAULT_RX_CONFIG; | 2760 | wl->rx_config = WL1271_DEFAULT_STA_RX_CONFIG; |
2762 | wl->rx_filter = WL1271_DEFAULT_RX_FILTER; | 2761 | wl->rx_filter = WL1271_DEFAULT_STA_RX_FILTER; |
2763 | wl->psm_entry_retry = 0; | 2762 | wl->psm_entry_retry = 0; |
2764 | wl->power_level = WL1271_DEFAULT_POWER_LEVEL; | 2763 | wl->power_level = WL1271_DEFAULT_POWER_LEVEL; |
2765 | wl->basic_rate_set = CONF_TX_RATE_MASK_BASIC; | 2764 | wl->basic_rate_set = CONF_TX_RATE_MASK_BASIC; |
diff --git a/drivers/net/wireless/wl12xx/rx.c b/drivers/net/wireless/wl12xx/rx.c index c6402529eac..b0c6ddc2a94 100644 --- a/drivers/net/wireless/wl12xx/rx.c +++ b/drivers/net/wireless/wl12xx/rx.c | |||
@@ -200,3 +200,14 @@ void wl1271_rx(struct wl1271 *wl, struct wl1271_fw_status *status) | |||
200 | } | 200 | } |
201 | wl1271_write32(wl, RX_DRIVER_COUNTER_ADDRESS, wl->rx_counter); | 201 | wl1271_write32(wl, RX_DRIVER_COUNTER_ADDRESS, wl->rx_counter); |
202 | } | 202 | } |
203 | |||
204 | void wl1271_set_default_filters(struct wl1271 *wl) | ||
205 | { | ||
206 | if (wl->bss_type == BSS_TYPE_AP_BSS) { | ||
207 | wl->rx_config = WL1271_DEFAULT_AP_RX_CONFIG; | ||
208 | wl->rx_filter = WL1271_DEFAULT_AP_RX_FILTER; | ||
209 | } else { | ||
210 | wl->rx_config = WL1271_DEFAULT_STA_RX_CONFIG; | ||
211 | wl->rx_filter = WL1271_DEFAULT_STA_RX_FILTER; | ||
212 | } | ||
213 | } | ||
diff --git a/drivers/net/wireless/wl12xx/rx.h b/drivers/net/wireless/wl12xx/rx.h index 3abb26fe036..f695553f31e 100644 --- a/drivers/net/wireless/wl12xx/rx.h +++ b/drivers/net/wireless/wl12xx/rx.h | |||
@@ -117,5 +117,6 @@ struct wl1271_rx_descriptor { | |||
117 | 117 | ||
118 | void wl1271_rx(struct wl1271 *wl, struct wl1271_fw_status *status); | 118 | void wl1271_rx(struct wl1271 *wl, struct wl1271_fw_status *status); |
119 | u8 wl1271_rate_to_idx(int rate, enum ieee80211_band band); | 119 | u8 wl1271_rate_to_idx(int rate, enum ieee80211_band band); |
120 | void wl1271_set_default_filters(struct wl1271 *wl); | ||
120 | 121 | ||
121 | #endif | 122 | #endif |
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h index 340153f609c..4bbdb89f1bc 100644 --- a/drivers/net/wireless/wl12xx/wl12xx.h +++ b/drivers/net/wireless/wl12xx/wl12xx.h | |||
@@ -103,15 +103,24 @@ extern u32 wl12xx_debug_level; | |||
103 | true); \ | 103 | true); \ |
104 | } while (0) | 104 | } while (0) |
105 | 105 | ||
106 | #define WL1271_DEFAULT_RX_CONFIG (CFG_UNI_FILTER_EN | \ | 106 | #define WL1271_DEFAULT_STA_RX_CONFIG (CFG_UNI_FILTER_EN | \ |
107 | CFG_BSSID_FILTER_EN | \ | 107 | CFG_BSSID_FILTER_EN | \ |
108 | CFG_MC_FILTER_EN) | 108 | CFG_MC_FILTER_EN) |
109 | 109 | ||
110 | #define WL1271_DEFAULT_RX_FILTER (CFG_RX_RCTS_ACK | CFG_RX_PRSP_EN | \ | 110 | #define WL1271_DEFAULT_STA_RX_FILTER (CFG_RX_RCTS_ACK | CFG_RX_PRSP_EN | \ |
111 | CFG_RX_MGMT_EN | CFG_RX_DATA_EN | \ | 111 | CFG_RX_MGMT_EN | CFG_RX_DATA_EN | \ |
112 | CFG_RX_CTL_EN | CFG_RX_BCN_EN | \ | 112 | CFG_RX_CTL_EN | CFG_RX_BCN_EN | \ |
113 | CFG_RX_AUTH_EN | CFG_RX_ASSOC_EN) | 113 | CFG_RX_AUTH_EN | CFG_RX_ASSOC_EN) |
114 | 114 | ||
115 | #define WL1271_DEFAULT_AP_RX_CONFIG 0 | ||
116 | |||
117 | #define WL1271_DEFAULT_AP_RX_FILTER (CFG_RX_RCTS_ACK | CFG_RX_PREQ_EN | \ | ||
118 | CFG_RX_MGMT_EN | CFG_RX_DATA_EN | \ | ||
119 | CFG_RX_CTL_EN | CFG_RX_AUTH_EN | \ | ||
120 | CFG_RX_ASSOC_EN) | ||
121 | |||
122 | |||
123 | |||
115 | #define WL1271_FW_NAME "wl1271-fw.bin" | 124 | #define WL1271_FW_NAME "wl1271-fw.bin" |
116 | #define WL1271_NVS_NAME "wl1271-nvs.bin" | 125 | #define WL1271_NVS_NAME "wl1271-nvs.bin" |
117 | 126 | ||