wl_cfgp2p.h 15 KB

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