aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-08-14 06:17:04 -0400
committerLuciano Coelho <coelho@ti.com>2011-08-22 05:35:23 -0400
commit08c1d1c7042330e2280a7718be4ad88c2e8f8268 (patch)
tree249c70f0aded5e11940742eb7549a2956852b9f6 /drivers
parentdbe25cb5eb04b0ffdad582a93f9fe9edd0ed791b (diff)
wl12xx: remove rx filtering stuff
The new fw doesn't support rx_filtering configuration (as a stand-alone command. the rx filtering is done automatically according to the active role). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/wl12xx/acx.c28
-rw-r--r--drivers/net/wireless/wl12xx/acx.h118
-rw-r--r--drivers/net/wireless/wl12xx/boot.c3
-rw-r--r--drivers/net/wireless/wl12xx/cmd.c4
-rw-r--r--drivers/net/wireless/wl12xx/debugfs.c3
-rw-r--r--drivers/net/wireless/wl12xx/init.c12
-rw-r--r--drivers/net/wireless/wl12xx/io.h1
-rw-r--r--drivers/net/wireless/wl12xx/main.c62
-rw-r--r--drivers/net/wireless/wl12xx/reg.h75
-rw-r--r--drivers/net/wireless/wl12xx/rx.c11
-rw-r--r--drivers/net/wireless/wl12xx/rx.h1
-rw-r--r--drivers/net/wireless/wl12xx/scan.c3
-rw-r--r--drivers/net/wireless/wl12xx/tx.c4
-rw-r--r--drivers/net/wireless/wl12xx/wl12xx.h22
14 files changed, 8 insertions, 339 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c
index 7e33f1f4f3d4..6447a0969ffe 100644
--- a/drivers/net/wireless/wl12xx/acx.c
+++ b/drivers/net/wireless/wl12xx/acx.c
@@ -183,34 +183,6 @@ out:
183 return ret; 183 return ret;
184} 184}
185 185
186int wl1271_acx_rx_config(struct wl1271 *wl, u32 config, u32 filter)
187{
188 struct acx_rx_config *rx_config;
189 int ret;
190
191 wl1271_debug(DEBUG_ACX, "acx rx config");
192
193 rx_config = kzalloc(sizeof(*rx_config), GFP_KERNEL);
194 if (!rx_config) {
195 ret = -ENOMEM;
196 goto out;
197 }
198
199 rx_config->config_options = cpu_to_le32(config);
200 rx_config->filter_options = cpu_to_le32(filter);
201
202 ret = wl1271_cmd_configure(wl, ACX_RX_CFG,
203 rx_config, sizeof(*rx_config));
204 if (ret < 0) {
205 wl1271_warning("failed to set rx config: %d", ret);
206 goto out;
207 }
208
209out:
210 kfree(rx_config);
211 return ret;
212}
213
214int wl1271_acx_pd_threshold(struct wl1271 *wl) 186int wl1271_acx_pd_threshold(struct wl1271 *wl)
215{ 187{
216 struct acx_packet_detection *pd; 188 struct acx_packet_detection *pd;
diff --git a/drivers/net/wireless/wl12xx/acx.h b/drivers/net/wireless/wl12xx/acx.h
index d2eb86eccc04..4ae0085c58ea 100644
--- a/drivers/net/wireless/wl12xx/acx.h
+++ b/drivers/net/wireless/wl12xx/acx.h
@@ -160,94 +160,6 @@ struct acx_rx_msdu_lifetime {
160 __le32 lifetime; 160 __le32 lifetime;
161} __packed; 161} __packed;
162 162
163/*
164 * RX Config Options Table
165 * Bit Definition
166 * === ==========
167 * 31:14 Reserved
168 * 13 Copy RX Status - when set, write three receive status words
169 * to top of rx'd MPDUs.
170 * When cleared, do not write three status words (added rev 1.5)
171 * 12 Reserved
172 * 11 RX Complete upon FCS error - when set, give rx complete
173 * interrupt for FCS errors, after the rx filtering, e.g. unicast
174 * frames not to us with FCS error will not generate an interrupt.
175 * 10 SSID Filter Enable - When set, the WiLink discards all beacon,
176 * probe request, and probe response frames with an SSID that does
177 * not match the SSID specified by the host in the START/JOIN
178 * command.
179 * When clear, the WiLink receives frames with any SSID.
180 * 9 Broadcast Filter Enable - When set, the WiLink discards all
181 * broadcast frames. When clear, the WiLink receives all received
182 * broadcast frames.
183 * 8:6 Reserved
184 * 5 BSSID Filter Enable - When set, the WiLink discards any frames
185 * with a BSSID that does not match the BSSID specified by the
186 * host.
187 * When clear, the WiLink receives frames from any BSSID.
188 * 4 MAC Addr Filter - When set, the WiLink discards any frames
189 * with a destination address that does not match the MAC address
190 * of the adaptor.
191 * When clear, the WiLink receives frames destined to any MAC
192 * address.
193 * 3 Promiscuous - When set, the WiLink receives all valid frames
194 * (i.e., all frames that pass the FCS check).
195 * When clear, only frames that pass the other filters specified
196 * are received.
197 * 2 FCS - When set, the WiLink includes the FCS with the received
198 * frame.
199 * When cleared, the FCS is discarded.
200 * 1 PLCP header - When set, write all data from baseband to frame
201 * buffer including PHY header.
202 * 0 Reserved - Always equal to 0.
203 *
204 * RX Filter Options Table
205 * Bit Definition
206 * === ==========
207 * 31:12 Reserved - Always equal to 0.
208 * 11 Association - When set, the WiLink receives all association
209 * related frames (association request/response, reassocation
210 * request/response, and disassociation). When clear, these frames
211 * are discarded.
212 * 10 Auth/De auth - When set, the WiLink receives all authentication
213 * and de-authentication frames. When clear, these frames are
214 * discarded.
215 * 9 Beacon - When set, the WiLink receives all beacon frames.
216 * When clear, these frames are discarded.
217 * 8 Contention Free - When set, the WiLink receives all contention
218 * free frames.
219 * When clear, these frames are discarded.
220 * 7 Control - When set, the WiLink receives all control frames.
221 * When clear, these frames are discarded.
222 * 6 Data - When set, the WiLink receives all data frames.
223 * When clear, these frames are discarded.
224 * 5 FCS Error - When set, the WiLink receives frames that have FCS
225 * errors.
226 * When clear, these frames are discarded.
227 * 4 Management - When set, the WiLink receives all management
228 * frames.
229 * When clear, these frames are discarded.
230 * 3 Probe Request - When set, the WiLink receives all probe request
231 * frames.
232 * When clear, these frames are discarded.
233 * 2 Probe Response - When set, the WiLink receives all probe
234 * response frames.
235 * When clear, these frames are discarded.
236 * 1 RTS/CTS/ACK - When set, the WiLink receives all RTS, CTS and ACK
237 * frames.
238 * When clear, these frames are discarded.
239 * 0 Rsvd Type/Sub Type - When set, the WiLink receives all frames
240 * that have reserved frame types and sub types as defined by the
241 * 802.11 specification.
242 * When clear, these frames are discarded.
243 */
244struct acx_rx_config {
245 struct acx_header header;
246
247 __le32 config_options;
248 __le32 filter_options;
249} __packed;
250
251struct acx_packet_detection { 163struct acx_packet_detection {
252 struct acx_header header; 164 struct acx_header header;
253 165
@@ -424,35 +336,6 @@ struct acx_event_mask {
424 __le32 high_event_mask; /* Unused */ 336 __le32 high_event_mask; /* Unused */
425} __packed; 337} __packed;
426 338
427#define CFG_RX_FCS BIT(2)
428#define CFG_RX_ALL_GOOD BIT(3)
429#define CFG_UNI_FILTER_EN BIT(4)
430#define CFG_BSSID_FILTER_EN BIT(5)
431#define CFG_MC_FILTER_EN BIT(6)
432#define CFG_MC_ADDR0_EN BIT(7)
433#define CFG_MC_ADDR1_EN BIT(8)
434#define CFG_BC_REJECT_EN BIT(9)
435#define CFG_SSID_FILTER_EN BIT(10)
436#define CFG_RX_INT_FCS_ERROR BIT(11)
437#define CFG_RX_INT_ENCRYPTED BIT(12)
438#define CFG_RX_WR_RX_STATUS BIT(13)
439#define CFG_RX_FILTER_NULTI BIT(14)
440#define CFG_RX_RESERVE BIT(15)
441#define CFG_RX_TIMESTAMP_TSF BIT(16)
442
443#define CFG_RX_RSV_EN BIT(0)
444#define CFG_RX_RCTS_ACK BIT(1)
445#define CFG_RX_PRSP_EN BIT(2)
446#define CFG_RX_PREQ_EN BIT(3)
447#define CFG_RX_MGMT_EN BIT(4)
448#define CFG_RX_FCS_ERROR BIT(5)
449#define CFG_RX_DATA_EN BIT(6)
450#define CFG_RX_CTL_EN BIT(7)
451#define CFG_RX_CF_EN BIT(8)
452#define CFG_RX_BCN_EN BIT(9)
453#define CFG_RX_AUTH_EN BIT(10)
454#define CFG_RX_ASSOC_EN BIT(11)
455
456#define SCAN_PASSIVE BIT(0) 339#define SCAN_PASSIVE BIT(0)
457#define SCAN_5GHZ_BAND BIT(1) 340#define SCAN_5GHZ_BAND BIT(1)
458#define SCAN_TRIGGERED BIT(2) 341#define SCAN_TRIGGERED BIT(2)
@@ -1342,7 +1225,6 @@ int wl1271_acx_feature_cfg(struct wl1271 *wl);
1342int wl1271_acx_mem_map(struct wl1271 *wl, 1225int wl1271_acx_mem_map(struct wl1271 *wl,
1343 struct acx_header *mem_map, size_t len); 1226 struct acx_header *mem_map, size_t len);
1344int wl1271_acx_rx_msdu_life_time(struct wl1271 *wl); 1227int wl1271_acx_rx_msdu_life_time(struct wl1271 *wl);
1345int wl1271_acx_rx_config(struct wl1271 *wl, u32 config, u32 filter);
1346int wl1271_acx_pd_threshold(struct wl1271 *wl); 1228int wl1271_acx_pd_threshold(struct wl1271 *wl);
1347int wl1271_acx_slot(struct wl1271 *wl, enum acx_slot_type slot_time); 1229int wl1271_acx_slot(struct wl1271 *wl, enum acx_slot_type slot_time);
1348int wl1271_acx_group_address_tbl(struct wl1271 *wl, bool enable, 1230int wl1271_acx_group_address_tbl(struct wl1271 *wl, bool enable,
diff --git a/drivers/net/wireless/wl12xx/boot.c b/drivers/net/wireless/wl12xx/boot.c
index 930a638523fb..41791ffd26ea 100644
--- a/drivers/net/wireless/wl12xx/boot.c
+++ b/drivers/net/wireless/wl12xx/boot.c
@@ -845,9 +845,6 @@ int wl1271_boot(struct wl1271 *wl)
845 /* Enable firmware interrupts now */ 845 /* Enable firmware interrupts now */
846 wl1271_boot_enable_interrupts(wl); 846 wl1271_boot_enable_interrupts(wl);
847 847
848 /* set the wl1271 default filters */
849 wl1271_set_default_filters(wl);
850
851 wl1271_event_mbox_config(wl); 848 wl1271_event_mbox_config(wl);
852 849
853out: 850out:
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c
index 97dd237a9580..b6ef65a57b71 100644
--- a/drivers/net/wireless/wl12xx/cmd.c
+++ b/drivers/net/wireless/wl12xx/cmd.c
@@ -382,8 +382,6 @@ int wl1271_cmd_join(struct wl1271 *wl, u8 bss_type)
382 for (i = 0; i < ETH_ALEN; i++) 382 for (i = 0; i < ETH_ALEN; i++)
383 bssid[i] = wl->bssid[ETH_ALEN - i - 1]; 383 bssid[i] = wl->bssid[ETH_ALEN - i - 1];
384 384
385 join->rx_config_options = cpu_to_le32(wl->rx_config);
386 join->rx_filter_options = cpu_to_le32(wl->rx_filter);
387 join->bss_type = bss_type; 385 join->bss_type = bss_type;
388 join->basic_rate_set = cpu_to_le32(wl->basic_rate_set); 386 join->basic_rate_set = cpu_to_le32(wl->basic_rate_set);
389 join->supported_rate_set = cpu_to_le32(wl->rate_set); 387 join->supported_rate_set = cpu_to_le32(wl->rate_set);
@@ -1004,8 +1002,6 @@ int wl1271_cmd_disconnect(struct wl1271 *wl)
1004 goto out; 1002 goto out;
1005 } 1003 }
1006 1004
1007 cmd->rx_config_options = cpu_to_le32(wl->rx_config);
1008 cmd->rx_filter_options = cpu_to_le32(wl->rx_filter);
1009 /* disconnect reason is not used in immediate disconnections */ 1005 /* disconnect reason is not used in immediate disconnections */
1010 cmd->type = DISCONNECT_IMMEDIATE; 1006 cmd->type = DISCONNECT_IMMEDIATE;
1011 1007
diff --git a/drivers/net/wireless/wl12xx/debugfs.c b/drivers/net/wireless/wl12xx/debugfs.c
index 3b5f240d7031..fd1c301be7c7 100644
--- a/drivers/net/wireless/wl12xx/debugfs.c
+++ b/drivers/net/wireless/wl12xx/debugfs.c
@@ -366,9 +366,6 @@ static ssize_t driver_state_read(struct file *file, char __user *user_buf,
366 DRIVER_STATE_PRINT_INT(beacon_int); 366 DRIVER_STATE_PRINT_INT(beacon_int);
367 DRIVER_STATE_PRINT_INT(psm_entry_retry); 367 DRIVER_STATE_PRINT_INT(psm_entry_retry);
368 DRIVER_STATE_PRINT_INT(ps_poll_failures); 368 DRIVER_STATE_PRINT_INT(ps_poll_failures);
369 DRIVER_STATE_PRINT_HEX(filters);
370 DRIVER_STATE_PRINT_HEX(rx_config);
371 DRIVER_STATE_PRINT_HEX(rx_filter);
372 DRIVER_STATE_PRINT_INT(power_level); 369 DRIVER_STATE_PRINT_INT(power_level);
373 DRIVER_STATE_PRINT_INT(rssi_thold); 370 DRIVER_STATE_PRINT_INT(rssi_thold);
374 DRIVER_STATE_PRINT_INT(last_rssi_event); 371 DRIVER_STATE_PRINT_INT(last_rssi_event);
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c
index c3e9a2e4410e..44cd515a057e 100644
--- a/drivers/net/wireless/wl12xx/init.c
+++ b/drivers/net/wireless/wl12xx/init.c
@@ -227,7 +227,7 @@ static int wl1271_ap_init_templates_config(struct wl1271 *wl)
227 return 0; 227 return 0;
228} 228}
229 229
230static int wl1271_init_rx_config(struct wl1271 *wl, u32 config, u32 filter) 230static int wl12xx_init_rx_config(struct wl1271 *wl)
231{ 231{
232 int ret; 232 int ret;
233 233
@@ -235,10 +235,6 @@ static int wl1271_init_rx_config(struct wl1271 *wl, u32 config, u32 filter)
235 if (ret < 0) 235 if (ret < 0)
236 return ret; 236 return ret;
237 237
238 ret = wl1271_acx_rx_config(wl, config, filter);
239 if (ret < 0)
240 return ret;
241
242 return 0; 238 return 0;
243} 239}
244 240
@@ -650,11 +646,7 @@ int wl1271_hw_init(struct wl1271 *wl)
650 return ret; 646 return ret;
651 647
652 /* RX config */ 648 /* RX config */
653 ret = wl1271_init_rx_config(wl, 649 ret = wl12xx_init_rx_config(wl);
654 RX_CFG_PROMISCUOUS | RX_CFG_TSF,
655 RX_FILTER_OPTION_DEF);
656 /* RX_CONFIG_OPTION_ANY_DST_ANY_BSS,
657 RX_FILTER_OPTION_FILTER_ALL); */
658 if (ret < 0) 650 if (ret < 0)
659 goto out_free_memmap; 651 goto out_free_memmap;
660 652
diff --git a/drivers/net/wireless/wl12xx/io.h b/drivers/net/wireless/wl12xx/io.h
index a2fe4f506ada..e839341dfafe 100644
--- a/drivers/net/wireless/wl12xx/io.h
+++ b/drivers/net/wireless/wl12xx/io.h
@@ -186,6 +186,5 @@ int wl1271_free_hw(struct wl1271 *wl);
186irqreturn_t wl1271_irq(int irq, void *data); 186irqreturn_t wl1271_irq(int irq, void *data);
187bool wl1271_set_block_size(struct wl1271 *wl); 187bool wl1271_set_block_size(struct wl1271 *wl);
188int wl1271_tx_dummy_packet(struct wl1271 *wl); 188int wl1271_tx_dummy_packet(struct wl1271 *wl);
189void wl1271_configure_filters(struct wl1271 *wl, unsigned int filters);
190 189
191#endif 190#endif
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 4fa760230ac7..7fcdfa3ee1db 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1991,7 +1991,6 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl,
1991 wl->session_counter = 0; 1991 wl->session_counter = 0;
1992 wl->rate_set = CONF_TX_RATE_MASK_BASIC; 1992 wl->rate_set = CONF_TX_RATE_MASK_BASIC;
1993 wl->vif = NULL; 1993 wl->vif = NULL;
1994 wl->filters = 0;
1995 wl1271_free_ap_keys(wl); 1994 wl1271_free_ap_keys(wl);
1996 memset(wl->ap_hlid_map, 0, sizeof(wl->ap_hlid_map)); 1995 memset(wl->ap_hlid_map, 0, sizeof(wl->ap_hlid_map));
1997 wl->ap_fw_ps_map = 0; 1996 wl->ap_fw_ps_map = 0;
@@ -2037,39 +2036,6 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw,
2037 cancel_work_sync(&wl->recovery_work); 2036 cancel_work_sync(&wl->recovery_work);
2038} 2037}
2039 2038
2040void wl1271_configure_filters(struct wl1271 *wl, unsigned int filters)
2041{
2042 wl1271_set_default_filters(wl);
2043
2044 /* combine requested filters with current filter config */
2045 filters = wl->filters | filters;
2046
2047 wl1271_debug(DEBUG_FILTERS, "RX filters set: ");
2048
2049 if (filters & FIF_PROMISC_IN_BSS) {
2050 wl1271_debug(DEBUG_FILTERS, " - FIF_PROMISC_IN_BSS");
2051 wl->rx_config &= ~CFG_UNI_FILTER_EN;
2052 wl->rx_config |= CFG_BSSID_FILTER_EN;
2053 }
2054 if (filters & FIF_BCN_PRBRESP_PROMISC) {
2055 wl1271_debug(DEBUG_FILTERS, " - FIF_BCN_PRBRESP_PROMISC");
2056 wl->rx_config &= ~CFG_BSSID_FILTER_EN;
2057 wl->rx_config &= ~CFG_SSID_FILTER_EN;
2058 }
2059 if (filters & FIF_OTHER_BSS) {
2060 wl1271_debug(DEBUG_FILTERS, " - FIF_OTHER_BSS");
2061 wl->rx_config &= ~CFG_BSSID_FILTER_EN;
2062 }
2063 if (filters & FIF_CONTROL) {
2064 wl1271_debug(DEBUG_FILTERS, " - FIF_CONTROL");
2065 wl->rx_filter |= CFG_RX_CTL_EN;
2066 }
2067 if (filters & FIF_FCSFAIL) {
2068 wl1271_debug(DEBUG_FILTERS, " - FIF_FCSFAIL");
2069 wl->rx_filter |= CFG_RX_FCS_ERROR;
2070 }
2071}
2072
2073static int wl1271_dummy_join(struct wl1271 *wl) 2039static int wl1271_dummy_join(struct wl1271 *wl)
2074{ 2040{
2075 int ret = 0; 2041 int ret = 0;
@@ -2079,9 +2045,6 @@ static int wl1271_dummy_join(struct wl1271 *wl)
2079 2045
2080 memcpy(wl->bssid, dummy_bssid, ETH_ALEN); 2046 memcpy(wl->bssid, dummy_bssid, ETH_ALEN);
2081 2047
2082 /* pass through frames from all BSS */
2083 wl1271_configure_filters(wl, FIF_OTHER_BSS);
2084
2085 ret = wl1271_cmd_join(wl, wl->set_bss_type); 2048 ret = wl1271_cmd_join(wl, wl->set_bss_type);
2086 if (ret < 0) 2049 if (ret < 0)
2087 goto out; 2050 goto out;
@@ -2163,9 +2126,6 @@ static int wl1271_unjoin(struct wl1271 *wl)
2163 wl->tx_security_last_seq_lsb = 0; 2126 wl->tx_security_last_seq_lsb = 0;
2164 wl->tx_security_seq = 0; 2127 wl->tx_security_seq = 0;
2165 2128
2166 /* stop filtering packets based on bssid */
2167 wl1271_configure_filters(wl, FIF_OTHER_BSS);
2168
2169out: 2129out:
2170 return ret; 2130 return ret;
2171} 2131}
@@ -2434,18 +2394,11 @@ static void wl1271_op_configure_filter(struct ieee80211_hw *hw,
2434 goto out_sleep; 2394 goto out_sleep;
2435 } 2395 }
2436 2396
2437 /* determine, whether supported filter values have changed */ 2397 /*
2438 if (changed == 0) 2398 * the fw doesn't provide an api to configure the filters. instead,
2439 goto out_sleep; 2399 * the filters configuration is based on the active roles / ROC
2440 2400 * state.
2441 /* configure filters */ 2401 */
2442 wl->filters = *total;
2443 wl1271_configure_filters(wl, 0);
2444
2445 /* apply configured filters */
2446 ret = wl1271_acx_rx_config(wl, wl->rx_config, wl->rx_filter);
2447 if (ret < 0)
2448 goto out_sleep;
2449 2402
2450out_sleep: 2403out_sleep:
2451 wl1271_ps_elp_sleep(wl); 2404 wl1271_ps_elp_sleep(wl);
@@ -3168,9 +3121,6 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
3168 if (ret < 0) 3121 if (ret < 0)
3169 goto out; 3122 goto out;
3170 3123
3171 /* filter out all packets not from this BSSID */
3172 wl1271_configure_filters(wl, 0);
3173
3174 /* Need to update the BSSID (for filtering etc) */ 3124 /* Need to update the BSSID (for filtering etc) */
3175 do_join = true; 3125 do_join = true;
3176 } 3126 }
@@ -4363,8 +4313,6 @@ struct ieee80211_hw *wl1271_alloc_hw(void)
4363 wl->beacon_int = WL1271_DEFAULT_BEACON_INT; 4313 wl->beacon_int = WL1271_DEFAULT_BEACON_INT;
4364 wl->default_key = 0; 4314 wl->default_key = 0;
4365 wl->rx_counter = 0; 4315 wl->rx_counter = 0;
4366 wl->rx_config = WL1271_DEFAULT_STA_RX_CONFIG;
4367 wl->rx_filter = WL1271_DEFAULT_STA_RX_FILTER;
4368 wl->psm_entry_retry = 0; 4316 wl->psm_entry_retry = 0;
4369 wl->power_level = WL1271_DEFAULT_POWER_LEVEL; 4317 wl->power_level = WL1271_DEFAULT_POWER_LEVEL;
4370 wl->basic_rate_set = CONF_TX_RATE_MASK_BASIC; 4318 wl->basic_rate_set = CONF_TX_RATE_MASK_BASIC;
diff --git a/drivers/net/wireless/wl12xx/reg.h b/drivers/net/wireless/wl12xx/reg.h
index 440a4ee9cb42..3f570f397586 100644
--- a/drivers/net/wireless/wl12xx/reg.h
+++ b/drivers/net/wireless/wl12xx/reg.h
@@ -296,81 +296,6 @@
296 ===============================================*/ 296 ===============================================*/
297#define REG_EVENT_MAILBOX_PTR (SCR_PAD1) 297#define REG_EVENT_MAILBOX_PTR (SCR_PAD1)
298 298
299
300/* Misc */
301
302#define REG_ENABLE_TX_RX (ENABLE)
303/*
304 * Rx configuration (filter) information element
305 * ---------------------------------------------
306 */
307#define REG_RX_CONFIG (RX_CFG)
308#define REG_RX_FILTER (RX_FILTER_CFG)
309
310
311#define RX_CFG_ENABLE_PHY_HEADER_PLCP 0x0002
312
313/* promiscuous - receives all valid frames */
314#define RX_CFG_PROMISCUOUS 0x0008
315
316/* receives frames from any BSSID */
317#define RX_CFG_BSSID 0x0020
318
319/* receives frames destined to any MAC address */
320#define RX_CFG_MAC 0x0010
321
322#define RX_CFG_ENABLE_ONLY_MY_DEST_MAC 0x0010
323#define RX_CFG_ENABLE_ANY_DEST_MAC 0x0000
324#define RX_CFG_ENABLE_ONLY_MY_BSSID 0x0020
325#define RX_CFG_ENABLE_ANY_BSSID 0x0000
326
327/* discards all broadcast frames */
328#define RX_CFG_DISABLE_BCAST 0x0200
329
330#define RX_CFG_ENABLE_ONLY_MY_SSID 0x0400
331#define RX_CFG_ENABLE_RX_CMPLT_FCS_ERROR 0x0800
332#define RX_CFG_COPY_RX_STATUS 0x2000
333#define RX_CFG_TSF 0x10000
334
335#define RX_CONFIG_OPTION_ANY_DST_MY_BSS (RX_CFG_ENABLE_ANY_DEST_MAC | \
336 RX_CFG_ENABLE_ONLY_MY_BSSID)
337
338#define RX_CONFIG_OPTION_MY_DST_ANY_BSS (RX_CFG_ENABLE_ONLY_MY_DEST_MAC\
339 | RX_CFG_ENABLE_ANY_BSSID)
340
341#define RX_CONFIG_OPTION_ANY_DST_ANY_BSS (RX_CFG_ENABLE_ANY_DEST_MAC | \
342 RX_CFG_ENABLE_ANY_BSSID)
343
344#define RX_CONFIG_OPTION_MY_DST_MY_BSS (RX_CFG_ENABLE_ONLY_MY_DEST_MAC\
345 | RX_CFG_ENABLE_ONLY_MY_BSSID)
346
347#define RX_CONFIG_OPTION_FOR_SCAN (RX_CFG_ENABLE_PHY_HEADER_PLCP \
348 | RX_CFG_ENABLE_RX_CMPLT_FCS_ERROR \
349 | RX_CFG_COPY_RX_STATUS | RX_CFG_TSF)
350
351#define RX_CONFIG_OPTION_FOR_MEASUREMENT (RX_CFG_ENABLE_ANY_DEST_MAC)
352
353#define RX_CONFIG_OPTION_FOR_JOIN (RX_CFG_ENABLE_ONLY_MY_BSSID | \
354 RX_CFG_ENABLE_ONLY_MY_DEST_MAC)
355
356#define RX_CONFIG_OPTION_FOR_IBSS_JOIN (RX_CFG_ENABLE_ONLY_MY_SSID | \
357 RX_CFG_ENABLE_ONLY_MY_DEST_MAC)
358
359#define RX_FILTER_OPTION_DEF (CFG_RX_MGMT_EN | CFG_RX_DATA_EN\
360 | CFG_RX_CTL_EN | CFG_RX_BCN_EN\
361 | CFG_RX_AUTH_EN | CFG_RX_ASSOC_EN)
362
363#define RX_FILTER_OPTION_FILTER_ALL 0
364
365#define RX_FILTER_OPTION_DEF_PRSP_BCN (CFG_RX_PRSP_EN | CFG_RX_MGMT_EN\
366 | CFG_RX_RCTS_ACK | CFG_RX_BCN_EN)
367
368#define RX_FILTER_OPTION_JOIN (CFG_RX_MGMT_EN | CFG_RX_DATA_EN\
369 | CFG_RX_BCN_EN | CFG_RX_AUTH_EN\
370 | CFG_RX_ASSOC_EN | CFG_RX_RCTS_ACK\
371 | CFG_RX_PRSP_EN)
372
373
374/*=============================================== 299/*===============================================
375 EEPROM Read/Write Request 32bit RW 300 EEPROM Read/Write Request 32bit RW
376 ------------------------------------------ 301 ------------------------------------------
diff --git a/drivers/net/wireless/wl12xx/rx.c b/drivers/net/wireless/wl12xx/rx.c
index 46f4af6ca723..7a0c5fe294b2 100644
--- a/drivers/net/wireless/wl12xx/rx.c
+++ b/drivers/net/wireless/wl12xx/rx.c
@@ -283,14 +283,3 @@ void wl1271_rx(struct wl1271 *wl, struct wl1271_fw_common_status *status)
283 jiffies + msecs_to_jiffies(timeout)); 283 jiffies + msecs_to_jiffies(timeout));
284 } 284 }
285} 285}
286
287void wl1271_set_default_filters(struct wl1271 *wl)
288{
289 if (wl->bss_type == BSS_TYPE_AP_BSS) {
290 wl->rx_config = WL1271_DEFAULT_AP_RX_CONFIG;
291 wl->rx_filter = WL1271_DEFAULT_AP_RX_FILTER;
292 } else {
293 wl->rx_config = WL1271_DEFAULT_STA_RX_CONFIG;
294 wl->rx_filter = WL1271_DEFAULT_STA_RX_FILTER;
295 }
296}
diff --git a/drivers/net/wireless/wl12xx/rx.h b/drivers/net/wireless/wl12xx/rx.h
index 0325b9de612e..d3c0591665e8 100644
--- a/drivers/net/wireless/wl12xx/rx.h
+++ b/drivers/net/wireless/wl12xx/rx.h
@@ -131,6 +131,5 @@ struct wl1271_rx_descriptor {
131 131
132void wl1271_rx(struct wl1271 *wl, struct wl1271_fw_common_status *status); 132void wl1271_rx(struct wl1271 *wl, struct wl1271_fw_common_status *status);
133u8 wl1271_rate_to_idx(int rate, enum ieee80211_band band); 133u8 wl1271_rate_to_idx(int rate, enum ieee80211_band band);
134void wl1271_set_default_filters(struct wl1271 *wl);
135 134
136#endif 135#endif
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c
index edfe01c321ca..78a9b23a41b8 100644
--- a/drivers/net/wireless/wl12xx/scan.c
+++ b/drivers/net/wireless/wl12xx/scan.c
@@ -167,9 +167,6 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band,
167 } 167 }
168 168
169 cmd->params.tx_rate = cpu_to_le32(basic_rate); 169 cmd->params.tx_rate = cpu_to_le32(basic_rate);
170 cmd->params.rx_config_options = cpu_to_le32(CFG_RX_ALL_GOOD);
171 cmd->params.rx_filter_options =
172 cpu_to_le32(CFG_RX_PRSP_EN | CFG_RX_MGMT_EN | CFG_RX_BCN_EN);
173 170
174 cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs; 171 cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs;
175 cmd->params.tx_rate = cpu_to_le32(basic_rate); 172 cmd->params.tx_rate = cpu_to_le32(basic_rate);
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c
index 938af1de6c2c..8a745fbe0f45 100644
--- a/drivers/net/wireless/wl12xx/tx.c
+++ b/drivers/net/wireless/wl12xx/tx.c
@@ -90,9 +90,7 @@ static int wl1271_tx_update_filters(struct wl1271 *wl,
90 if (!ieee80211_is_auth(hdr->frame_control)) 90 if (!ieee80211_is_auth(hdr->frame_control))
91 return 0; 91 return 0;
92 92
93 wl1271_configure_filters(wl, FIF_OTHER_BSS); 93 return 0;
94
95 return wl1271_acx_rx_config(wl, wl->rx_config, wl->rx_filter);
96} 94}
97 95
98static void wl1271_tx_ap_update_inconnection_sta(struct wl1271 *wl, 96static void wl1271_tx_ap_update_inconnection_sta(struct wl1271 *wl,
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h
index 0bdeae5c802d..7707895120be 100644
--- a/drivers/net/wireless/wl12xx/wl12xx.h
+++ b/drivers/net/wireless/wl12xx/wl12xx.h
@@ -112,24 +112,6 @@ extern u32 wl12xx_debug_level;
112 true); \ 112 true); \
113 } while (0) 113 } while (0)
114 114
115#define WL1271_DEFAULT_STA_RX_CONFIG (CFG_UNI_FILTER_EN | \
116 CFG_BSSID_FILTER_EN | \
117 CFG_MC_FILTER_EN)
118
119#define WL1271_DEFAULT_STA_RX_FILTER (CFG_RX_RCTS_ACK | CFG_RX_PRSP_EN | \
120 CFG_RX_MGMT_EN | CFG_RX_DATA_EN | \
121 CFG_RX_CTL_EN | CFG_RX_BCN_EN | \
122 CFG_RX_AUTH_EN | CFG_RX_ASSOC_EN)
123
124#define WL1271_DEFAULT_AP_RX_CONFIG 0
125
126#define WL1271_DEFAULT_AP_RX_FILTER (CFG_RX_RCTS_ACK | CFG_RX_PREQ_EN | \
127 CFG_RX_MGMT_EN | CFG_RX_DATA_EN | \
128 CFG_RX_CTL_EN | CFG_RX_AUTH_EN | \
129 CFG_RX_ASSOC_EN)
130
131
132
133#define WL127X_FW_NAME "ti-connectivity/wl127x-fw-3.bin" 115#define WL127X_FW_NAME "ti-connectivity/wl127x-fw-3.bin"
134#define WL128X_FW_NAME "ti-connectivity/wl128x-fw-3.bin" 116#define WL128X_FW_NAME "ti-connectivity/wl128x-fw-3.bin"
135 117
@@ -532,10 +514,6 @@ struct wl1271 {
532 struct work_struct rx_streaming_disable_work; 514 struct work_struct rx_streaming_disable_work;
533 struct timer_list rx_streaming_timer; 515 struct timer_list rx_streaming_timer;
534 516
535 unsigned int filters;
536 unsigned int rx_config;
537 unsigned int rx_filter;
538
539 struct completion *elp_compl; 517 struct completion *elp_compl;
540 struct completion *ps_compl; 518 struct completion *ps_compl;
541 struct delayed_work elp_work; 519 struct delayed_work elp_work;