aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2009-11-17 11:48:23 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-18 17:09:19 -0500
commit287f6f9672635f4e948c0aa96754a2ce448ebdb2 (patch)
treeab3f27db81a931c023f18d103665e012c0deb25a /drivers
parent474c48c9f2118e637477b3b1c70003cb5cbda983 (diff)
wl1251: Enable beacon filtering with the stack
Enable beacon filtering with the mac80211 stack. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/wl12xx/wl1251.h2
-rw-r--r--drivers/net/wireless/wl12xx/wl1251_event.c7
-rw-r--r--drivers/net/wireless/wl12xx/wl1251_main.c12
3 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251.h b/drivers/net/wireless/wl12xx/wl1251.h
index 998e4b6252bd..fc2871c5a25b 100644
--- a/drivers/net/wireless/wl12xx/wl1251.h
+++ b/drivers/net/wireless/wl12xx/wl1251.h
@@ -374,6 +374,8 @@ struct wl1251 {
374 u8 buffer_busyword[WL1251_BUSY_WORD_LEN]; 374 u8 buffer_busyword[WL1251_BUSY_WORD_LEN];
375 struct wl1251_rx_descriptor *rx_descriptor; 375 struct wl1251_rx_descriptor *rx_descriptor;
376 376
377 struct ieee80211_vif *vif;
378
377 u32 chip_id; 379 u32 chip_id;
378 char fw_ver[21]; 380 char fw_ver[21];
379}; 381};
diff --git a/drivers/net/wireless/wl12xx/wl1251_event.c b/drivers/net/wireless/wl12xx/wl1251_event.c
index 00076c4a8a21..18c301ddcd74 100644
--- a/drivers/net/wireless/wl12xx/wl1251_event.c
+++ b/drivers/net/wireless/wl12xx/wl1251_event.c
@@ -79,6 +79,13 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox)
79 } 79 }
80 } 80 }
81 81
82 if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID && wl->psm) {
83 wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT");
84
85 /* indicate to the stack, that beacons have been lost */
86 ieee80211_beacon_loss(wl->vif);
87 }
88
82 return 0; 89 return 0;
83} 90}
84 91
diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c
index d03a07e1be7c..601c43070296 100644
--- a/drivers/net/wireless/wl12xx/wl1251_main.c
+++ b/drivers/net/wireless/wl12xx/wl1251_main.c
@@ -509,6 +509,12 @@ static int wl1251_op_add_interface(struct ieee80211_hw *hw,
509 conf->type, conf->mac_addr); 509 conf->type, conf->mac_addr);
510 510
511 mutex_lock(&wl->mutex); 511 mutex_lock(&wl->mutex);
512 if (wl->vif) {
513 ret = -EBUSY;
514 goto out;
515 }
516
517 wl->vif = conf->vif;
512 518
513 switch (conf->type) { 519 switch (conf->type) {
514 case NL80211_IFTYPE_STATION: 520 case NL80211_IFTYPE_STATION:
@@ -538,7 +544,12 @@ out:
538static void wl1251_op_remove_interface(struct ieee80211_hw *hw, 544static void wl1251_op_remove_interface(struct ieee80211_hw *hw,
539 struct ieee80211_if_init_conf *conf) 545 struct ieee80211_if_init_conf *conf)
540{ 546{
547 struct wl1251 *wl = hw->priv;
548
549 mutex_lock(&wl->mutex);
541 wl1251_debug(DEBUG_MAC80211, "mac80211 remove interface"); 550 wl1251_debug(DEBUG_MAC80211, "mac80211 remove interface");
551 wl->vif = NULL;
552 mutex_unlock(&wl->mutex);
542} 553}
543 554
544static int wl1251_build_null_data(struct wl1251 *wl) 555static int wl1251_build_null_data(struct wl1251 *wl)
@@ -1372,6 +1383,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void)
1372 wl->power_level = WL1251_DEFAULT_POWER_LEVEL; 1383 wl->power_level = WL1251_DEFAULT_POWER_LEVEL;
1373 wl->beacon_int = WL1251_DEFAULT_BEACON_INT; 1384 wl->beacon_int = WL1251_DEFAULT_BEACON_INT;
1374 wl->dtim_period = WL1251_DEFAULT_DTIM_PERIOD; 1385 wl->dtim_period = WL1251_DEFAULT_DTIM_PERIOD;
1386 wl->vif = NULL;
1375 1387
1376 for (i = 0; i < FW_TX_CMPLT_BLOCK_SIZE; i++) 1388 for (i = 0; i < FW_TX_CMPLT_BLOCK_SIZE; i++)
1377 wl->tx_frames[i] = NULL; 1389 wl->tx_frames[i] = NULL;