aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-07-09 08:40:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-07-14 14:30:07 -0400
commit9d139c810a2aa17365cc548d0cd2a189d8433c65 (patch)
treeef10ca55f93689ab97368376d277102d2527c961 /include
parentf3947e2dfa3b18f375b7acd03b7ee2877d0751fc (diff)
mac80211: revamp beacon configuration
This patch changes mac80211's beacon configuration handling to never pass skbs to the driver directly but rather always require the driver to use ieee80211_beacon_get(). Additionally, it introduces "change flags" on the config_interface() call to enable drivers to figure out what is changing. Finally, it removes the beacon_update() driver callback in favour of having IBSS beacon delivered by ieee80211_beacon_get() as well. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/mac80211.h49
1 files changed, 16 insertions, 33 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 9672a04c4f7b..47c072eab42c 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -529,33 +529,38 @@ struct ieee80211_if_init_conf {
529}; 529};
530 530
531/** 531/**
532 * enum ieee80211_if_conf_change - interface config change flags
533 *
534 * @IEEE80211_IFCC_BSSID: The BSSID changed.
535 * @IEEE80211_IFCC_SSID: The SSID changed.
536 * @IEEE80211_IFCC_BEACON: The beacon for this interface changed
537 * (currently AP and MESH only), use ieee80211_beacon_get().
538 */
539enum ieee80211_if_conf_change {
540 IEEE80211_IFCC_BSSID = BIT(0),
541 IEEE80211_IFCC_SSID = BIT(1),
542 IEEE80211_IFCC_BEACON = BIT(2),
543};
544
545/**
532 * struct ieee80211_if_conf - configuration of an interface 546 * struct ieee80211_if_conf - configuration of an interface
533 * 547 *
534 * @type: type of the interface. This is always the same as was specified in 548 * @changed: parameters that have changed, see &enum ieee80211_if_conf_change.
535 * &struct ieee80211_if_init_conf. The type of an interface never changes
536 * during the life of the interface; this field is present only for
537 * convenience.
538 * @bssid: BSSID of the network we are associated to/creating. 549 * @bssid: BSSID of the network we are associated to/creating.
539 * @ssid: used (together with @ssid_len) by drivers for hardware that 550 * @ssid: used (together with @ssid_len) by drivers for hardware that
540 * generate beacons independently. The pointer is valid only during the 551 * generate beacons independently. The pointer is valid only during the
541 * config_interface() call, so copy the value somewhere if you need 552 * config_interface() call, so copy the value somewhere if you need
542 * it. 553 * it.
543 * @ssid_len: length of the @ssid field. 554 * @ssid_len: length of the @ssid field.
544 * @beacon: beacon template. Valid only if @host_gen_beacon_template in
545 * &struct ieee80211_hw is set. The driver is responsible of freeing
546 * the sk_buff.
547 * @beacon_control: tx_control for the beacon template, this field is only
548 * valid when the @beacon field was set.
549 * 555 *
550 * This structure is passed to the config_interface() callback of 556 * This structure is passed to the config_interface() callback of
551 * &struct ieee80211_hw. 557 * &struct ieee80211_hw.
552 */ 558 */
553struct ieee80211_if_conf { 559struct ieee80211_if_conf {
554 int type; 560 u32 changed;
555 u8 *bssid; 561 u8 *bssid;
556 u8 *ssid; 562 u8 *ssid;
557 size_t ssid_len; 563 size_t ssid_len;
558 struct sk_buff *beacon;
559}; 564};
560 565
561/** 566/**
@@ -683,15 +688,6 @@ enum ieee80211_tkip_key_type {
683 * any particular flags. There are some exceptions to this rule, 688 * any particular flags. There are some exceptions to this rule,
684 * however, so you are advised to review these flags carefully. 689 * however, so you are advised to review these flags carefully.
685 * 690 *
686 * @IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE:
687 * The device only needs to be supplied with a beacon template.
688 * If you need the host to generate each beacon then don't use
689 * this flag and call ieee80211_beacon_get() when you need the
690 * next beacon frame. Note that if you set this flag, you must
691 * implement the set_tim() callback for powersave mode to work
692 * properly.
693 * This flag is only relevant for access-point mode.
694 *
695 * @IEEE80211_HW_RX_INCLUDES_FCS: 691 * @IEEE80211_HW_RX_INCLUDES_FCS:
696 * Indicates that received frames passed to the stack include 692 * Indicates that received frames passed to the stack include
697 * the FCS at the end. 693 * the FCS at the end.
@@ -1151,17 +1147,6 @@ enum ieee80211_ampdu_mlme_action {
1151 * function is optional if the firmware/hardware takes full care of 1147 * function is optional if the firmware/hardware takes full care of
1152 * TSF synchronization. 1148 * TSF synchronization.
1153 * 1149 *
1154 * @beacon_update: Setup beacon data for IBSS beacons. Unlike access point,
1155 * IBSS uses a fixed beacon frame which is configured using this
1156 * function.
1157 * If the driver returns success (0) from this callback, it owns
1158 * the skb. That means the driver is responsible to kfree_skb() it.
1159 * The control structure is not dynamically allocated. That means the
1160 * driver does not own the pointer and if it needs it somewhere
1161 * outside of the context of this function, it must copy it
1162 * somewhere else.
1163 * This handler is required only for IBSS mode.
1164 *
1165 * @tx_last_beacon: Determine whether the last IBSS beacon was sent by us. 1150 * @tx_last_beacon: Determine whether the last IBSS beacon was sent by us.
1166 * This is needed only for IBSS mode and the result of this function is 1151 * This is needed only for IBSS mode and the result of this function is
1167 * used to determine whether to reply to Probe Requests. 1152 * used to determine whether to reply to Probe Requests.
@@ -1219,8 +1204,6 @@ struct ieee80211_ops {
1219 struct ieee80211_tx_queue_stats *stats); 1204 struct ieee80211_tx_queue_stats *stats);
1220 u64 (*get_tsf)(struct ieee80211_hw *hw); 1205 u64 (*get_tsf)(struct ieee80211_hw *hw);
1221 void (*reset_tsf)(struct ieee80211_hw *hw); 1206 void (*reset_tsf)(struct ieee80211_hw *hw);
1222 int (*beacon_update)(struct ieee80211_hw *hw,
1223 struct sk_buff *skb);
1224 int (*tx_last_beacon)(struct ieee80211_hw *hw); 1207 int (*tx_last_beacon)(struct ieee80211_hw *hw);
1225 int (*ampdu_action)(struct ieee80211_hw *hw, 1208 int (*ampdu_action)(struct ieee80211_hw *hw,
1226 enum ieee80211_ampdu_mlme_action action, 1209 enum ieee80211_ampdu_mlme_action action,