diff options
-rw-r--r-- | include/net/cfg80211.h | 12 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 6 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 2 |
3 files changed, 18 insertions, 2 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 31d823a3092b..34b8f269976b 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -424,6 +424,17 @@ enum plink_actions { | |||
424 | }; | 424 | }; |
425 | 425 | ||
426 | /** | 426 | /** |
427 | * enum station_parameters_apply_mask - station parameter values to apply | ||
428 | * @STATION_PARAM_APPLY_UAPSD: apply new uAPSD parameters (uapsd_queues, max_sp) | ||
429 | * | ||
430 | * Not all station parameters have in-band "no change" signalling, | ||
431 | * for those that don't these flags will are used. | ||
432 | */ | ||
433 | enum station_parameters_apply_mask { | ||
434 | STATION_PARAM_APPLY_UAPSD = BIT(0), | ||
435 | }; | ||
436 | |||
437 | /** | ||
427 | * struct station_parameters - station parameters | 438 | * struct station_parameters - station parameters |
428 | * | 439 | * |
429 | * Used to change and create a new station. | 440 | * Used to change and create a new station. |
@@ -450,6 +461,7 @@ struct station_parameters { | |||
450 | u8 *supported_rates; | 461 | u8 *supported_rates; |
451 | struct net_device *vlan; | 462 | struct net_device *vlan; |
452 | u32 sta_flags_mask, sta_flags_set; | 463 | u32 sta_flags_mask, sta_flags_set; |
464 | u32 sta_modify_mask; | ||
453 | int listen_interval; | 465 | int listen_interval; |
454 | u16 aid; | 466 | u16 aid; |
455 | u8 supported_rates_len; | 467 | u8 supported_rates_len; |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 8fef3cddbc4f..13061ebc93ef 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -714,8 +714,10 @@ static void sta_apply_parameters(struct ieee80211_local *local, | |||
714 | } | 714 | } |
715 | spin_unlock_irqrestore(&sta->flaglock, flags); | 715 | spin_unlock_irqrestore(&sta->flaglock, flags); |
716 | 716 | ||
717 | sta->sta.uapsd_queues = params->uapsd_queues; | 717 | if (params->sta_modify_mask & STATION_PARAM_APPLY_UAPSD) { |
718 | sta->sta.max_sp = params->max_sp; | 718 | sta->sta.uapsd_queues = params->uapsd_queues; |
719 | sta->sta.max_sp = params->max_sp; | ||
720 | } | ||
719 | 721 | ||
720 | /* | 722 | /* |
721 | * cfg80211 validates this (1-2007) and allows setting the AID | 723 | * cfg80211 validates this (1-2007) and allows setting the AID |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index b85075761e24..3799623e7f46 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -2643,6 +2643,8 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info) | |||
2643 | 2643 | ||
2644 | if (params.max_sp & ~IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK) | 2644 | if (params.max_sp & ~IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK) |
2645 | return -EINVAL; | 2645 | return -EINVAL; |
2646 | |||
2647 | params.sta_modify_mask |= STATION_PARAM_APPLY_UAPSD; | ||
2646 | } | 2648 | } |
2647 | 2649 | ||
2648 | if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP && | 2650 | if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP && |