1 /* 2 * Linux cfgp2p driver 3 * 4 * Copyright (C) 2020, Broadcom. 5 * 6 * Unless you and Broadcom execute a separate written software license 7 * agreement governing use of this software, this software is licensed to you 8 * under the terms of the GNU General Public License version 2 (the "GPL"), 9 * available at http://www.broadcom.com/licenses/GPLv2.php, with the 10 * following added to such license: 11 * 12 * As a special exception, the copyright holders of this software give you 13 * permission to link this software with independent modules, and to copy and 14 * distribute the resulting executable under terms of your choice, provided that 15 * you also meet, for each linked independent module, the terms and conditions of 16 * the license of that module. An independent module is a module which is not 17 * derived from this software. The special exception does not apply to any 18 * modifications of the software. 19 * 20 * 21 * <<Broadcom-WL-IPTag/Dual:>> 22 */ 23 #ifndef _wl_cfgp2p_h_ 24 #define _wl_cfgp2p_h_ 25 #include <802.11.h> 26 #include <p2p.h> 27 28 struct bcm_cfg80211; 29 extern u32 wl_dbg_level; 30 31 typedef struct wifi_p2p_ie wifi_wfd_ie_t; 32 /* Enumeration of the usages of the BSSCFGs used by the P2P Library. Do not 33 * confuse this with a bsscfg index. This value is an index into the 34 * saved_ie[] array of structures which in turn contains a bsscfg index field. 35 */ 36 typedef enum { 37 P2PAPI_BSSCFG_PRIMARY, /**< maps to driver's primary bsscfg */ 38 P2PAPI_BSSCFG_DEVICE, /**< maps to driver's P2P device discovery bsscfg */ 39 P2PAPI_BSSCFG_CONNECTION1, /**< maps to driver's P2P connection bsscfg */ 40 P2PAPI_BSSCFG_CONNECTION2, 41 P2PAPI_BSSCFG_MAX 42 } p2p_bsscfg_type_t; 43 44 typedef enum { 45 P2P_SCAN_PURPOSE_MIN, 46 P2P_SCAN_SOCIAL_CHANNEL, /**< scan for social channel */ 47 P2P_SCAN_AFX_PEER_NORMAL, /**< scan for action frame search */ 48 P2P_SCAN_AFX_PEER_REDUCED, /**< scan for action frame search with short time */ 49 P2P_SCAN_DURING_CONNECTED, /**< scan during connected status */ 50 P2P_SCAN_CONNECT_TRY, /**< scan for connecting */ 51 P2P_SCAN_NORMAL, /**< scan during not-connected status */ 52 P2P_SCAN_PURPOSE_MAX 53 } p2p_scan_purpose_t; 54 55 /** vendor ies max buffer length for probe response or beacon */ 56 #define VNDR_IES_MAX_BUF_LEN 1400 57 /** normal vendor ies buffer length */ 58 #define VNDR_IES_BUF_LEN 512 59 60 struct p2p_bss { 61 s32 bssidx; 62 struct net_device *dev; 63 void *private_data; 64 struct ether_addr mac_addr; 65 }; 66 67 struct p2p_info { 68 bool on; /**< p2p on/off switch */ 69 bool scan; 70 int16 search_state; 71 s8 vir_ifname[IFNAMSIZ]; 72 unsigned long status; 73 struct p2p_bss bss[P2PAPI_BSSCFG_MAX]; 74 timer_list_compat_t listen_timer; 75 wl_p2p_sched_t noa; 76 wl_p2p_ops_t ops; 77 wlc_ssid_t ssid; 78 s8 p2p_go_count; 79 }; 80 81 #define MAX_VNDR_IE_NUMBER 10 82 83 struct parsed_vndr_ie_info { 84 const char *ie_ptr; 85 u32 ie_len; /**< total length including id & length field */ 86 vndr_ie_t vndrie; 87 }; 88 89 struct parsed_vndr_ies { 90 u32 count; 91 struct parsed_vndr_ie_info ie_info[MAX_VNDR_IE_NUMBER]; 92 }; 93 94 /* dongle status */ 95 enum wl_cfgp2p_status { 96 WLP2P_STATUS_DISCOVERY_ON = 0, 97 WLP2P_STATUS_SEARCH_ENABLED, 98 WLP2P_STATUS_IF_ADDING, 99 WLP2P_STATUS_IF_DELETING, 100 WLP2P_STATUS_IF_CHANGING, 101 WLP2P_STATUS_IF_CHANGED, 102 WLP2P_STATUS_LISTEN_EXPIRED, 103 WLP2P_STATUS_ACTION_TX_COMPLETED, 104 WLP2P_STATUS_ACTION_TX_NOACK, 105 WLP2P_STATUS_SCANNING, 106 WLP2P_STATUS_GO_NEG_PHASE, 107 WLP2P_STATUS_DISC_IN_PROGRESS 108 }; 109 110 #define wl_to_p2p_bss_ndev(cfg, type) ((cfg)->p2p->bss[type].dev) 111 #define wl_to_p2p_bss_bssidx(cfg, type) ((cfg)->p2p->bss[type].bssidx) 112 #define wl_to_p2p_bss_macaddr(cfg, type) &((cfg)->p2p->bss[type].mac_addr) 113 #define wl_to_p2p_bss_saved_ie(cfg, type) ((cfg)->p2p->bss[type].saved_ie) 114 #define wl_to_p2p_bss_private(cfg, type) ((cfg)->p2p->bss[type].private_data) 115 #define wl_to_p2p_bss(cfg, type) ((cfg)->p2p->bss[type]) 116 #define wl_get_p2p_status(cfg, stat) ((!(cfg)->p2p_supported) ? 0 : \ 117 test_bit(WLP2P_STATUS_ ## stat, &(cfg)->p2p->status)) 118 #define wl_set_p2p_status(cfg, stat) ((!(cfg)->p2p_supported) ? 0 : \ 119 set_bit(WLP2P_STATUS_ ## stat, &(cfg)->p2p->status)) 120 #define wl_clr_p2p_status(cfg, stat) ((!(cfg)->p2p_supported) ? 0 : \ 121 clear_bit(WLP2P_STATUS_ ## stat, &(cfg)->p2p->status)) 122 #define wl_chg_p2p_status(cfg, stat) ((!(cfg)->p2p_supported) ? 0 : \ 123 change_bit(WLP2P_STATUS_ ## stat, &(cfg)->p2p->status)) 124 #define p2p_on(cfg) ((cfg)->p2p->on) 125 #define p2p_scan(cfg) ((cfg)->p2p->scan) 126 #define p2p_is_on(cfg) ((cfg)->p2p && (cfg)->p2p->on) 127 128 /* dword align allocation */ 129 #define WLC_IOCTL_MAXLEN 8192 130 131 #if defined(CUSTOMER_DBG_PREFIX_ENABLE) 132 #define USER_PREFIX_CFGP2P "[cfgp2p][wlan] " 133 #define CFGP2P_ERROR_TEXT USER_PREFIX_CFGP2P 134 #define CFGP2P_INFO_TEXT USER_PREFIX_CFGP2P 135 #define CFGP2P_ACTION_TEXT USER_PREFIX_CFGP2P 136 #define CFGP2P_DEBUG_TEXT USER_PREFIX_CFGP2P 137 #else 138 /* Samsung want to print INFO2 instead of ERROR 139 * because most of case, ERROR message is not a real ERROR. 140 * but it can be regarded as real error case for Tester 141 */ 142 #ifdef CUSTOMER_HW4_DEBUG 143 #define CFGP2P_ERROR_TEXT "CFGP2P-INFO2) " 144 #else 145 #define CFGP2P_ERROR_TEXT "CFGP2P-ERROR) " 146 #endif /* CUSTOMER_HW4_DEBUG */ 147 #define CFGP2P_INFO_TEXT "CFGP2P-INFO) " 148 #define CFGP2P_ACTION_TEXT "CFGP2P-ACTION) " 149 #define CFGP2P_DEBUG_TEXT "CFGP2P-DEBUG) " 150 #endif /* defined(CUSTOMER_DBG_PREFIX_ENABLE) */ 151 152 #ifdef DHD_LOG_DUMP 153 #define CFGP2P_ERR_MSG(x, args...) \ 154 do { \ 155 if (wl_dbg_level & WL_DBG_ERR) { \ 156 printf(CFGP2P_ERROR_TEXT "%s : " x, __func__, ## args); \ 157 DHD_LOG_DUMP_WRITE_TS_FN; \ 158 DHD_LOG_DUMP_WRITE(x, ## args); \ 159 } \ 160 } while (0) 161 #define CFGP2P_ERR(x) CFGP2P_ERR_MSG x 162 #define CFGP2P_INFO_MSG(x, args...) \ 163 do { \ 164 if (wl_dbg_level & WL_DBG_INFO) { \ 165 printf(CFGP2P_INFO_TEXT "%s : " x, __func__, ## args); \ 166 DHD_LOG_DUMP_WRITE_TS_FN; \ 167 DHD_LOG_DUMP_WRITE(x, ## args); \ 168 } \ 169 } while (0) 170 #define CFGP2P_INFO(x) CFGP2P_INFO_MSG x 171 #define CFGP2P_ACTION_MSG(x, args...) \ 172 do { \ 173 if (wl_dbg_level & WL_DBG_P2P_ACTION) { \ 174 printf(CFGP2P_ACTION_TEXT "%s : " x, __func__, ## args); \ 175 DHD_LOG_DUMP_WRITE_TS_FN; \ 176 DHD_LOG_DUMP_WRITE(x, ## args); \ 177 } \ 178 } while (0) 179 #define CFGP2P_ACTION(x) CFGP2P_ACTION_MSG x 180 #else 181 #define CFGP2P_ERR_MSG(x, args...) \ 182 do { \ 183 if (wl_dbg_level & WL_DBG_ERR) { \ 184 printf(CFGP2P_ERROR_TEXT "%s : " x, __func__, ## args); \ 185 } \ 186 } while (0) 187 #define CFGP2P_ERR(x) CFGP2P_ERR_MSG x 188 #define CFGP2P_INFO_MSG(x, args...) \ 189 do { \ 190 if (wl_dbg_level & WL_DBG_INFO) { \ 191 printf(CFGP2P_INFO_TEXT "%s : " x, __func__, ## args); \ 192 } \ 193 } while (0) 194 #define CFGP2P_INFO(x) CFGP2P_INFO_MSG x 195 #define CFGP2P_ACTION_MSG(x, args...) \ 196 do { \ 197 if (wl_dbg_level & WL_DBG_P2P_ACTION) { \ 198 printf(CFGP2P_ACTION_TEXT "%s : " x, __func__, ## args); \ 199 } \ 200 } while (0) 201 #define CFGP2P_ACTION(x) CFGP2P_ACTION_MSG x 202 #endif /* DHD_LOG_DUMP */ 203 204 #define CFGP2P_DBG_MSG(x, args...) \ 205 do { \ 206 if (wl_dbg_level & WL_DBG_DBG) { \ 207 printf(CFGP2P_DEBUG_TEXT "%s : " x, __func__, ## args); \ 208 } \ 209 } while (0) 210 #define CFGP2P_DBG(x) CFGP2P_DBG_MSG x 211 212 #define INIT_TIMER(timer, func, duration, extra_delay) \ 213 do { \ 214 init_timer_compat(timer, func, cfg); \ 215 timer_expires(timer) = jiffies + msecs_to_jiffies(duration + extra_delay); \ 216 add_timer(timer); \ 217 } while (0); 218 219 #if (LINUX_VERSION_CODE <= KERNEL_VERSION(3, 0, 8)) 220 #ifdef WL_SUPPORT_BACKPORTED_KPATCHES 221 #undef WL_SUPPORT_BACKPORTED_KPATCHES 222 #endif 223 #endif 224 225 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)) 226 #ifdef WL_CFG80211_STA_EVENT 227 #undef WL_CFG80211_STA_EVENT 228 #endif 229 #endif 230 231 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) && \ 232 !defined(WL_CFG80211_P2P_DEV_IF) 233 #define WL_CFG80211_P2P_DEV_IF 234 235 #ifdef WL_ENABLE_P2P_IF 236 #undef WL_ENABLE_P2P_IF 237 #endif 238 239 #ifdef WL_SUPPORT_BACKPORTED_KPATCHES 240 #undef WL_SUPPORT_BACKPORTED_KPATCHES 241 #endif 242 #else 243 #ifdef WLP2P 244 #ifndef WL_ENABLE_P2P_IF 245 /* Enable P2P network Interface if P2P support is enabled */ 246 #define WL_ENABLE_P2P_IF 247 #endif /* WL_ENABLE_P2P_IF */ 248 #endif /* WLP2P */ 249 #endif /* (LINUX_VERSION >= VERSION(3, 8, 0)) */ 250 251 #ifndef WL_CFG80211_P2P_DEV_IF 252 #ifdef WL_NEWCFG_PRIVCMD_SUPPORT 253 #undef WL_NEWCFG_PRIVCMD_SUPPORT 254 #endif 255 #endif /* WL_CFG80211_P2P_DEV_IF */ 256 257 #if defined(WL_ENABLE_P2P_IF) && (defined(WL_CFG80211_P2P_DEV_IF) || \ 258 (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))) 259 #error Disable 'WL_ENABLE_P2P_IF', if 'WL_CFG80211_P2P_DEV_IF' is enabled \ 260 or kernel version is 3.8.0 or above 261 #endif /* WL_ENABLE_P2P_IF && (WL_CFG80211_P2P_DEV_IF || (LINUX_VERSION >= VERSION(3, 8, 0))) */ 262 263 #if !defined(WLP2P) && \ 264 (defined(WL_ENABLE_P2P_IF) || defined(WL_CFG80211_P2P_DEV_IF)) 265 #error WLP2P not defined 266 #endif /* !WLP2P && (WL_ENABLE_P2P_IF || WL_CFG80211_P2P_DEV_IF) */ 267 268 #if defined(WL_CFG80211_P2P_DEV_IF) 269 #define bcm_struct_cfgdev struct wireless_dev 270 #else 271 #define bcm_struct_cfgdev struct net_device 272 #endif /* WL_CFG80211_P2P_DEV_IF */ 273 274 /* If we take 10 or 30 as count value, operation 275 * may failed due to full scan and noisy environments. 276 * So, we choose 50 as the optimum value for P2P ECSA. 277 */ 278 #define P2P_ECSA_CNT 50 279 280 extern void 281 wl_cfgp2p_listen_expired(unsigned long data); 282 extern bool 283 wl_cfgp2p_is_pub_action(void *frame, u32 frame_len); 284 extern bool 285 wl_cfgp2p_is_p2p_action(void *frame, u32 frame_len); 286 extern bool 287 wl_cfgp2p_is_gas_action(void *frame, u32 frame_len); 288 extern bool 289 wl_cfgp2p_is_p2p_gas_action(void *frame, u32 frame_len); 290 extern void 291 wl_cfgp2p_print_actframe(bool tx, void *frame, u32 frame_len, u32 channel); 292 extern s32 293 wl_cfgp2p_init_priv(struct bcm_cfg80211 *cfg); 294 extern void 295 wl_cfgp2p_deinit_priv(struct bcm_cfg80211 *cfg); 296 extern s32 297 wl_cfgp2p_set_firm_p2p(struct bcm_cfg80211 *cfg); 298 extern s32 299 wl_cfgp2p_set_p2p_mode(struct bcm_cfg80211 *cfg, u8 mode, 300 u32 channel, u16 listen_ms, int bssidx); 301 extern s32 302 wl_cfgp2p_ifadd(struct bcm_cfg80211 *cfg, struct ether_addr *mac, u8 if_type, 303 chanspec_t chspec); 304 extern s32 305 wl_cfgp2p_ifdisable(struct bcm_cfg80211 *cfg, struct ether_addr *mac); 306 extern s32 307 wl_cfgp2p_ifdel(struct bcm_cfg80211 *cfg, struct ether_addr *mac); 308 extern s32 309 wl_cfgp2p_ifchange(struct bcm_cfg80211 *cfg, struct ether_addr *mac, u8 if_type, 310 chanspec_t chspec, s32 conn_idx); 311 312 extern s32 313 wl_cfgp2p_ifidx(struct bcm_cfg80211 *cfg, struct ether_addr *mac, s32 *index); 314 315 extern s32 316 wl_cfgp2p_init_discovery(struct bcm_cfg80211 *cfg); 317 extern s32 318 wl_cfgp2p_enable_discovery(struct bcm_cfg80211 *cfg, struct net_device *dev, const u8 *ie, 319 u32 ie_len); 320 extern s32 321 wl_cfgp2p_disable_discovery(struct bcm_cfg80211 *cfg); 322 extern s32 323 wl_cfgp2p_escan(struct bcm_cfg80211 *cfg, struct net_device *dev, u16 active, u32 num_chans, 324 u16 *channels, 325 s32 search_state, u16 action, u32 bssidx, struct ether_addr *tx_dst_addr, 326 p2p_scan_purpose_t p2p_scan_purpose); 327 328 extern s32 329 wl_cfgp2p_act_frm_search(struct bcm_cfg80211 *cfg, struct net_device *ndev, 330 s32 bssidx, s32 channel, struct ether_addr *tx_dst_addr); 331 332 extern const wpa_ie_fixed_t * 333 wl_cfgp2p_find_wpaie(const u8 *parse, u32 len); 334 335 extern const wpa_ie_fixed_t * 336 wl_cfgp2p_find_wpsie(const u8 *parse, u32 len); 337 338 extern wifi_p2p_ie_t * 339 wl_cfgp2p_find_p2pie(const u8 *parse, u32 len); 340 341 extern const wifi_wfd_ie_t * 342 wl_cfgp2p_find_wfdie(const u8 *parse, u32 len); 343 extern s32 344 wl_cfgp2p_set_management_ie(struct bcm_cfg80211 *cfg, struct net_device *ndev, s32 bssidx, 345 s32 pktflag, const u8 *vndr_ie, u32 vndr_ie_len); 346 extern s32 347 wl_cfgp2p_clear_management_ie(struct bcm_cfg80211 *cfg, s32 bssidx); 348 349 extern struct net_device * 350 wl_cfgp2p_find_ndev(struct bcm_cfg80211 *cfg, s32 bssidx); 351 extern s32 352 wl_cfgp2p_find_type(struct bcm_cfg80211 *cfg, s32 bssidx, s32 *type); 353 354 extern s32 355 wl_cfgp2p_listen_complete(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev, 356 const wl_event_msg_t *e, void *data); 357 extern s32 358 wl_cfgp2p_discover_listen(struct bcm_cfg80211 *cfg, s32 channel, u32 duration_ms); 359 360 extern s32 361 wl_cfgp2p_discover_enable_search(struct bcm_cfg80211 *cfg, u8 enable); 362 363 extern s32 364 wl_cfgp2p_action_tx_complete(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev, 365 const wl_event_msg_t *e, void *data); 366 367 extern s32 368 wl_cfgp2p_tx_action_frame(struct bcm_cfg80211 *cfg, struct net_device *dev, 369 wl_af_params_t *af_params, s32 bssidx); 370 371 extern void 372 wl_cfgp2p_generate_bss_mac(struct bcm_cfg80211 *cfg, struct ether_addr *primary_addr); 373 374 extern void 375 wl_cfg80211_change_ifaddr(u8* buf, struct ether_addr *p2p_int_addr, u8 element_id); 376 377 extern s32 378 wl_cfgp2p_supported(struct bcm_cfg80211 *cfg, struct net_device *ndev); 379 380 extern s32 381 wl_cfgp2p_down(struct bcm_cfg80211 *cfg); 382 383 extern s32 384 wl_cfgp2p_set_p2p_noa(struct bcm_cfg80211 *cfg, struct net_device *ndev, char* buf, int len); 385 386 extern s32 387 wl_cfgp2p_get_p2p_noa(struct bcm_cfg80211 *cfg, struct net_device *ndev, char* buf, int len); 388 389 extern s32 390 wl_cfgp2p_set_p2p_ps(struct bcm_cfg80211 *cfg, struct net_device *ndev, char* buf, int len); 391 392 extern s32 393 wl_cfgp2p_set_p2p_ecsa(struct bcm_cfg80211 *cfg, struct net_device *ndev, char* buf, int len); 394 395 extern s32 396 wl_cfgp2p_increase_p2p_bw(struct bcm_cfg80211 *cfg, struct net_device *ndev, char* buf, int len); 397 398 extern const u8 * 399 wl_cfgp2p_retreive_p2pattrib(const void *buf, u8 element_id); 400 401 extern const u8* 402 wl_cfgp2p_find_attrib_in_all_p2p_Ies(const u8 *parse, u32 len, u32 attrib); 403 404 extern const u8 * 405 wl_cfgp2p_retreive_p2p_dev_addr(wl_bss_info_t *bi, u32 bi_length); 406 407 extern s32 408 wl_cfgp2p_register_ndev(struct bcm_cfg80211 *cfg); 409 410 extern s32 411 wl_cfgp2p_unregister_ndev(struct bcm_cfg80211 *cfg); 412 413 extern bool 414 wl_cfgp2p_is_ifops(const struct net_device_ops *if_ops); 415 416 extern u32 417 wl_cfgp2p_vndr_ie(struct bcm_cfg80211 *cfg, u8 *iebuf, s32 pktflag, 418 s8 *oui, s32 ie_id, const s8 *data, s32 datalen, const s8* add_del_cmd); 419 420 extern int wl_cfgp2p_get_conn_idx(struct bcm_cfg80211 *cfg); 421 422 extern 423 int wl_cfg_multip2p_operational(struct bcm_cfg80211 *cfg); 424 425 extern 426 int wl_cfgp2p_vif_created(struct bcm_cfg80211 *cfg); 427 428 #if defined(WL_CFG80211_P2P_DEV_IF) 429 extern struct wireless_dev * 430 wl_cfgp2p_add_p2p_disc_if(struct bcm_cfg80211 *cfg); 431 432 extern int 433 wl_cfgp2p_start_p2p_device(struct wiphy *wiphy, struct wireless_dev *wdev); 434 435 extern void 436 wl_cfgp2p_stop_p2p_device(struct wiphy *wiphy, struct wireless_dev *wdev); 437 438 extern int 439 wl_cfgp2p_del_p2p_disc_if(struct wireless_dev *wdev, struct bcm_cfg80211 *cfg); 440 441 #endif /* WL_CFG80211_P2P_DEV_IF */ 442 443 extern void 444 wl_cfgp2p_need_wait_actfrmae(struct bcm_cfg80211 *cfg, void *frame, u32 frame_len, bool tx); 445 446 extern int 447 wl_cfgp2p_is_p2p_specific_scan(struct cfg80211_scan_request *request); 448 449 /* WiFi Direct */ 450 #define SOCIAL_CHAN_1 1 451 #define SOCIAL_CHAN_2 6 452 #define SOCIAL_CHAN_3 11 453 #define IS_P2P_SOCIAL_CHANNEL(channel) ((channel == SOCIAL_CHAN_1) || \ 454 (channel == SOCIAL_CHAN_2) || \ 455 (channel == SOCIAL_CHAN_3)) 456 #define SOCIAL_CHAN_CNT 3 457 #define AF_PEER_SEARCH_CNT 2 458 #define WL_P2P_WILDCARD_SSID "DIRECT-" 459 #define WL_P2P_WILDCARD_SSID_LEN 7 460 #define WL_P2P_INTERFACE_PREFIX "p2p" 461 #define WL_P2P_TEMP_CHAN 11 462 #define WL_P2P_TEMP_CHAN_5G 36 463 #define WL_P2P_AF_STATUS_OFFSET 9 464 465 /* If the provision discovery is for JOIN operations, 466 * or the device discoverablity frame is destined to GO 467 * then we need not do an internal scan to find GO. 468 */ 469 #define IS_ACTPUB_WITHOUT_GROUP_ID(p2p_ie, len) \ 470 (wl_cfgp2p_retreive_p2pattrib(p2p_ie, P2P_SEID_GROUP_ID) == NULL) 471 472 #define IS_GAS_REQ(frame, len) (wl_cfgp2p_is_gas_action(frame, len) && \ 473 ((frame->action == P2PSD_ACTION_ID_GAS_IREQ) || \ 474 (frame->action == P2PSD_ACTION_ID_GAS_CREQ))) 475 476 #define IS_P2P_PUB_ACT_RSP_SUBTYPE(subtype) ((subtype == P2P_PAF_GON_RSP) || \ 477 ((subtype == P2P_PAF_GON_CONF) || \ 478 (subtype == P2P_PAF_INVITE_RSP) || \ 479 (subtype == P2P_PAF_PROVDIS_RSP))) 480 #define IS_P2P_SOCIAL(ch) ((ch == SOCIAL_CHAN_1) || (ch == SOCIAL_CHAN_2) || (ch == SOCIAL_CHAN_3)) 481 #define IS_P2P_SSID(ssid, len) (!memcmp(ssid, WL_P2P_WILDCARD_SSID, WL_P2P_WILDCARD_SSID_LEN) && \ 482 (len >= WL_P2P_WILDCARD_SSID_LEN)) 483 484 /* Min FW ver required to support chanspec 485 * instead of channel in actframe iovar. 486 */ 487 #define FW_MAJOR_VER_ACTFRAME_CHSPEC 14 488 489 #ifdef BCMDBUS 490 int 491 wl_cfgp2p_start_p2p_device_resume(dhd_pub_t *dhd); 492 #endif /* BCMDBUS */ 493 #endif /* _wl_cfgp2p_h_ */ 494