aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2014-05-09 07:11:49 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-05-15 09:01:00 -0400
commit6ec8c332a0f93959e615158cc212b3abfd52abe7 (patch)
tree6141a73915924c13192fd5075bd4d0233219246f /include/net/mac80211.h
parent0d06d9ba93ad4272dc3cd2865deb18c9e9885fd5 (diff)
mac80211: Provide ieee80211_beacon_get_template API
Add a new API ieee80211_beacon_get_template, which doesn't affect DTIM counter and should be used if the device generates beacon frames, and new beacon template is needed. In addition set the offsets to TIM IE for MESH interface. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h43
1 files changed, 36 insertions, 7 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 3541c48a97cd..e6521261a585 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -3412,6 +3412,39 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
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/** 3414/**
3415 * struct ieee80211_mutable_offsets - mutable beacon offsets
3416 * @tim_offset: position of TIM element
3417 * @tim_length: size of TIM element
3418 */
3419struct ieee80211_mutable_offsets {
3420 u16 tim_offset;
3421 u16 tim_length;
3422};
3423
3424/**
3425 * ieee80211_beacon_get_template - beacon template generation function
3426 * @hw: pointer obtained from ieee80211_alloc_hw().
3427 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
3428 * @offs: &struct ieee80211_mutable_offsets pointer to struct that will
3429 * receive the offsets that may be updated by the driver.
3430 *
3431 * If the driver implements beaconing modes, it must use this function to
3432 * obtain the beacon template.
3433 *
3434 * 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
3436 * The driver is responsible to update the DTIM count.
3437 *
3438 * The driver is responsible for freeing the returned skb.
3439 *
3440 * Return: The beacon template. %NULL on error.
3441 */
3442struct sk_buff *
3443ieee80211_beacon_get_template(struct ieee80211_hw *hw,
3444 struct ieee80211_vif *vif,
3445 struct ieee80211_mutable_offsets *offs);
3446
3447/**
3415 * ieee80211_beacon_get_tim - beacon generation function 3448 * ieee80211_beacon_get_tim - beacon generation function
3416 * @hw: pointer obtained from ieee80211_alloc_hw(). 3449 * @hw: pointer obtained from ieee80211_alloc_hw().
3417 * @vif: &struct ieee80211_vif pointer from the add_interface callback. 3450 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
@@ -3422,16 +3455,12 @@ void ieee80211_report_low_ack(struct ieee80211_sta *sta, u32 num_packets);
3422 * Set to 0 if invalid (in non-AP modes). 3455 * Set to 0 if invalid (in non-AP modes).
3423 * 3456 *
3424 * If the driver implements beaconing modes, it must use this function to 3457 * If the driver implements beaconing modes, it must use this function to
3425 * obtain the beacon frame/template. 3458 * obtain the beacon frame.
3426 * 3459 *
3427 * If the beacon frames are generated by the host system (i.e., not in 3460 * If the beacon frames are generated by the host system (i.e., not in
3428 * hardware/firmware), the driver uses this function to get each beacon 3461 * hardware/firmware), the driver uses this function to get each beacon
3429 * frame from mac80211 -- it is responsible for calling this function 3462 * frame from mac80211 -- it is responsible for calling this function exactly
3430 * before the beacon is needed (e.g. based on hardware interrupt). 3463 * once before the beacon is needed (e.g. based on hardware interrupt).
3431 *
3432 * If the beacon frames are generated by the device, then the driver
3433 * must use the returned beacon as the template and change the TIM IE
3434 * according to the current DTIM parameters/TIM bitmap.
3435 * 3464 *
3436 * The driver is responsible for freeing the returned skb. 3465 * The driver is responsible for freeing the returned skb.
3437 * 3466 *