From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 2/4] p54: convert to new station add/remove callbacks
Date: Fri, 19 Feb 2010 19:06:54 +0100 [thread overview]
Message-ID: <20100219180736.853830839@sipsolutions.net> (raw)
In-Reply-To: 20100219180652.409890561@sipsolutions.net
This converts p54 to use the new station
add/remove callbacks instead of using the
old sta_notify callback.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
drivers/net/wireless/p54/main.c | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
--- wireless-testing.orig/drivers/net/wireless/p54/main.c 2010-02-19 18:54:09.000000000 +0100
+++ wireless-testing/drivers/net/wireless/p54/main.c 2010-02-19 18:55:32.000000000 +0100
@@ -33,21 +33,29 @@ MODULE_DESCRIPTION("Softmac Prism54 comm
MODULE_LICENSE("GPL");
MODULE_ALIAS("prism54common");
+static int p54_sta_add_remove(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta)
+{
+ struct p54_common *priv = hw->priv;
+
+ /*
+ * Notify the firmware that we don't want or we don't
+ * need to buffer frames for this station anymore.
+ */
+
+ p54_sta_unlock(priv, sta->addr);
+
+ return 0;
+}
+
static void p54_sta_notify(struct ieee80211_hw *dev, struct ieee80211_vif *vif,
enum sta_notify_cmd notify_cmd,
struct ieee80211_sta *sta)
{
struct p54_common *priv = dev->priv;
- switch (notify_cmd) {
- case STA_NOTIFY_ADD:
- case STA_NOTIFY_REMOVE:
- /*
- * Notify the firmware that we don't want or we don't
- * need to buffer frames for this station anymore.
- */
- p54_sta_unlock(priv, sta->addr);
- break;
+ switch (notify_cmd) {
case STA_NOTIFY_AWAKE:
/* update the firmware's filter table */
p54_sta_unlock(priv, sta->addr);
@@ -506,6 +514,8 @@ static const struct ieee80211_ops p54_op
.remove_interface = p54_remove_interface,
.set_tim = p54_set_tim,
.sta_notify = p54_sta_notify,
+ .sta_add = p54_sta_add_remove,
+ .sta_remove = p54_sta_add_remove,
.set_key = p54_set_key,
.config = p54_config,
.bss_info_changed = p54_bss_info_changed,
next prev parent reply other threads:[~2010-02-19 18:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-19 18:06 [PATCH 0/4] convert drivers to new sta add/remove callbacks Johannes Berg
2010-02-19 18:06 ` [PATCH 1/4] ar9170: convert to new station " Johannes Berg
2010-02-19 18:06 ` Johannes Berg [this message]
2010-02-19 18:06 ` [PATCH 3/4] mac80211_hwsim: " Johannes Berg
2010-02-19 18:06 ` [PATCH 4/4] ath9k: " Johannes Berg
2010-02-19 18:18 ` [RFC/RFT] mwl8k: " Johannes Berg
2010-02-20 9:03 ` Lennert Buytenhek
2010-02-20 12:21 ` Johannes Berg
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=20100219180736.853830839@sipsolutions.net \
--to=johannes@sipsolutions.net \
--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).