diff options
-rw-r--r-- | net/mac80211/debugfs_sta.c | 4 | ||||
-rw-r--r-- | net/mac80211/rate.c | 2 | ||||
-rw-r--r-- | net/mac80211/rate.h | 1 | ||||
-rw-r--r-- | net/mac80211/sta_info.h | 2 |
4 files changed, 6 insertions, 3 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index c8383712fdec..6d45804d09bc 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -63,7 +63,7 @@ static ssize_t sta_flags_read(struct file *file, char __user *userbuf, | |||
63 | test_sta_flag(sta, WLAN_STA_##flg) ? #flg "\n" : "" | 63 | test_sta_flag(sta, WLAN_STA_##flg) ? #flg "\n" : "" |
64 | 64 | ||
65 | int res = scnprintf(buf, sizeof(buf), | 65 | int res = scnprintf(buf, sizeof(buf), |
66 | "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", | 66 | "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", |
67 | TEST(AUTH), TEST(ASSOC), TEST(PS_STA), | 67 | TEST(AUTH), TEST(ASSOC), TEST(PS_STA), |
68 | TEST(PS_DRIVER), TEST(AUTHORIZED), | 68 | TEST(PS_DRIVER), TEST(AUTHORIZED), |
69 | TEST(SHORT_PREAMBLE), | 69 | TEST(SHORT_PREAMBLE), |
@@ -71,7 +71,7 @@ static ssize_t sta_flags_read(struct file *file, char __user *userbuf, | |||
71 | TEST(MFP), TEST(BLOCK_BA), TEST(PSPOLL), | 71 | TEST(MFP), TEST(BLOCK_BA), TEST(PSPOLL), |
72 | TEST(UAPSD), TEST(SP), TEST(TDLS_PEER), | 72 | TEST(UAPSD), TEST(SP), TEST(TDLS_PEER), |
73 | TEST(TDLS_PEER_AUTH), TEST(4ADDR_EVENT), | 73 | TEST(TDLS_PEER_AUTH), TEST(4ADDR_EVENT), |
74 | TEST(INSERTED)); | 74 | TEST(INSERTED), TEST(RATE_CONTROL)); |
75 | #undef TEST | 75 | #undef TEST |
76 | return simple_read_from_buffer(userbuf, count, ppos, buf, res); | 76 | return simple_read_from_buffer(userbuf, count, ppos, buf, res); |
77 | } | 77 | } |
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 22fc28e9026e..111fba38be82 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
@@ -439,7 +439,7 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata, | |||
439 | u32 mask; | 439 | u32 mask; |
440 | u8 mcs_mask[IEEE80211_HT_MCS_MASK_LEN]; | 440 | u8 mcs_mask[IEEE80211_HT_MCS_MASK_LEN]; |
441 | 441 | ||
442 | if (sta) { | 442 | if (sta && test_sta_flag(sta, WLAN_STA_RATE_CONTROL)) { |
443 | ista = &sta->sta; | 443 | ista = &sta->sta; |
444 | priv_sta = sta->rate_ctrl_priv; | 444 | priv_sta = sta->rate_ctrl_priv; |
445 | } | 445 | } |
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h index 8268457bd143..5fc3135a6b45 100644 --- a/net/mac80211/rate.h +++ b/net/mac80211/rate.h | |||
@@ -58,6 +58,7 @@ static inline void rate_control_rate_init(struct sta_info *sta) | |||
58 | sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; | 58 | sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; |
59 | 59 | ||
60 | ref->ops->rate_init(ref->priv, sband, ista, priv_sta); | 60 | ref->ops->rate_init(ref->priv, sband, ista, priv_sta); |
61 | set_sta_flag(sta, WLAN_STA_RATE_CONTROL); | ||
61 | } | 62 | } |
62 | 63 | ||
63 | static inline void rate_control_rate_update(struct ieee80211_local *local, | 64 | static inline void rate_control_rate_update(struct ieee80211_local *local, |
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 03f249bc2766..23a97c9dc042 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
@@ -53,6 +53,7 @@ | |||
53 | * reply to other uAPSD trigger frames or PS-Poll. | 53 | * reply to other uAPSD trigger frames or PS-Poll. |
54 | * @WLAN_STA_4ADDR_EVENT: 4-addr event was already sent for this frame. | 54 | * @WLAN_STA_4ADDR_EVENT: 4-addr event was already sent for this frame. |
55 | * @WLAN_STA_INSERTED: This station is inserted into the hash table. | 55 | * @WLAN_STA_INSERTED: This station is inserted into the hash table. |
56 | * @WLAN_STA_RATE_CONTROL: rate control was initialized for this station. | ||
56 | */ | 57 | */ |
57 | enum ieee80211_sta_info_flags { | 58 | enum ieee80211_sta_info_flags { |
58 | WLAN_STA_AUTH, | 59 | WLAN_STA_AUTH, |
@@ -73,6 +74,7 @@ enum ieee80211_sta_info_flags { | |||
73 | WLAN_STA_SP, | 74 | WLAN_STA_SP, |
74 | WLAN_STA_4ADDR_EVENT, | 75 | WLAN_STA_4ADDR_EVENT, |
75 | WLAN_STA_INSERTED, | 76 | WLAN_STA_INSERTED, |
77 | WLAN_STA_RATE_CONTROL, | ||
76 | }; | 78 | }; |
77 | 79 | ||
78 | #define STA_TID_NUM 16 | 80 | #define STA_TID_NUM 16 |