diff options
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h index 191262578e0..6644ea85f07 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h | |||
@@ -235,6 +235,25 @@ struct brcmf_cfg80211_profile { | |||
235 | s32 band; | 235 | s32 band; |
236 | }; | 236 | }; |
237 | 237 | ||
238 | /** | ||
239 | * struct brcmf_cfg80211_vif - virtual interface specific information. | ||
240 | * | ||
241 | * @ifp: lower layer interface pointer | ||
242 | * @wdev: wireless device. | ||
243 | * @mode: operating mode. | ||
244 | * @roam_off: roaming state. | ||
245 | * @pm_block: power-management blocked. | ||
246 | * @list: linked list. | ||
247 | */ | ||
248 | struct brcmf_cfg80211_vif { | ||
249 | struct brcmf_if *ifp; | ||
250 | struct wireless_dev wdev; | ||
251 | s32 mode; | ||
252 | s32 roam_off; | ||
253 | bool pm_block; | ||
254 | struct list_head list; | ||
255 | }; | ||
256 | |||
238 | /* dongle iscan event loop */ | 257 | /* dongle iscan event loop */ |
239 | struct brcmf_cfg80211_iscan_eloop { | 258 | struct brcmf_cfg80211_iscan_eloop { |
240 | s32 (*handler[WL_SCAN_ERSULTS_LAST]) | 259 | s32 (*handler[WL_SCAN_ERSULTS_LAST]) |
@@ -383,7 +402,7 @@ struct brcmf_pno_scanresults_le { | |||
383 | /** | 402 | /** |
384 | * struct brcmf_cfg80211_info - dongle private data of cfg80211 interface | 403 | * struct brcmf_cfg80211_info - dongle private data of cfg80211 interface |
385 | * | 404 | * |
386 | * @wdev: representing wl cfg80211 device. | 405 | * @wiphy: wiphy object for cfg80211 interface. |
387 | * @conf: dongle configuration. | 406 | * @conf: dongle configuration. |
388 | * @scan_request: cfg80211 scan request object. | 407 | * @scan_request: cfg80211 scan request object. |
389 | * @el: main event loop. | 408 | * @el: main event loop. |
@@ -422,10 +441,11 @@ struct brcmf_pno_scanresults_le { | |||
422 | * @escan_timeout_work: scan timeout worker. | 441 | * @escan_timeout_work: scan timeout worker. |
423 | * @escan_ioctl_buf: dongle command buffer for escan commands. | 442 | * @escan_ioctl_buf: dongle command buffer for escan commands. |
424 | * @ap_info: host ap information. | 443 | * @ap_info: host ap information. |
425 | * @ci: used to link this structure to netdev private data. | 444 | * @vif_list: linked list of vif instances. |
445 | * @vif_cnt: number of vif instances. | ||
426 | */ | 446 | */ |
427 | struct brcmf_cfg80211_info { | 447 | struct brcmf_cfg80211_info { |
428 | struct wireless_dev *wdev; | 448 | struct wiphy *wiphy; |
429 | struct brcmf_cfg80211_conf *conf; | 449 | struct brcmf_cfg80211_conf *conf; |
430 | struct cfg80211_scan_request *scan_request; | 450 | struct cfg80211_scan_request *scan_request; |
431 | struct brcmf_cfg80211_event_loop el; | 451 | struct brcmf_cfg80211_event_loop el; |
@@ -464,11 +484,13 @@ struct brcmf_cfg80211_info { | |||
464 | struct work_struct escan_timeout_work; | 484 | struct work_struct escan_timeout_work; |
465 | u8 *escan_ioctl_buf; | 485 | u8 *escan_ioctl_buf; |
466 | struct ap_info *ap_info; | 486 | struct ap_info *ap_info; |
487 | struct list_head vif_list; | ||
488 | u8 vif_cnt; | ||
467 | }; | 489 | }; |
468 | 490 | ||
469 | static inline struct wiphy *cfg_to_wiphy(struct brcmf_cfg80211_info *w) | 491 | static inline struct wiphy *cfg_to_wiphy(struct brcmf_cfg80211_info *cfg) |
470 | { | 492 | { |
471 | return w->wdev->wiphy; | 493 | return cfg->wiphy; |
472 | } | 494 | } |
473 | 495 | ||
474 | static inline struct brcmf_cfg80211_info *wiphy_to_cfg(struct wiphy *w) | 496 | static inline struct brcmf_cfg80211_info *wiphy_to_cfg(struct wiphy *w) |
@@ -481,9 +503,12 @@ static inline struct brcmf_cfg80211_info *wdev_to_cfg(struct wireless_dev *wd) | |||
481 | return (struct brcmf_cfg80211_info *)(wdev_priv(wd)); | 503 | return (struct brcmf_cfg80211_info *)(wdev_priv(wd)); |
482 | } | 504 | } |
483 | 505 | ||
484 | static inline struct net_device *cfg_to_ndev(struct brcmf_cfg80211_info *cfg) | 506 | static inline |
507 | struct net_device *cfg_to_ndev(struct brcmf_cfg80211_info *cfg) | ||
485 | { | 508 | { |
486 | return cfg->wdev->netdev; | 509 | struct brcmf_cfg80211_vif *vif; |
510 | vif = list_first_entry(&cfg->vif_list, struct brcmf_cfg80211_vif, list); | ||
511 | return vif->wdev.netdev; | ||
487 | } | 512 | } |
488 | 513 | ||
489 | static inline struct brcmf_cfg80211_info *ndev_to_cfg(struct net_device *ndev) | 514 | static inline struct brcmf_cfg80211_info *ndev_to_cfg(struct net_device *ndev) |