hostapd: Fix Max SP Length derivation from QoS Info
Hostapd provides QoS info of the STA (Service Period & AC mask) to the kernel during wpa_driver_nl80211_sta_add call. Bit 5 and Bit 6 of QoS info represents the Max SP length. Fix an issue in the code to fetch the Max SP by shifting right the QoS info by value WMM_QOSINFO_STA_SP_SHIFT. (operator ">" is replaced with ">>" operator). Signed-off-by: Srinivasan <srinivasanb@posedge.com>
This commit is contained in:
parent
122d16f25d
commit
bdaf17489a
1 changed files with 1 additions and 1 deletions
|
@ -5883,7 +5883,7 @@ static int wpa_driver_nl80211_sta_add(void *priv,
|
||||||
NLA_PUT_U8(wme, NL80211_STA_WME_UAPSD_QUEUES,
|
NLA_PUT_U8(wme, NL80211_STA_WME_UAPSD_QUEUES,
|
||||||
params->qosinfo & WMM_QOSINFO_STA_AC_MASK);
|
params->qosinfo & WMM_QOSINFO_STA_AC_MASK);
|
||||||
NLA_PUT_U8(wme, NL80211_STA_WME_MAX_SP,
|
NLA_PUT_U8(wme, NL80211_STA_WME_MAX_SP,
|
||||||
(params->qosinfo > WMM_QOSINFO_STA_SP_SHIFT) &
|
(params->qosinfo >> WMM_QOSINFO_STA_SP_SHIFT) &
|
||||||
WMM_QOSINFO_STA_SP_MASK);
|
WMM_QOSINFO_STA_SP_MASK);
|
||||||
if (nla_put_nested(msg, NL80211_ATTR_STA_WME, wme) < 0)
|
if (nla_put_nested(msg, NL80211_ATTR_STA_WME, wme) < 0)
|
||||||
goto nla_put_failure;
|
goto nla_put_failure;
|
||||||
|
|
Loading…
Reference in a new issue