/* * dhd_cfg80211_set_p2p_info : gets called when GO or GC created */ s32 dhd_cfg80211_set_p2p_info(struct wl_priv *wl, int val) { dhd_pub_t *dhd = (dhd_pub_t *)(wl->pub); int bcn_timeout = DHD_BEACON_TIMEOUT_HIGH; char iovbuf[30]; DHD_MYTRACE(("%s-%s\n", __FILE__, __FUNCTION__)); dhd->op_mode |= val; WL_ERR(("Set : op_mode=%d\n", dhd->op_mode)); #ifdef ARP_OFFLOAD_SUPPORT /* IF P2P is enabled, disable arpoe */ dhd_arp_offload_set(dhd, 0); dhd_arp_offload_enable(dhd, false); #endif /* ARP_OFFLOAD_SUPPORT */ /* diable all filtering in p2p mode */ dhd_os_set_packet_filter(dhd, 0); /* Setup timeout if Beacons are lost and roam is off to report link down */ bcm_mkiovar("bcn_timeout", (char *)&bcn_timeout, 4, iovbuf, sizeof(iovbuf)); dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf, sizeof(iovbuf), TRUE, 0); return 0; }
/* * dhd_cfg80211_clean_p2p_info : gets called when GO or GC terminated */ s32 dhd_cfg80211_clean_p2p_info(struct wl_priv *wl) { dhd_pub_t *dhd = (dhd_pub_t *)(wl->pub); int bcn_timeout = DHD_BEACON_TIMEOUT_NORMAL; char iovbuf[30]; dhd->op_mode &= ~CONCURENT_MASK; WL_ERR(("Clean : op_mode=%d\n", dhd->op_mode)); #ifdef ARP_OFFLOAD_SUPPORT /* IF P2P is disabled, enable arpoe back for STA mode. */ dhd_arp_offload_set(dhd, dhd_arp_mode); dhd_arp_offload_enable(dhd, true); #endif /* ARP_OFFLOAD_SUPPORT */ dhd_os_set_packet_filter(dhd, 1); /* Setup timeout if Beacons are lost and roam is off to report link down */ bcm_mkiovar("bcn_timeout", (char *)&bcn_timeout, 4, iovbuf, sizeof(iovbuf)); dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf, sizeof(iovbuf), TRUE, 0); return 0; }