diff mbox

hostapd: Issue in deriving MAX SP Length from QoS Info

Message ID 511E4AF4.8080605@posedge.com
State Accepted
Commit bdaf17489a9e9214554d60eb3e3f58f51306a962
Headers show

Commit Message

Srinivasan B Feb. 15, 2013, 2:49 p.m. UTC
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. Below 
mentioned patch address the minor 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>
---
  src/drivers/driver_nl80211.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Jouni Malinen Feb. 16, 2013, 9:17 a.m. UTC | #1
On Fri, Feb 15, 2013 at 08:19:24PM +0530, Srinivasan B wrote:
> 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. Below 
> mentioned patch address the minor 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).

Thanks! Applied.
diff mbox

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e19bb46..077c591 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -5873,7 +5873,7 @@  static int wpa_driver_nl80211_sta_add(void *priv,
          NLA_PUT_U8(wme, NL80211_STA_WME_UAPSD_QUEUES,
                  params->qosinfo & WMM_QOSINFO_STA_AC_MASK);
          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);
          if (nla_put_nested(msg, NL80211_ATTR_STA_WME, wme) < 0)
              goto nla_put_failure;