Hi Johannes, I think it should be like below (NL80211_ATTR_QOS_INFO and NL80211_ATTR_UAPSD_SUPPORTED only for backward-compatibility) With best regards, Dmitry diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 69cd37d..f627621 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -117,6 +117,7 @@ #define IEEE80211_MAX_MESH_ID_LEN 32 #define IEEE80211_QOS_CTL_LEN 2 +#define IEEE80211_QOS_CTL_EOSP 0x0010 #define IEEE80211_QOS_CTL_TID_MASK 0x000F #define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007 diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 2636c01..d831c15 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h @@ -610,8 +610,6 @@ enum nl80211_commands { NL80211_CMD_SET_NOA, NL80211_CMD_SET_P2P_POWER_SAVE, - NL80211_ATTR_STA_WME, - /* add new commands above here */ /* used to define NL80211_CMD_MAX below */ @@ -1216,6 +1214,10 @@ enum nl80211_attrs { NL80211_ATTR_P2P_PS_CTWINDOW, NL80211_ATTR_UAPSD, + NL80211_ATTR_STA_WME, + NL80211_ATTR_UAPSD_SUPPORTED, /* OBSOLETE */ + NL80211_ATTR_QOS_INFO, /* OBSOLETE */ + /* add attributes here, update the policy in nl80211.c */ __NL80211_ATTR_AFTER_LAST, diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 47bcfee..80ece31 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -625,7 +625,7 @@ static bool sta_info_cleanup_expire_buffered_ac(struct ieee80211_local *local, unsigned long flags; struct sk_buff *skb; - if (skb_queue_empty(&sta->ps_tx_buf)) + if (skb_queue_empty(&sta->ps_tx_buf[ac])) return false; /* diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index b98f18d..791c0e4 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -176,6 +176,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = { [NL80211_ATTR_WOWLAN_TRIGGERS] = { .type = NLA_NESTED }, [NL80211_ATTR_STA_PLINK_STATE] = { .type = NLA_U8 }, [NL80211_ATTR_SCHED_SCAN_INTERVAL] = { .type = NLA_U32 }, + [NL80211_ATTR_QOS_INFO] = { .type = NLA_U8 }, [NL80211_ATTR_P2P_PS_NOA] = { .type = NLA_BINARY, .len = 32 }, [NL80211_ATTR_P2P_PS_NOA_COUNT] = { .type = NLA_U8 }, @@ -952,6 +953,9 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags, if (nl80211_put_iface_combinations(&dev->wiphy, msg)) goto nla_put_failure; + if (dev->wiphy.flags & WIPHY_FLAG_AP_UAPSD) + NLA_PUT_FLAG(msg, NL80211_ATTR_UAPSD_SUPPORTED); + return genlmsg_end(msg, hdr); nla_put_failure: -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html