diff options
Diffstat (limited to 'drivers/net/wireless/bcmdhd/wl_cfgp2p.h')
-rw-r--r-- | drivers/net/wireless/bcmdhd/wl_cfgp2p.h | 52 |
1 files changed, 34 insertions, 18 deletions
diff --git a/drivers/net/wireless/bcmdhd/wl_cfgp2p.h b/drivers/net/wireless/bcmdhd/wl_cfgp2p.h index 31b8dab..95e7c4ab3 100644 --- a/drivers/net/wireless/bcmdhd/wl_cfgp2p.h +++ b/drivers/net/wireless/bcmdhd/wl_cfgp2p.h @@ -21,7 +21,7 @@ * software in any way with any other Broadcom software provided under a license * other than the GPL, without Broadcom's express prior written consent. * - * $Id: wl_cfgp2p.h 358702 2012-09-25 06:48:56Z $ + * $Id: wl_cfgp2p.h 383351 2013-02-06 13:05:50Z $ */ #ifndef _wl_cfgp2p_h_ #define _wl_cfgp2p_h_ @@ -46,7 +46,7 @@ typedef enum { /* vendor ies max buffer length for probe response or beacon */ #define VNDR_IES_MAX_BUF_LEN 1400 /* normal vendor ies buffer length */ -#define VNDR_IES_BUF_LEN 512 +#define VNDR_IES_BUF_LEN 512 /* Structure to hold all saved P2P and WPS IEs for a BSSCFG */ struct p2p_saved_ie { @@ -72,12 +72,13 @@ struct p2p_bss { struct p2p_info { bool on; /* p2p on/off switch */ bool scan; + int16 search_state; bool vif_created; s8 vir_ifname[IFNAMSIZ]; unsigned long status; struct ether_addr dev_addr; struct ether_addr int_addr; - struct p2p_bss bss_idx[P2PAPI_BSSCFG_MAX]; + struct p2p_bss bss[P2PAPI_BSSCFG_MAX]; struct timer_list listen_timer; wl_p2p_sched_t noa; wl_p2p_ops_t ops; @@ -110,15 +111,16 @@ enum wl_cfgp2p_status { WLP2P_STATUS_ACTION_TX_COMPLETED, WLP2P_STATUS_ACTION_TX_NOACK, WLP2P_STATUS_SCANNING, - WLP2P_STATUS_GO_NEG_PHASE + WLP2P_STATUS_GO_NEG_PHASE, + WLP2P_STATUS_DISC_IN_PROGRESS }; -#define wl_to_p2p_bss_ndev(w, type) ((wl)->p2p->bss_idx[type].dev) -#define wl_to_p2p_bss_bssidx(w, type) ((wl)->p2p->bss_idx[type].bssidx) -#define wl_to_p2p_bss_saved_ie(w, type) ((wl)->p2p->bss_idx[type].saved_ie) -#define wl_to_p2p_bss_private(w, type) ((wl)->p2p->bss_idx[type].private_data) -#define wl_to_p2p_bss(wl, type) ((wl)->p2p->bss_idx[type]) +#define wl_to_p2p_bss_ndev(wl, type) ((wl)->p2p->bss[type].dev) +#define wl_to_p2p_bss_bssidx(wl, type) ((wl)->p2p->bss[type].bssidx) +#define wl_to_p2p_bss_saved_ie(wl, type) ((wl)->p2p->bss[type].saved_ie) +#define wl_to_p2p_bss_private(wl, type) ((wl)->p2p->bss[type].private_data) +#define wl_to_p2p_bss(wl, type) ((wl)->p2p->bss[type]) #define wl_get_p2p_status(wl, stat) ((!(wl)->p2p_supported) ? 0 : test_bit(WLP2P_STATUS_ ## stat, \ &(wl)->p2p->status)) #define wl_set_p2p_status(wl, stat) ((!(wl)->p2p_supported) ? 0 : set_bit(WLP2P_STATUS_ ## stat, \ @@ -134,10 +136,17 @@ enum wl_cfgp2p_status { /* dword align allocation */ #define WLC_IOCTL_MAXLEN 8192 +#ifdef CUSTOMER_HW4 +#define CFGP2P_ERROR_TEXT "CFGP2P-INFO2) " +#else +#define CFGP2P_ERROR_TEXT "CFGP2P-ERROR) " +#endif + + #define CFGP2P_ERR(args) \ do { \ if (wl_dbg_level & WL_DBG_ERR) { \ - printk(KERN_INFO "CFGP2P-INFO2) %s : ", __func__); \ + printk(KERN_INFO CFGP2P_ERROR_TEXT "%s : ", __func__); \ printk args; \ } \ } while (0) @@ -180,7 +189,7 @@ wl_cfgp2p_is_p2p_action(void *frame, u32 frame_len); extern bool wl_cfgp2p_is_gas_action(void *frame, u32 frame_len); extern void -wl_cfgp2p_print_actframe(bool tx, void *frame, u32 frame_len); +wl_cfgp2p_print_actframe(bool tx, void *frame, u32 frame_len, u32 channel); extern s32 wl_cfgp2p_init_priv(struct wl_priv *wl); extern void @@ -212,11 +221,11 @@ wl_cfgp2p_disable_discovery(struct wl_priv *wl); extern s32 wl_cfgp2p_escan(struct wl_priv *wl, struct net_device *dev, u16 active, u32 num_chans, u16 *channels, - s32 search_state, u16 action, u32 bssidx); + s32 search_state, u16 action, u32 bssidx, struct ether_addr *tx_dst_addr); extern s32 wl_cfgp2p_act_frm_search(struct wl_priv *wl, struct net_device *ndev, - s32 bssidx, s32 channel); + s32 bssidx, s32 channel, struct ether_addr *tx_dst_addr); extern wpa_ie_fixed_t * wl_cfgp2p_find_wpaie(u8 *parse, u32 len); @@ -236,7 +245,11 @@ extern s32 wl_cfgp2p_clear_management_ie(struct wl_priv *wl, s32 bssidx); extern s32 -wl_cfgp2p_find_idx(struct wl_priv *wl, struct net_device *ndev); +wl_cfgp2p_find_idx(struct wl_priv *wl, struct net_device *ndev, s32 *index); +extern struct net_device * +wl_cfgp2p_find_ndev(struct wl_priv *wl, s32 bssidx); +extern s32 +wl_cfgp2p_find_type(struct wl_priv *wl, s32 bssidx, s32 *type); extern s32 @@ -295,6 +308,9 @@ wl_cfgp2p_register_ndev(struct wl_priv *wl); extern s32 wl_cfgp2p_unregister_ndev(struct wl_priv *wl); +extern bool +wl_cfgp2p_is_ifops(const struct net_device_ops *if_ops); + /* WiFi Direct */ #define SOCIAL_CHAN_1 1 #define SOCIAL_CHAN_2 6 @@ -311,7 +327,7 @@ wl_cfgp2p_unregister_ndev(struct wl_priv *wl); /* If the provision discovery is for JOIN operations, * then we need not do an internal scan to find GO. - */ +*/ #define IS_PROV_DISC_WITHOUT_GROUP_ID(p2p_ie, len) \ (wl_cfgp2p_retreive_p2pattrib(p2p_ie, P2P_SEID_GROUP_ID) == NULL) @@ -320,9 +336,9 @@ wl_cfgp2p_unregister_ndev(struct wl_priv *wl); (frame->action == P2PSD_ACTION_ID_GAS_CREQ))) #define IS_P2P_PUB_ACT_REQ(frame, p2p_ie, len) \ (wl_cfgp2p_is_pub_action(frame, len) && \ - ((frame->subtype == P2P_PAF_GON_REQ) || \ - (frame->subtype == P2P_PAF_INVITE_REQ) || \ - ((frame->subtype == P2P_PAF_PROVDIS_REQ) && \ + ((frame->subtype == P2P_PAF_GON_REQ) || \ + (frame->subtype == P2P_PAF_INVITE_REQ) || \ + ((frame->subtype == P2P_PAF_PROVDIS_REQ) && \ IS_PROV_DISC_WITHOUT_GROUP_ID(p2p_ie, len)))) #define IS_P2P_PUB_ACT_RSP_SUBTYPE(subtype) ((subtype == P2P_PAF_GON_RSP) || \ ((subtype == P2P_PAF_GON_CONF) || \ |