[net80211] add a method for checking if a VAP WME AC has a NOACK policy or not.
A subsequent set of commits will introduce this instead of a whole lot of gymnastics to check the WME category.
This commit is contained in:
parent
de1430411d
commit
0c6960361b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326737
@ -1308,6 +1308,12 @@ ieee80211_wme_updateparams(struct ieee80211vap *vap)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Fetch the WME parameters for the given VAP.
|
||||
*
|
||||
* When net80211 grows p2p, etc support, this may return different
|
||||
* parameters for each VAP.
|
||||
*/
|
||||
void
|
||||
ieee80211_wme_vap_getparams(struct ieee80211vap *vap, struct chanAccParams *wp)
|
||||
{
|
||||
@ -1315,6 +1321,12 @@ ieee80211_wme_vap_getparams(struct ieee80211vap *vap, struct chanAccParams *wp)
|
||||
memcpy(wp, &vap->iv_ic->ic_wme.wme_chanParams, sizeof(*wp));
|
||||
}
|
||||
|
||||
/*
|
||||
* For NICs which only support one set of WME paramaters (ie, softmac NICs)
|
||||
* there may be different VAP WME parameters but only one is "active".
|
||||
* This returns the "NIC" WME parameters for the currently active
|
||||
* context.
|
||||
*/
|
||||
void
|
||||
ieee80211_wme_ic_getparams(struct ieee80211com *ic, struct chanAccParams *wp)
|
||||
{
|
||||
@ -1322,6 +1334,26 @@ ieee80211_wme_ic_getparams(struct ieee80211com *ic, struct chanAccParams *wp)
|
||||
memcpy(wp, &ic->ic_wme.wme_chanParams, sizeof(*wp));
|
||||
}
|
||||
|
||||
/*
|
||||
* Return whether to use QoS on a given WME queue.
|
||||
*
|
||||
* This is intended to be called from the transmit path of softmac drivers
|
||||
* which are setting NoAck bits in transmit descriptors.
|
||||
*
|
||||
* Ideally this would be set in some transmit field before the packet is
|
||||
* queued to the driver but net80211 isn't quite there yet.
|
||||
*/
|
||||
int
|
||||
ieee80211_wme_vap_ac_is_noack(struct ieee80211vap *vap, int ac)
|
||||
{
|
||||
/* Bounds/sanity check */
|
||||
if (ac < 0 || ac >= WME_NUM_AC)
|
||||
return (0);
|
||||
|
||||
/* Again, there's only one global context for now */
|
||||
return (!! vap->iv_ic->ic_wme.wme_chanParams.cap_wmeParams[ac].wmep_noackPolicy);
|
||||
}
|
||||
|
||||
static void
|
||||
parent_updown(void *arg, int npending)
|
||||
{
|
||||
|
@ -298,6 +298,7 @@ void ieee80211_wme_vap_getparams(struct ieee80211vap *vap,
|
||||
struct chanAccParams *);
|
||||
void ieee80211_wme_ic_getparams(struct ieee80211com *ic,
|
||||
struct chanAccParams *);
|
||||
int ieee80211_wme_vap_ac_is_noack(struct ieee80211vap *vap, int ac);
|
||||
|
||||
/*
|
||||
* Return the WME TID from a QoS frame. If no TID
|
||||
|
Loading…
Reference in New Issue
Block a user