socsvn commit: r254831 - soc2013/ccqin/head/sys/net80211
ccqin at FreeBSD.org
ccqin at FreeBSD.org
Tue Jul 16 09:00:39 UTC 2013
Author: ccqin
Date: Tue Jul 16 09:00:39 2013
New Revision: 254831
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=254831
Log:
Add the capability of returning multi-rate to the net80211 rate control code.
Modified:
soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.h
Modified: soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.h
==============================================================================
--- soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.h Tue Jul 16 08:54:19 2013 (r254830)
+++ soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.h Tue Jul 16 09:00:39 2013 (r254831)
@@ -37,6 +37,25 @@
#define IEEE80211_RATECTL_TX_SUCCESS 1
#define IEEE80211_RATECTL_TX_FAILURE 0
+#define IEEE80211_RATECTL_NUM 4
+
+#define IEEE80211_RATECTL_DS_FLAG 0x01 /* dual-stream rate */
+#define IEEE80211_RATECTL_CW40_FLAG 0x02 /* use HT40 */
+#define IEEE80211_RATECTL_SGI_FLAG 0x04 /* use short-GI */
+#define IEEE80211_RATECTL_HT_FLAG 0x08 /* use HT */
+#define IEEE80211_RATECTL_RTSCTS_FLAG 0x10 /* enable RTS/CTS protection */
+#define IEEE80211_RATECTL_STBC_FLAG 0x20 /* enable STBC */
+#define IEEE80211_RATECTL_TS_FLAG 0x40 /* triple-stream rate */
+
+struct ieee80211_rc_series {
+ uint8_t rix; /* ratetable index, not rate code */
+ uint8_t ratecode; /* hardware rate code */
+ uint8_t tries;
+ uint8_t tx_power_cap;
+ uint16_t flags;
+ uint16_t max4msframelen;
+};
+
struct ieee80211_ratectl {
const char *ir_name;
int (*ir_attach)(const struct ieee80211vap *);
@@ -46,6 +65,7 @@
void (*ir_node_init)(struct ieee80211_node *);
void (*ir_node_deinit)(struct ieee80211_node *);
int (*ir_rate)(struct ieee80211_node *, void *, uint32_t);
+ void (*ir_rates)(struct ieee80211_node *, struct ieee80211_rc_series *);
void (*ir_tx_complete)(const struct ieee80211vap *,
const struct ieee80211_node *, int,
void *, void *);
@@ -93,6 +113,14 @@
}
static void __inline
+ieee80211_ratectl_rates(struct ieee80211_node *ni, struct ieee80211_rc_series *rc)
+{
+ const struct ieee80211vap *vap = ni->ni_vap;
+
+ vap->iv_rate->ir_rates(ni, rc);
+}
+
+static void __inline
ieee80211_ratectl_tx_complete(const struct ieee80211vap *vap,
const struct ieee80211_node *ni, int status, void *arg1, void *arg2)
{
More information about the svn-soc-all
mailing list