forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_cfgp2p.c
old mode 100644new mode 100755
....@@ -705,12 +705,7 @@
705705 BCM_REFERENCE(ndev);
706706 CFGP2P_DBG(("enter\n"));
707707
708
-#ifdef BCMDBUS
709
- if (wl_to_p2p_bss_bssidx(cfg, P2PAPI_BSSCFG_DEVICE) > 0 && !cfg->bus_resuming)
710
-#else
711
- if (wl_to_p2p_bss_bssidx(cfg, P2PAPI_BSSCFG_DEVICE) > 0)
712
-#endif /* BCMDBUS */
713
- {
708
+ if (wl_to_p2p_bss_bssidx(cfg, P2PAPI_BSSCFG_DEVICE) > 0) {
714709 CFGP2P_ERR(("do nothing, already initialized\n"));
715710 goto exit;
716711 }
....@@ -737,9 +732,6 @@
737732 * so that time, the ifidx returned in WLC_E_IF should be used for populating
738733 * the netinfo
739734 */
740
-#ifdef BCMDBUS
741
- if (!cfg->bus_resuming)
742
-#endif /* BCMDBUS */
743735 ret = wl_alloc_netinfo(cfg, NULL, cfg->p2p_wdev, WL_IF_TYPE_STA, 0, bssidx, 0);
744736 if (unlikely(ret)) {
745737 goto exit;
....@@ -830,12 +822,7 @@
830822 }
831823 #endif /* WL_IFACE_MGMT */
832824
833
-#ifdef BCMDBUS
834
- if (!cfg->bus_resuming && (wl_get_p2p_status(cfg, DISCOVERY_ON)))
835
-#else
836
- if (wl_get_p2p_status(cfg, DISCOVERY_ON))
837
-#endif /* BCMDBUS */
838
- {
825
+ if (wl_get_p2p_status(cfg, DISCOVERY_ON)) {
839826 CFGP2P_DBG((" DISCOVERY is already initialized, we have nothing to do\n"));
840827 goto set_ie;
841828 }
....@@ -2683,7 +2670,7 @@
26832670 cfg->p2p_prb_noti = false;
26842671 #endif
26852672
2686
- printf("P2P interface started\n");
2673
+ CFGP2P_DBG(("P2P interface started\n"));
26872674
26882675 exit:
26892676 return ret;
....@@ -2731,7 +2718,7 @@
27312718
27322719 p2p_on(cfg) = false;
27332720
2734
- printf("Exit. P2P interface stopped\n");
2721
+ CFGP2P_DBG(("Exit. P2P interface stopped\n"));
27352722
27362723 return;
27372724 }
....@@ -2821,36 +2808,3 @@
28212808 }
28222809 return false;
28232810 }
2824
-
2825
-#ifdef BCMDBUS
2826
-int
2827
-wl_cfgp2p_start_p2p_device_resume(dhd_pub_t *dhd)
2828
-{
2829
- int ret = 0;
2830
-#ifdef WL_CFG80211_P2P_DEV_IF
2831
- struct net_device *primary_ndev = dhd_linux_get_primary_netdev(dhd);
2832
- struct bcm_cfg80211 *cfg;
2833
- struct wiphy *wiphy;
2834
-
2835
- if (!primary_ndev)
2836
- return -EINVAL;
2837
- cfg = wl_get_cfg(primary_ndev);
2838
- if (!cfg)
2839
- return -EINVAL;
2840
-
2841
- RETURN_EIO_IF_NOT_UP(cfg);
2842
- if (!p2p_on(cfg))
2843
- return -EINVAL;
2844
-
2845
- rtnl_lock();
2846
- wiphy = bcmcfg_to_wiphy(cfg);
2847
- cfg->bus_resuming = TRUE;
2848
- ret = wl_cfgp2p_start_p2p_device(wiphy, cfg->wdev);
2849
- cfg->bus_resuming = FALSE;
2850
- printf("P2P interface resumed\n");
2851
- rtnl_unlock();
2852
-#endif
2853
-
2854
- return ret;
2855
-}
2856
-#endif /* BCMDBUS */