aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-02-13 09:17:18 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-02-22 14:51:18 -0500
commit8860020e0be1f03d83dc9e9e93e18a4ddbe01038 (patch)
tree09fa9089770e8a42e913f6c11abbba04bec20fad /include/net/cfg80211.h
parent4e3bc141d480661634d0fadad7dbb1ddde70b4d4 (diff)
cfg80211: restructure AP/GO mode API
The AP/GO mode API isn't very clearly defined, it has "set beacon" and "new beacon" etc. Modify the API to the following: * start AP -- all settings * change beacon -- new beacon data * stop AP -- stop AP mode operation This also reflects in the nl80211 API, rename the commands there correspondingly (but keep the old names for compatibility.) Overall, this makes it much clearer what's going on in the API. Kalle developed the ath6kl changes, I created the rest of the patch. Signed-off-by: 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.h70
1 files changed, 40 insertions, 30 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index e0c9ff3a1977..755a7707a7c5 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -366,25 +366,13 @@ struct cfg80211_crypto_settings {
366}; 366};
367 367
368/** 368/**
369 * struct beacon_parameters - beacon parameters 369 * struct cfg80211_beacon_data - beacon data
370 *
371 * Used to configure the beacon for an interface.
372 *
373 * @head: head portion of beacon (before TIM IE) 370 * @head: head portion of beacon (before TIM IE)
374 * or %NULL if not changed 371 * or %NULL if not changed
375 * @tail: tail portion of beacon (after TIM IE) 372 * @tail: tail portion of beacon (after TIM IE)
376 * or %NULL if not changed 373 * or %NULL if not changed
377 * @interval: beacon interval or zero if not changed
378 * @dtim_period: DTIM period or zero if not changed
379 * @head_len: length of @head 374 * @head_len: length of @head
380 * @tail_len: length of @tail 375 * @tail_len: length of @tail
381 * @ssid: SSID to be used in the BSS (note: may be %NULL if not provided from
382 * user space)
383 * @ssid_len: length of @ssid
384 * @hidden_ssid: whether to hide the SSID in Beacon/Probe Response frames
385 * @crypto: crypto settings
386 * @privacy: the BSS uses privacy
387 * @auth_type: Authentication type (algorithm)
388 * @beacon_ies: extra information element(s) to add into Beacon frames or %NULL 376 * @beacon_ies: extra information element(s) to add into Beacon frames or %NULL
389 * @beacon_ies_len: length of beacon_ies in octets 377 * @beacon_ies_len: length of beacon_ies in octets
390 * @proberesp_ies: extra information element(s) to add into Probe Response 378 * @proberesp_ies: extra information element(s) to add into Probe Response
@@ -396,24 +384,46 @@ struct cfg80211_crypto_settings {
396 * @probe_resp_len: length of probe response template (@probe_resp) 384 * @probe_resp_len: length of probe response template (@probe_resp)
397 * @probe_resp: probe response template (AP mode only) 385 * @probe_resp: probe response template (AP mode only)
398 */ 386 */
399struct beacon_parameters { 387struct cfg80211_beacon_data {
400 u8 *head, *tail; 388 const u8 *head, *tail;
401 int interval, dtim_period; 389 const u8 *beacon_ies;
402 int head_len, tail_len; 390 const u8 *proberesp_ies;
391 const u8 *assocresp_ies;
392 const u8 *probe_resp;
393
394 size_t head_len, tail_len;
395 size_t beacon_ies_len;
396 size_t proberesp_ies_len;
397 size_t assocresp_ies_len;
398 size_t probe_resp_len;
399};
400
401/**
402 * struct cfg80211_ap_settings - AP configuration
403 *
404 * Used to configure an AP interface.
405 *
406 * @beacon: beacon data
407 * @beacon_interval: beacon interval
408 * @dtim_period: DTIM period
409 * @ssid: SSID to be used in the BSS (note: may be %NULL if not provided from
410 * user space)
411 * @ssid_len: length of @ssid
412 * @hidden_ssid: whether to hide the SSID in Beacon/Probe Response frames
413 * @crypto: crypto settings
414 * @privacy: the BSS uses privacy
415 * @auth_type: Authentication type (algorithm)
416 */
417struct cfg80211_ap_settings {
418 struct cfg80211_beacon_data beacon;
419
420 int beacon_interval, dtim_period;
403 const u8 *ssid; 421 const u8 *ssid;
404 size_t ssid_len; 422 size_t ssid_len;
405 enum nl80211_hidden_ssid hidden_ssid; 423 enum nl80211_hidden_ssid hidden_ssid;
406 struct cfg80211_crypto_settings crypto; 424 struct cfg80211_crypto_settings crypto;
407 bool privacy; 425 bool privacy;
408 enum nl80211_auth_type auth_type; 426 enum nl80211_auth_type auth_type;
409 const u8 *beacon_ies;
410 size_t beacon_ies_len;
411 const u8 *proberesp_ies;
412 size_t proberesp_ies_len;
413 const u8 *assocresp_ies;
414 size_t assocresp_ies_len;
415 int probe_resp_len;
416 u8 *probe_resp;
417}; 427};
418 428
419/** 429/**
@@ -1518,11 +1528,11 @@ struct cfg80211_ops {
1518 struct net_device *netdev, 1528 struct net_device *netdev,
1519 u8 key_index); 1529 u8 key_index);
1520 1530
1521 int (*add_beacon)(struct wiphy *wiphy, struct net_device *dev, 1531 int (*start_ap)(struct wiphy *wiphy, struct net_device *dev,
1522 struct beacon_parameters *info); 1532 struct cfg80211_ap_settings *settings);
1523 int (*set_beacon)(struct wiphy *wiphy, struct net_device *dev, 1533 int (*change_beacon)(struct wiphy *wiphy, struct net_device *dev,
1524 struct beacon_parameters *info); 1534 struct cfg80211_beacon_data *info);
1525 int (*del_beacon)(struct wiphy *wiphy, struct net_device *dev); 1535 int (*stop_ap)(struct wiphy *wiphy, struct net_device *dev);
1526 1536
1527 1537
1528 int (*add_station)(struct wiphy *wiphy, struct net_device *dev, 1538 int (*add_station)(struct wiphy *wiphy, struct net_device *dev,