From: Kalle Valo <kalle.valo@iki.fi>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, a.young.jason@gmail.com
Subject: [RFC PATCH v5 6/7] wl1251: create qos null data template
Date: Thu, 31 Dec 2009 15:37:49 +0200 [thread overview]
Message-ID: <20091231133748.29899.82916.stgit@tikku> (raw)
In-Reply-To: <20091231133626.29899.95683.stgit@tikku>
From: Kalle Valo <kalle.valo@nokia.com>
The qos null data template is needed for U-APSD.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
---
drivers/net/wireless/wl12xx/wl1251_main.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c
index 4e373f3..4cf3545 100644
--- a/drivers/net/wireless/wl12xx/wl1251_main.c
+++ b/drivers/net/wireless/wl12xx/wl1251_main.c
@@ -585,6 +585,27 @@ static int wl1251_build_null_data(struct wl1251 *wl)
}
+static int wl1251_build_qos_null_data(struct wl1251 *wl)
+{
+ struct ieee80211_qos_hdr template;
+
+ memset(&template, 0, sizeof(template));
+
+ memcpy(template.addr1, wl->bssid, ETH_ALEN);
+ memcpy(template.addr2, wl->mac_addr, ETH_ALEN);
+ memcpy(template.addr3, wl->bssid, ETH_ALEN);
+
+ template.frame_control = cpu_to_le16(IEEE80211_FTYPE_DATA |
+ IEEE80211_STYPE_QOS_NULLFUNC |
+ IEEE80211_FCTL_TODS);
+
+ /* FIXME: not sure what priority to use here */
+ template.qos_ctrl = cpu_to_le16(0);
+
+ return wl1251_cmd_template_set(wl, CMD_QOS_NULL_DATA, &template,
+ sizeof(template));
+}
+
static int wl1251_build_ps_poll(struct wl1251 *wl, u16 aid)
{
struct wl12xx_ps_poll_template template;
@@ -1119,6 +1140,10 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
if (ret < 0)
goto out;
+ ret = wl1251_build_qos_null_data(wl);
+ if (ret < 0)
+ goto out;
+
if (wl->bss_type != BSS_TYPE_IBSS) {
ret = wl1251_join(wl, wl->bss_type, wl->channel,
wl->beacon_int, wl->dtim_period);
next prev parent reply other threads:[~2009-12-31 13:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-31 13:37 [RFC PATCH v5 0/7] mac80211 client U-APSD support Kalle Valo
2009-12-31 13:37 ` [RFC PATCH v5 1/7] mac80211: add U-APSD client support Kalle Valo
2009-12-31 13:37 ` [RFC PATCH v5 2/7] mac80211: add debugfs interface for U-APSD queue configuration Kalle Valo
2010-01-05 9:48 ` Johannes Berg
2010-01-05 10:27 ` Kalle Valo
2010-01-05 10:44 ` Johannes Berg
2010-01-05 10:53 ` Kalle Valo
2009-12-31 13:37 ` [RFC PATCH v5 3/7] mac80211: create tx handler for dynamic ps Kalle Valo
2009-12-31 13:37 ` [RFC PATCH v5 4/7] mac80211: check uapsd state for dynamic power save Kalle Valo
2009-12-31 13:37 ` [RFC PATCH v5 5/7] ieee80211: add struct ieee80211_hdr_qos Kalle Valo
2009-12-31 13:37 ` Kalle Valo [this message]
2009-12-31 13:37 ` [RFC PATCH v5 7/7] wl1251: add U-APSD support Kalle Valo
2010-01-05 9:51 ` [RFC PATCH v5 0/7] mac80211 client " Johannes Berg
2010-01-05 10:31 ` 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=20091231133748.29899.82916.stgit@tikku \
--to=kalle.valo@iki.fi \
--cc=a.young.jason@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/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