From bedbef8ad3e75a304af6361af235302bcc61d06b Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Tue, 14 May 2024 06:39:01 +0000
Subject: [PATCH] 修改内核路径

---
 kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_cfgp2p.c |   54 ++++--------------------------------------------------
 1 files changed, 4 insertions(+), 50 deletions(-)

diff --git a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_cfgp2p.c b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_cfgp2p.c
old mode 100644
new mode 100755
index aec9646..05a7edf
--- a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_cfgp2p.c
+++ b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_cfgp2p.c
@@ -705,12 +705,7 @@
 	BCM_REFERENCE(ndev);
 	CFGP2P_DBG(("enter\n"));
 
-#ifdef BCMDBUS
-	if (wl_to_p2p_bss_bssidx(cfg, P2PAPI_BSSCFG_DEVICE) > 0 && !cfg->bus_resuming)
-#else
-	if (wl_to_p2p_bss_bssidx(cfg, P2PAPI_BSSCFG_DEVICE) > 0)
-#endif /* BCMDBUS */
-	{
+	if (wl_to_p2p_bss_bssidx(cfg, P2PAPI_BSSCFG_DEVICE) > 0) {
 		CFGP2P_ERR(("do nothing, already initialized\n"));
 		goto exit;
 	}
@@ -737,9 +732,6 @@
 	 * so that time, the ifidx returned in WLC_E_IF should be used for populating
 	 * the netinfo
 	 */
-#ifdef BCMDBUS
-	if (!cfg->bus_resuming)
-#endif /* BCMDBUS */
 	ret = wl_alloc_netinfo(cfg, NULL, cfg->p2p_wdev, WL_IF_TYPE_STA, 0, bssidx, 0);
 	if (unlikely(ret)) {
 		goto exit;
@@ -830,12 +822,7 @@
 	}
 #endif /* WL_IFACE_MGMT */
 
-#ifdef BCMDBUS
-	if (!cfg->bus_resuming && (wl_get_p2p_status(cfg, DISCOVERY_ON)))
-#else
-	if (wl_get_p2p_status(cfg, DISCOVERY_ON))
-#endif /* BCMDBUS */
-	{
+	if (wl_get_p2p_status(cfg, DISCOVERY_ON)) {
 		CFGP2P_DBG((" DISCOVERY is already initialized, we have nothing to do\n"));
 		goto set_ie;
 	}
@@ -2683,7 +2670,7 @@
 	cfg->p2p_prb_noti = false;
 #endif
 
-	printf("P2P interface started\n");
+	CFGP2P_DBG(("P2P interface started\n"));
 
 exit:
 	return ret;
@@ -2731,7 +2718,7 @@
 
 	p2p_on(cfg) = false;
 
-	printf("Exit. P2P interface stopped\n");
+	CFGP2P_DBG(("Exit. P2P interface stopped\n"));
 
 	return;
 }
@@ -2821,36 +2808,3 @@
 	}
 	return false;
 }
-
-#ifdef BCMDBUS
-int
-wl_cfgp2p_start_p2p_device_resume(dhd_pub_t *dhd)
-{
-	int ret = 0;
-#ifdef WL_CFG80211_P2P_DEV_IF
-	struct net_device *primary_ndev = dhd_linux_get_primary_netdev(dhd);
-	struct bcm_cfg80211 *cfg;
-	struct wiphy *wiphy;
-
-	if (!primary_ndev)
-		return -EINVAL;
-	cfg = wl_get_cfg(primary_ndev);
-	if (!cfg)
-		return -EINVAL;
-
-	RETURN_EIO_IF_NOT_UP(cfg);
-	if (!p2p_on(cfg))
-		return -EINVAL;
-
-	rtnl_lock();
-	wiphy = bcmcfg_to_wiphy(cfg);
-	cfg->bus_resuming = TRUE;
-	ret = wl_cfgp2p_start_p2p_device(wiphy, cfg->wdev);
-	cfg->bus_resuming = FALSE;
-	printf("P2P interface resumed\n");
-	rtnl_unlock();
-#endif
-
-	return ret;
-}
-#endif /* BCMDBUS */

--
Gitblit v1.6.2