aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h202
1 files changed, 160 insertions, 42 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
index 3b2129738d30..52e408ed6f41 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h
@@ -295,50 +295,168 @@ struct escan_info {
295 struct net_device *ndev; 295 struct net_device *ndev;
296}; 296};
297 297
298/* dongle private data of cfg80211 interface */ 298/**
299 * struct brcmf_pno_param_le - PNO scan configuration parameters
300 *
301 * @version: PNO parameters version.
302 * @scan_freq: scan frequency.
303 * @lost_network_timeout: #sec. to declare discovered network as lost.
304 * @flags: Bit field to control features of PFN such as sort criteria auto
305 * enable switch and background scan.
306 * @rssi_margin: Margin to avoid jitter for choosing a PFN based on RSSI sort
307 * criteria.
308 * @bestn: number of best networks in each scan.
309 * @mscan: number of scans recorded.
310 * @repeat: minimum number of scan intervals before scan frequency changes
311 * in adaptive scan.
312 * @exp: exponent of 2 for maximum scan interval.
313 * @slow_freq: slow scan period.
314 */
315struct brcmf_pno_param_le {
316 __le32 version;
317 __le32 scan_freq;
318 __le32 lost_network_timeout;
319 __le16 flags;
320 __le16 rssi_margin;
321 u8 bestn;
322 u8 mscan;
323 u8 repeat;
324 u8 exp;
325 __le32 slow_freq;
326};
327
328/**
329 * struct brcmf_pno_net_param_le - scan parameters per preferred network.
330 *
331 * @ssid: ssid name and its length.
332 * @flags: bit2: hidden.
333 * @infra: BSS vs IBSS.
334 * @auth: Open vs Closed.
335 * @wpa_auth: WPA type.
336 * @wsec: wsec value.
337 */
338struct brcmf_pno_net_param_le {
339 struct brcmf_ssid_le ssid;
340 __le32 flags;
341 __le32 infra;
342 __le32 auth;
343 __le32 wpa_auth;
344 __le32 wsec;
345};
346
347/**
348 * struct brcmf_pno_net_info_le - information per found network.
349 *
350 * @bssid: BSS network identifier.
351 * @channel: channel number only.
352 * @SSID_len: length of ssid.
353 * @SSID: ssid characters.
354 * @RSSI: receive signal strength (in dBm).
355 * @timestamp: age in seconds.
356 */
357struct brcmf_pno_net_info_le {
358 u8 bssid[ETH_ALEN];
359 u8 channel;
360 u8 SSID_len;
361 u8 SSID[32];
362 __le16 RSSI;
363 __le16 timestamp;
364};
365
366/**
367 * struct brcmf_pno_scanresults_le - result returned in PNO NET FOUND event.
368 *
369 * @version: PNO version identifier.
370 * @status: indicates completion status of PNO scan.
371 * @count: amount of brcmf_pno_net_info_le entries appended.
372 */
373struct brcmf_pno_scanresults_le {
374 __le32 version;
375 __le32 status;
376 __le32 count;
377};
378
379/**
380 * struct brcmf_cfg80211_priv - dongle private data of cfg80211 interface
381 *
382 * @wdev: representing wl cfg80211 device.
383 * @conf: dongle configuration.
384 * @scan_request: cfg80211 scan request object.
385 * @el: main event loop.
386 * @evt_q_list: used for event queue.
387 * @evt_q_lock: for event queue synchronization.
388 * @usr_sync: mainly for dongle up/down synchronization.
389 * @bss_list: bss_list holding scanned ap information.
390 * @scan_results: results of the last scan.
391 * @scan_req_int: internal scan request object.
392 * @bss_info: bss information for cfg80211 layer.
393 * @ie: information element object for internal purpose.
394 * @profile: holding dongle profile.
395 * @iscan: iscan controller information.
396 * @conn_info: association info.
397 * @pmk_list: wpa2 pmk list.
398 * @event_work: event handler work struct.
399 * @status: current dongle status.
400 * @pub: common driver information.
401 * @channel: current channel.
402 * @iscan_on: iscan on/off switch.
403 * @iscan_kickstart: indicate iscan already started.
404 * @active_scan: current scan mode.
405 * @sched_escan: e-scan for scheduled scan support running.
406 * @ibss_starter: indicates this sta is ibss starter.
407 * @link_up: link/connection up flag.
408 * @pwr_save: indicate whether dongle to support power save mode.
409 * @dongle_up: indicate whether dongle up or not.
410 * @roam_on: on/off switch for dongle self-roaming.
411 * @scan_tried: indicates if first scan attempted.
412 * @dcmd_buf: dcmd buffer.
413 * @extra_buf: mainly to grab assoc information.
414 * @debugfsdir: debugfs folder for this device.
415 * @escan_on: escan on/off switch.
416 * @escan_info: escan information.
417 * @escan_timeout: Timer for catch scan timeout.
418 * @escan_timeout_work: scan timeout worker.
419 * @escan_ioctl_buf: dongle command buffer for escan commands.
420 * @ci: used to link this structure to netdev private data.
421 */
299struct brcmf_cfg80211_priv { 422struct brcmf_cfg80211_priv {
300 struct wireless_dev *wdev; /* representing wl cfg80211 device */ 423 struct wireless_dev *wdev;
301 struct brcmf_cfg80211_conf *conf; /* dongle configuration */ 424 struct brcmf_cfg80211_conf *conf;
302 struct cfg80211_scan_request *scan_request; /* scan request 425 struct cfg80211_scan_request *scan_request;
303 object */ 426 struct brcmf_cfg80211_event_loop el;
304 struct brcmf_cfg80211_event_loop el; /* main event loop */ 427 struct list_head evt_q_list;
305 struct list_head evt_q_list; /* used for event queue */ 428 spinlock_t evt_q_lock;
306 spinlock_t evt_q_lock; /* for event queue synchronization */ 429 struct mutex usr_sync;
307 struct mutex usr_sync; /* maily for dongle up/down synchronization */ 430 struct brcmf_scan_results *bss_list;
308 struct brcmf_scan_results *bss_list; /* bss_list holding scanned
309 ap information */
310 struct brcmf_scan_results *scan_results; 431 struct brcmf_scan_results *scan_results;
311 struct brcmf_cfg80211_scan_req *scan_req_int; /* scan request object 432 struct brcmf_cfg80211_scan_req *scan_req_int;
312 for internal purpose */ 433 struct wl_cfg80211_bss_info *bss_info;
313 struct wl_cfg80211_bss_info *bss_info; /* bss information for 434 struct brcmf_cfg80211_ie ie;
314 cfg80211 layer */ 435 struct brcmf_cfg80211_profile *profile;
315 struct brcmf_cfg80211_ie ie; /* information element object for 436 struct brcmf_cfg80211_iscan_ctrl *iscan;
316 internal purpose */ 437 struct brcmf_cfg80211_connect_info conn_info;
317 struct brcmf_cfg80211_profile *profile; /* holding dongle profile */ 438 struct brcmf_cfg80211_pmk_list *pmk_list;
318 struct brcmf_cfg80211_iscan_ctrl *iscan; /* iscan controller */ 439 struct work_struct event_work;
319 struct brcmf_cfg80211_connect_info conn_info; /* association info */ 440 unsigned long status;
320 struct brcmf_cfg80211_pmk_list *pmk_list; /* wpa2 pmk list */ 441 struct brcmf_pub *pub;
321 struct work_struct event_work; /* event handler work struct */ 442 u32 channel;
322 unsigned long status; /* current dongle status */ 443 bool iscan_on;
323 void *pub; 444 bool iscan_kickstart;
324 u32 channel; /* current channel */ 445 bool active_scan;
325 bool iscan_on; /* iscan on/off switch */ 446 bool sched_escan;
326 bool iscan_kickstart; /* indicate iscan already started */ 447 bool ibss_starter;
327 bool active_scan; /* current scan mode */ 448 bool link_up;
328 bool ibss_starter; /* indicates this sta is ibss starter */ 449 bool pwr_save;
329 bool link_up; /* link/connection up flag */ 450 bool dongle_up;
330 bool pwr_save; /* indicate whether dongle to support 451 bool roam_on;
331 power save mode */ 452 bool scan_tried;
332 bool dongle_up; /* indicate whether dongle up or not */ 453 u8 *dcmd_buf;
333 bool roam_on; /* on/off switch for dongle self-roaming */ 454 u8 *extra_buf;
334 bool scan_tried; /* indicates if first scan attempted */
335 u8 *dcmd_buf; /* dcmd buffer */
336 u8 *extra_buf; /* maily to grab assoc information */
337 struct dentry *debugfsdir; 455 struct dentry *debugfsdir;
338 bool escan_on; /* escan on/off switch */ 456 bool escan_on;
339 struct escan_info escan_info; /* escan information */ 457 struct escan_info escan_info;
340 struct timer_list escan_timeout; /* Timer for catch scan timeout */ 458 struct timer_list escan_timeout;
341 struct work_struct escan_timeout_work; /* scan timeout worker */ 459 struct work_struct escan_timeout_work;
342 u8 *escan_ioctl_buf; 460 u8 *escan_ioctl_buf;
343 u8 ci[0] __aligned(NETDEV_ALIGN); 461 u8 ci[0] __aligned(NETDEV_ALIGN);
344}; 462};
@@ -379,7 +497,7 @@ brcmf_cfg80211_connect_info *cfg_to_conn(struct brcmf_cfg80211_priv *cfg)
379 497
380extern struct brcmf_cfg80211_dev *brcmf_cfg80211_attach(struct net_device *ndev, 498extern struct brcmf_cfg80211_dev *brcmf_cfg80211_attach(struct net_device *ndev,
381 struct device *busdev, 499 struct device *busdev,
382 void *data); 500 struct brcmf_pub *drvr);
383extern void brcmf_cfg80211_detach(struct brcmf_cfg80211_dev *cfg); 501extern void brcmf_cfg80211_detach(struct brcmf_cfg80211_dev *cfg);
384 502
385/* event handler from dongle */ 503/* event handler from dongle */