diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-30 02:43:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-10 14:54:08 -0400 |
commit | 8f727ef3c4859f2c397a7609beb845dcd66729f5 (patch) | |
tree | 9843df4721d5510c464f7ea4e1f4da940b247c80 /include | |
parent | 7213cf2cb0dfbb4d6b55a1da000d34338f76c0e3 (diff) |
mac80211: notify driver of rate control updates
Devices that have internal rate control need to be
notified when the bandwidth or SMPS state changes
just like external rate control algorithms get a
notification now.
Add this notification and clarify the change bits
while at it, the HT_CHANGED bit really meant only
bandwidth changed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/mac80211.h | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 21c653415d84..dc0d3e715759 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1780,6 +1780,18 @@ enum ieee80211_frame_release_type { | |||
1780 | }; | 1780 | }; |
1781 | 1781 | ||
1782 | /** | 1782 | /** |
1783 | * enum ieee80211_rate_control_changed - flags to indicate what changed | ||
1784 | * | ||
1785 | * @IEEE80211_RC_BW_CHANGED: The bandwidth that can be used to transmit | ||
1786 | * to this station changed. | ||
1787 | * @IEEE80211_RC_SMPS_CHANGED: The SMPS state of the station changed. | ||
1788 | */ | ||
1789 | enum ieee80211_rate_control_changed { | ||
1790 | IEEE80211_RC_BW_CHANGED = BIT(0), | ||
1791 | IEEE80211_RC_SMPS_CHANGED = BIT(1), | ||
1792 | }; | ||
1793 | |||
1794 | /** | ||
1783 | * struct ieee80211_ops - callbacks from mac80211 to the driver | 1795 | * struct ieee80211_ops - callbacks from mac80211 to the driver |
1784 | * | 1796 | * |
1785 | * This structure contains various callbacks that the driver may | 1797 | * This structure contains various callbacks that the driver may |
@@ -1980,6 +1992,14 @@ enum ieee80211_frame_release_type { | |||
1980 | * up the list of states. | 1992 | * up the list of states. |
1981 | * The callback can sleep. | 1993 | * The callback can sleep. |
1982 | * | 1994 | * |
1995 | * @sta_rc_update: Notifies the driver of changes to the bitrates that can be | ||
1996 | * used to transmit to the station. The changes are advertised with bits | ||
1997 | * from &enum ieee80211_rate_control_changed and the values are reflected | ||
1998 | * in the station data. This callback should only be used when the driver | ||
1999 | * uses hardware rate control (%IEEE80211_HW_HAS_RATE_CONTROL) since | ||
2000 | * otherwise the rate control algorithm is notified directly. | ||
2001 | * Must be atomic. | ||
2002 | * | ||
1983 | * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), | 2003 | * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), |
1984 | * bursting) for a hardware TX queue. | 2004 | * bursting) for a hardware TX queue. |
1985 | * Returns a negative error code on failure. | 2005 | * Returns a negative error code on failure. |
@@ -2196,6 +2216,10 @@ struct ieee80211_ops { | |||
2196 | struct ieee80211_sta *sta, | 2216 | struct ieee80211_sta *sta, |
2197 | enum ieee80211_sta_state old_state, | 2217 | enum ieee80211_sta_state old_state, |
2198 | enum ieee80211_sta_state new_state); | 2218 | enum ieee80211_sta_state new_state); |
2219 | void (*sta_rc_update)(struct ieee80211_hw *hw, | ||
2220 | struct ieee80211_vif *vif, | ||
2221 | struct ieee80211_sta *sta, | ||
2222 | u32 changed); | ||
2199 | int (*conf_tx)(struct ieee80211_hw *hw, | 2223 | int (*conf_tx)(struct ieee80211_hw *hw, |
2200 | struct ieee80211_vif *vif, u16 queue, | 2224 | struct ieee80211_vif *vif, u16 queue, |
2201 | const struct ieee80211_tx_queue_params *params); | 2225 | const struct ieee80211_tx_queue_params *params); |
@@ -3512,19 +3536,6 @@ void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn); | |||
3512 | /* Rate control API */ | 3536 | /* Rate control API */ |
3513 | 3537 | ||
3514 | /** | 3538 | /** |
3515 | * enum rate_control_changed - flags to indicate which parameter changed | ||
3516 | * | ||
3517 | * @IEEE80211_RC_HT_CHANGED: The HT parameters of the operating channel have | ||
3518 | * changed, rate control algorithm can update its internal state if needed. | ||
3519 | * @IEEE80211_RC_SMPS_CHANGED: The SMPS state of the station changed, the rate | ||
3520 | * control algorithm needs to adjust accordingly. | ||
3521 | */ | ||
3522 | enum rate_control_changed { | ||
3523 | IEEE80211_RC_HT_CHANGED = BIT(0), | ||
3524 | IEEE80211_RC_SMPS_CHANGED = BIT(1), | ||
3525 | }; | ||
3526 | |||
3527 | /** | ||
3528 | * struct ieee80211_tx_rate_control - rate control information for/from RC algo | 3539 | * struct ieee80211_tx_rate_control - rate control information for/from RC algo |
3529 | * | 3540 | * |
3530 | * @hw: The hardware the algorithm is invoked for. | 3541 | * @hw: The hardware the algorithm is invoked for. |