aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-10-29 20:00:45 +0100
committerJohn W. Linville <linville@tuxdriver.com>2008-11-10 15:17:35 -0500
commitbd815252720e4b667d9946d050d003ec89bda099 (patch)
treed7bb98f512c8b48031f9df01745820b7d6dfb3ac /include
parentrt2x00: Remove debugfs CSR access wrappers (diff)
downloadlinux-dev-bd815252720e4b667d9946d050d003ec89bda099.tar.xz
linux-dev-bd815252720e4b667d9946d050d003ec89bda099.zip
wireless: implement basic rate helper function
This adds a helper function that, given a bitmap of basic rates and a bitrate returns the response rate for this rate. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/wireless.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net/wireless.h b/include/net/wireless.h
index 41294c5f6f8f..17d4b582cf34 100644
--- a/include/net/wireless.h
+++ b/include/net/wireless.h
@@ -341,6 +341,22 @@ ieee80211_get_channel(struct wiphy *wiphy, int freq)
}
/**
+ * ieee80211_get_response_rate - get basic rate for a given rate
+ *
+ * @sband: the band to look for rates in
+ * @basic_rates: bitmap of basic rates
+ * @bitrate: the bitrate for which to find the basic rate
+ *
+ * This function returns the basic rate corresponding to a given
+ * bitrate, that is the next lower bitrate contained in the basic
+ * rate map, which is, for this function, given as a bitmap of
+ * indices of rates in the band's bitrate table.
+ */
+struct ieee80211_rate *
+ieee80211_get_response_rate(struct ieee80211_supported_band *sband,
+ u64 basic_rates, int bitrate);
+
+/**
* regulatory_hint - driver hint to the wireless core a regulatory domain
* @wiphy: the wireless device giving the hint (used only for reporting
* conflicts)