aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index e6521261a585..982d2cd80166 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -3411,14 +3411,20 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
3411 */ 3411 */
3412void ieee80211_report_low_ack(struct ieee80211_sta *sta, u32 num_packets); 3412void ieee80211_report_low_ack(struct ieee80211_sta *sta, u32 num_packets);
3413 3413
3414#define IEEE80211_MAX_CSA_COUNTERS_NUM 2
3415
3414/** 3416/**
3415 * struct ieee80211_mutable_offsets - mutable beacon offsets 3417 * struct ieee80211_mutable_offsets - mutable beacon offsets
3416 * @tim_offset: position of TIM element 3418 * @tim_offset: position of TIM element
3417 * @tim_length: size of TIM element 3419 * @tim_length: size of TIM element
3420 * @csa_offs: array of IEEE80211_MAX_CSA_COUNTERS_NUM offsets to CSA counters.
3421 * This array can contain zero values which should be ignored.
3418 */ 3422 */
3419struct ieee80211_mutable_offsets { 3423struct ieee80211_mutable_offsets {
3420 u16 tim_offset; 3424 u16 tim_offset;
3421 u16 tim_length; 3425 u16 tim_length;
3426
3427 u16 csa_counter_offs[IEEE80211_MAX_CSA_COUNTERS_NUM];
3422}; 3428};
3423 3429
3424/** 3430/**
@@ -3433,7 +3439,8 @@ struct ieee80211_mutable_offsets {
3433 * 3439 *
3434 * This function should be used if the beacon frames are generated by the 3440 * This function should be used if the beacon frames are generated by the
3435 * device, and then the driver must use the returned beacon as the template 3441 * device, and then the driver must use the returned beacon as the template
3436 * The driver is responsible to update the DTIM count. 3442 * The driver or the device are responsible to update the DTIM and, when
3443 * applicable, the CSA count.
3437 * 3444 *
3438 * The driver is responsible for freeing the returned skb. 3445 * The driver is responsible for freeing the returned skb.
3439 * 3446 *
@@ -3486,6 +3493,20 @@ static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
3486} 3493}
3487 3494
3488/** 3495/**
3496 * ieee80211_csa_update_counter - request mac80211 to decrement the csa counter
3497 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
3498 *
3499 * The csa counter should be updated after each beacon transmission.
3500 * This function is called implicitly when
3501 * ieee80211_beacon_get/ieee80211_beacon_get_tim are called, however if the
3502 * beacon frames are generated by the device, the driver should call this
3503 * function after each beacon transmission to sync mac80211's csa counters.
3504 *
3505 * Return: new csa counter value
3506 */
3507u8 ieee80211_csa_update_counter(struct ieee80211_vif *vif);
3508
3509/**
3489 * ieee80211_csa_finish - notify mac80211 about channel switch 3510 * ieee80211_csa_finish - notify mac80211 about channel switch
3490 * @vif: &struct ieee80211_vif pointer from the add_interface callback. 3511 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
3491 * 3512 *