add fixed rate for sending multicast frames

Obtained from:	atheros
MFC after:	1 week
This commit is contained in:
Sam Leffler 2005-12-12 17:54:39 +00:00
parent c25442860a
commit 64353cb0ef
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153346
4 changed files with 10 additions and 0 deletions

View File

@ -1480,6 +1480,9 @@ ieee80211_ioctl_get80211(struct ieee80211com *ic, u_long cmd, struct ieee80211re
case IEEE80211_IOC_PUREG:
ireq->i_val = (ic->ic_flags & IEEE80211_F_PUREG) != 0;
break;
case IEEE80211_IOC_MCAST_RATE:
ireq->i_val = ic->ic_mcast_rate;
break;
case IEEE80211_IOC_FRAGTHRESHOLD:
ireq->i_val = ic->ic_fragthreshold;
break;
@ -2369,6 +2372,9 @@ ieee80211_ioctl_set80211(struct ieee80211com *ic, u_long cmd, struct ieee80211re
if (ic->ic_curmode == IEEE80211_MODE_11G)
error = ENETRESET;
break;
case IEEE80211_IOC_MCAST_RATE:
ic->ic_mcast_rate = ireq->i_val & IEEE80211_RATE_VAL;
break;
case IEEE80211_IOC_FRAGTHRESHOLD:
if ((ic->ic_caps & IEEE80211_C_TXFRAG) == 0 &&
ireq->i_val != IEEE80211_FRAG_MAX)

View File

@ -442,6 +442,7 @@ struct ieee80211req {
#define IEEE80211_IOC_ADDMAC 54 /* add sta to MAC ACL table */
#define IEEE80211_IOC_DELMAC 55 /* del sta from MAC ACL table */
#define IEEE80211_IOC_PUREG 56 /* pure 11g (no 11b stations) */
#define IEEE80211_IOC_MCAST_RATE 72 /* tx rate for mcast frames */
#define IEEE80211_IOC_FRAGTHRESHOLD 73 /* tx fragmentation threshold */
/*

View File

@ -97,6 +97,7 @@ ieee80211_proto_attach(struct ieee80211com *ic)
ic->ic_rtsthreshold = IEEE80211_RTS_DEFAULT;
ic->ic_fragthreshold = IEEE80211_FRAG_DEFAULT;
ic->ic_fixed_rate = IEEE80211_FIXED_RATE_NONE;
ic->ic_mcast_rate = IEEE80211_MCAST_RATE_DEFAULT;
ic->ic_protmode = IEEE80211_PROT_CTSONLY;
ic->ic_roaming = IEEE80211_ROAMING_AUTO;

View File

@ -74,6 +74,7 @@
#define IEEE80211_PS_MAX_QUEUE 50 /* maximum saved packets */
#define IEEE80211_FIXED_RATE_NONE -1
#define IEEE80211_MCAST_RATE_DEFAULT (2*1) /* default mcast rate (1M) */
#define IEEE80211_RTS_DEFAULT IEEE80211_RTS_MAX
#define IEEE80211_FRAG_DEFAULT IEEE80211_FRAG_MAX
@ -138,6 +139,7 @@ struct ieee80211com {
struct ieee80211_channel *ic_ibss_chan;
struct ieee80211_channel *ic_curchan; /* current channel */
int ic_fixed_rate; /* index to ic_sup_rates[] */
int ic_mcast_rate; /* rate for mcast frames */
u_int16_t ic_rtsthreshold;
u_int16_t ic_fragthreshold;
struct ieee80211_node *(*ic_node_alloc)(struct ieee80211_node_table*);