aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-05-16 17:50:18 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-05 15:32:16 -0400
commitaa430da41019c1694f6a8e3b8bef1d12ed52b0ad (patch)
tree086b60a5c6253cad2c78f5a976d0608f375f2b03 /include/net/cfg80211.h
parentd58e7e37aac0465b08527adadc8016421bd4060e (diff)
cfg80211: provide channel to start_ap function
Instead of setting the channel first and then starting the AP, let cfg80211 store the channel and provide it as one of the AP settings. This means that now you have to set the channel before you can start an AP interface, but since hostapd/wpa_supplicant always do that we're OK with this change. Alternatively, it's now possible to give the channel as an attribute to the start-ap nl80211 command, overriding any preset channel. Cc: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index a8496f4ff5f1..a54fb895f613 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -404,6 +404,8 @@ struct cfg80211_beacon_data {
404 * 404 *
405 * Used to configure an AP interface. 405 * Used to configure an AP interface.
406 * 406 *
407 * @channel: the channel to start the AP on
408 * @channel_type: the channel type to use
407 * @beacon: beacon data 409 * @beacon: beacon data
408 * @beacon_interval: beacon interval 410 * @beacon_interval: beacon interval
409 * @dtim_period: DTIM period 411 * @dtim_period: DTIM period
@@ -417,6 +419,9 @@ struct cfg80211_beacon_data {
417 * @inactivity_timeout: time in seconds to determine station's inactivity. 419 * @inactivity_timeout: time in seconds to determine station's inactivity.
418 */ 420 */
419struct cfg80211_ap_settings { 421struct cfg80211_ap_settings {
422 struct ieee80211_channel *channel;
423 enum nl80211_channel_type channel_type;
424
420 struct cfg80211_beacon_data beacon; 425 struct cfg80211_beacon_data beacon;
421 426
422 int beacon_interval, dtim_period; 427 int beacon_interval, dtim_period;
@@ -2263,7 +2268,10 @@ struct cfg80211_cached_keys;
2263 * @netdev: (private) Used to reference back to the netdev 2268 * @netdev: (private) Used to reference back to the netdev
2264 * @current_bss: (private) Used by the internal configuration code 2269 * @current_bss: (private) Used by the internal configuration code
2265 * @channel: (private) Used by the internal configuration code to track 2270 * @channel: (private) Used by the internal configuration code to track
2266 * user-set AP, monitor and WDS channels for wireless extensions 2271 * the user-set AP, monitor and WDS channel
2272 * @preset_chan: (private) Used by the internal configuration code to
2273 * track the channel to be used for AP later
2274 * @preset_chantype: (private) the corresponding channel type
2267 * @bssid: (private) Used by the internal configuration code 2275 * @bssid: (private) Used by the internal configuration code
2268 * @ssid: (private) Used by the internal configuration code 2276 * @ssid: (private) Used by the internal configuration code
2269 * @ssid_len: (private) Used by the internal configuration code 2277 * @ssid_len: (private) Used by the internal configuration code
@@ -2314,6 +2322,8 @@ struct wireless_dev {
2314 2322
2315 struct cfg80211_internal_bss *current_bss; /* associated / joined */ 2323 struct cfg80211_internal_bss *current_bss; /* associated / joined */
2316 struct ieee80211_channel *channel; 2324 struct ieee80211_channel *channel;
2325 struct ieee80211_channel *preset_chan;
2326 enum nl80211_channel_type preset_chantype;
2317 2327
2318 bool ps; 2328 bool ps;
2319 int ps_timeout; 2329 int ps_timeout;