From: "Lukáš Turek" <8an@praha12.net>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
Johannes Berg <johannes@sipsolutions.net>,
ath5k-devel@lists.ath5k.org
Subject: [PATCH 2/4] mac80211: Add new callback set_coverage
Date: Sun, 6 Dec 2009 18:23:45 +0100 [thread overview]
Message-ID: <200912061823.45809.8an@praha12.net> (raw)
In-Reply-To: <200912061820.26320.8an@praha12.net>
Mac80211 callback to driver set_coverage() sets slot time and ACK timeout
for given coverage class. The callback is optional, but it's essential for
long distance links.
Signed-off-by: Lukas Turek <8an@praha12.net>
---
include/net/mac80211.h | 5 +++++
net/mac80211/cfg.c | 6 ++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 1d75b96..2865bc6 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1477,6 +1477,10 @@ enum ieee80211_ampdu_mlme_action {
* need to set wiphy->rfkill_poll to %true before registration,
* and need to call wiphy_rfkill_set_hw_state() in the callback.
*
+ * @set_coverage: Set slot time for given coverage class as specified
+ * in IEEE 802.11-2007 section 17.3.8.6 and modify ACK timeout
+ * accordingly. Optional function, could be NULL.
+ *
* @testmode_cmd: Implement a cfg80211 test mode command.
*/
struct ieee80211_ops {
@@ -1531,6 +1535,7 @@ struct ieee80211_ops {
struct ieee80211_sta *sta, u16 tid, u16 *ssn);
void (*rfkill_poll)(struct ieee80211_hw *hw);
+ void (*set_coverage)(struct ieee80211_hw *hw, u8 coverage_class);
#ifdef CONFIG_NL80211_TESTMODE
int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len);
#endif
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 93ee1fd..f0ab669 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1236,6 +1236,12 @@ static int ieee80211_set_wiphy_params(struct wiphy
*wiphy, u32 changed)
struct ieee80211_local *local = wiphy_priv(wiphy);
int err;
+ if (changed & WIPHY_PARAM_COVERAGE_CLASS) {
+ if (!local->ops->set_coverage)
+ return -EOPNOTSUPP;
+ local->ops->set_coverage(&local->hw, wiphy->coverage_class);
+ }
+
if (changed & WIPHY_PARAM_RTS_THRESHOLD) {
err = drv_set_rts_threshold(local, wiphy->rts_threshold);
--
1.6.4.4
next prev parent reply other threads:[~2009-12-06 17:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-06 17:20 [PATCH 0/4] Setting coverage class (and ACK timeout and slot time) Lukáš Turek
2009-12-06 17:22 ` [PATCH 1/4] nl80211: Add new WIPHY attribute COVERAGE_CLASS Lukáš Turek
2009-12-06 18:01 ` Johannes Berg
2009-12-06 18:45 ` Lukáš Turek
2009-12-06 18:49 ` Johannes Berg
2009-12-06 19:28 ` Lukáš Turek
2009-12-06 19:32 ` Lukáš Turek
2009-12-06 21:59 ` Lukáš Turek
2009-12-07 6:57 ` Johannes Berg
2009-12-06 17:23 ` Lukáš Turek [this message]
2009-12-07 10:59 ` [PATCH 2/4] mac80211: Add new callback set_coverage Kalle Valo
2009-12-07 11:04 ` Johannes Berg
2009-12-06 17:24 ` [PATCH 3/4] ath5k: Fix functions for getting/setting slot time Lukáš Turek
2009-12-06 17:26 ` [PATCH 4/4] ath5k: Implement mac80211 callback set_coverage Lukáš Turek
2009-12-06 18:34 ` Felix Fietkau
2009-12-06 19:00 ` Lukáš Turek
2009-12-06 19:20 ` Felix Fietkau
2009-12-06 20:23 ` Lukáš Turek
2009-12-07 9:48 ` Felix Fietkau
2009-12-09 1:15 ` Lukáš Turek
2009-12-09 1:48 ` Felix Fietkau
2009-12-09 13:12 ` Lukáš Turek
2009-12-09 13:30 ` Felix Fietkau
2009-12-09 23:51 ` Lukáš Turek
2009-12-06 17:29 ` [PATCH] iw: Add support for NL80211_ATTR_WIPHY_COVERAGE_CLASS Lukáš Turek
2009-12-06 21:49 ` Luis R. Rodriguez
2009-12-06 21:52 ` Luis R. Rodriguez
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=200912061823.45809.8an@praha12.net \
--to=8an@praha12.net \
--cc=ath5k-devel@lists.ath5k.org \
--cc=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).