From: Kalle Valo <kalle.valo@iki.fi>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 02/16] wl1251: Enable beacon filtering with the stack
Date: Tue, 17 Nov 2009 18:48:23 +0200 [thread overview]
Message-ID: <20091117164822.2236.25815.stgit@tikku> (raw)
In-Reply-To: <20091117164614.2236.8543.stgit@tikku>
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
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>
---
drivers/net/wireless/wl12xx/wl1251.h | 2 ++
drivers/net/wireless/wl12xx/wl1251_event.c | 7 +++++++
drivers/net/wireless/wl12xx/wl1251_main.c | 12 ++++++++++++
3 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1251.h b/drivers/net/wireless/wl12xx/wl1251.h
index 998e4b6..fc2871c 100644
--- a/drivers/net/wireless/wl12xx/wl1251.h
+++ b/drivers/net/wireless/wl12xx/wl1251.h
@@ -374,6 +374,8 @@ struct wl1251 {
u8 buffer_busyword[WL1251_BUSY_WORD_LEN];
struct wl1251_rx_descriptor *rx_descriptor;
+ struct ieee80211_vif *vif;
+
u32 chip_id;
char fw_ver[21];
};
diff --git a/drivers/net/wireless/wl12xx/wl1251_event.c b/drivers/net/wireless/wl12xx/wl1251_event.c
index 00076c4..18c301d 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)
}
}
+ if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID && wl->psm) {
+ wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT");
+
+ /* indicate to the stack, that beacons have been lost */
+ ieee80211_beacon_loss(wl->vif);
+ }
+
return 0;
}
diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c
index d03a07e..601c430 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,
conf->type, conf->mac_addr);
mutex_lock(&wl->mutex);
+ if (wl->vif) {
+ ret = -EBUSY;
+ goto out;
+ }
+
+ wl->vif = conf->vif;
switch (conf->type) {
case NL80211_IFTYPE_STATION:
@@ -538,7 +544,12 @@ out:
static void wl1251_op_remove_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf)
{
+ struct wl1251 *wl = hw->priv;
+
+ mutex_lock(&wl->mutex);
wl1251_debug(DEBUG_MAC80211, "mac80211 remove interface");
+ wl->vif = NULL;
+ mutex_unlock(&wl->mutex);
}
static int wl1251_build_null_data(struct wl1251 *wl)
@@ -1372,6 +1383,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void)
wl->power_level = WL1251_DEFAULT_POWER_LEVEL;
wl->beacon_int = WL1251_DEFAULT_BEACON_INT;
wl->dtim_period = WL1251_DEFAULT_DTIM_PERIOD;
+ wl->vif = NULL;
for (i = 0; i < FW_TX_CMPLT_BLOCK_SIZE; i++)
wl->tx_frames[i] = NULL;
next prev parent reply other threads:[~2009-11-17 16:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-17 16:48 [PATCH 00/16] wl1251: beacon filter support and more Kalle Valo
2009-11-17 16:48 ` [PATCH 01/16] wl1251: Add connection monitoring configuration Kalle Valo
2009-11-17 16:48 ` Kalle Valo [this message]
2009-11-17 16:48 ` [PATCH 03/16] wl1251: Configure beacon filtering on if PSM used Kalle Valo
2009-11-17 16:48 ` [PATCH 04/16] wl1251: Implement delayed entry into ELP mode Kalle Valo
2009-11-17 16:48 ` [PATCH 05/16] wl1251: allocate space for firmware with vmalloc() Kalle Valo
2009-11-17 16:48 ` [PATCH 06/16] wl1251: fix deadlock with ieee80211 beacon filter calls Kalle Valo
2009-11-17 17:01 ` Johannes Berg
2009-11-17 17:10 ` Kalle Valo
2009-11-17 16:49 ` [PATCH 07/16] wl1251: mask aid bits 14 and 15 in ps-poll template Kalle Valo
2009-11-17 16:49 ` [PATCH 08/16] wl1251: Add acx command to set tbtt and dtim period Kalle Valo
2009-11-17 16:49 ` [PATCH 09/16] wl1251: Set the correct dtim period to the firmware Kalle Valo
2009-11-17 16:49 ` [PATCH 10/16] wl1251: Increase the beacon loss timeout value and handle regain event Kalle Valo
2009-11-17 16:49 ` [PATCH 11/16] wl1251: Add IRQ looping support Kalle Valo
2009-11-17 16:49 ` [PATCH 12/16] wl1251: Filter out unwanted events Kalle Valo
2009-11-17 16:49 ` [PATCH 13/16] wl1251: Fix regression in IRQ loop handling Kalle Valo
2009-11-17 16:49 ` [PATCH 14/16] wl1251: Send null data packet with "TODS" bit set Kalle Valo
2009-11-17 16:50 ` [PATCH 15/16] wl1251: remove depcreated qual usage Kalle Valo
2009-11-17 16:50 ` [PATCH 16/16] wl1251: add NVS in EEPROM support Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091117164822.2236.25815.stgit@tikku \
--to=kalle.valo@iki.fi \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).