diff options
-rw-r--r-- | include/net/mac80211.h | 5 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 9 | ||||
-rw-r--r-- | net/mac80211/util.c | 5 |
3 files changed, 18 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index ecaae10426f9..dcf3c5f23c96 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -587,11 +587,15 @@ struct ieee80211_rx_status { | |||
587 | * may turn the device off as much as possible. Typically, this flag will | 587 | * may turn the device off as much as possible. Typically, this flag will |
588 | * be set when an interface is set UP but not associated or scanning, but | 588 | * be set when an interface is set UP but not associated or scanning, but |
589 | * it can also be unset in that case when monitor interfaces are active. | 589 | * it can also be unset in that case when monitor interfaces are active. |
590 | * @IEEE80211_CONF_QOS: Enable 802.11e QoS also know as WMM (Wireless | ||
591 | * Multimedia). On some drivers (iwlwifi is one of know) we have | ||
592 | * to enable/disable QoS explicitly. | ||
590 | */ | 593 | */ |
591 | enum ieee80211_conf_flags { | 594 | enum ieee80211_conf_flags { |
592 | IEEE80211_CONF_MONITOR = (1<<0), | 595 | IEEE80211_CONF_MONITOR = (1<<0), |
593 | IEEE80211_CONF_PS = (1<<1), | 596 | IEEE80211_CONF_PS = (1<<1), |
594 | IEEE80211_CONF_IDLE = (1<<2), | 597 | IEEE80211_CONF_IDLE = (1<<2), |
598 | IEEE80211_CONF_QOS = (1<<3), | ||
595 | }; | 599 | }; |
596 | 600 | ||
597 | 601 | ||
@@ -616,6 +620,7 @@ enum ieee80211_conf_changed { | |||
616 | IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), | 620 | IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), |
617 | IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(7), | 621 | IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(7), |
618 | IEEE80211_CONF_CHANGE_IDLE = BIT(8), | 622 | IEEE80211_CONF_CHANGE_IDLE = BIT(8), |
623 | IEEE80211_CONF_CHANGE_QOS = BIT(9), | ||
619 | }; | 624 | }; |
620 | 625 | ||
621 | /** | 626 | /** |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 65eafda5738a..c686d1b90f9f 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -586,6 +586,9 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local, | |||
586 | int count; | 586 | int count; |
587 | u8 *pos, uapsd_queues = 0; | 587 | u8 *pos, uapsd_queues = 0; |
588 | 588 | ||
589 | if (!local->ops->conf_tx) | ||
590 | return; | ||
591 | |||
589 | if (local->hw.queues < 4) | 592 | if (local->hw.queues < 4) |
590 | return; | 593 | return; |
591 | 594 | ||
@@ -660,11 +663,15 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local, | |||
660 | params.aifs, params.cw_min, params.cw_max, params.txop, | 663 | params.aifs, params.cw_min, params.cw_max, params.txop, |
661 | params.uapsd); | 664 | params.uapsd); |
662 | #endif | 665 | #endif |
663 | if (drv_conf_tx(local, queue, ¶ms) && local->ops->conf_tx) | 666 | if (drv_conf_tx(local, queue, ¶ms)) |
664 | printk(KERN_DEBUG "%s: failed to set TX queue " | 667 | printk(KERN_DEBUG "%s: failed to set TX queue " |
665 | "parameters for queue %d\n", | 668 | "parameters for queue %d\n", |
666 | wiphy_name(local->hw.wiphy), queue); | 669 | wiphy_name(local->hw.wiphy), queue); |
667 | } | 670 | } |
671 | |||
672 | /* enable WMM or activate new settings */ | ||
673 | local->hw.conf.flags |= IEEE80211_CONF_QOS; | ||
674 | drv_config(local, IEEE80211_CONF_CHANGE_QOS); | ||
668 | } | 675 | } |
669 | 676 | ||
670 | static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata, | 677 | static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata, |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index c453226f06b2..7b2c170af71c 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -796,6 +796,11 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata) | |||
796 | 796 | ||
797 | drv_conf_tx(local, queue, &qparam); | 797 | drv_conf_tx(local, queue, &qparam); |
798 | } | 798 | } |
799 | |||
800 | /* after reinitialize QoS TX queues setting to default, | ||
801 | * disable QoS at all */ | ||
802 | local->hw.conf.flags &= ~IEEE80211_CONF_QOS; | ||
803 | drv_config(local, IEEE80211_CONF_CHANGE_QOS); | ||
799 | } | 804 | } |
800 | 805 | ||
801 | void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata, | 806 | void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata, |