From 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 10 May 2024 07:44:59 +0000
Subject: [PATCH] gmac get mac form eeprom
---
kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_exportfs.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_exportfs.c b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_exportfs.c
old mode 100644
new mode 100755
index 7377f4e..7025531
--- a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_exportfs.c
+++ b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_exportfs.c
@@ -1191,8 +1191,8 @@
int ret = 0;
/* Read memdump info from the file */
- fp = dhd_filp_open(filepath, O_RDONLY, 0);
- if (IS_ERR(fp) || (fp == NULL)) {
+ fp = filp_open(filepath, O_RDONLY, 0);
+ if (IS_ERR(fp)) {
DHD_ERROR(("%s: File [%s] doesn't exist\n", __FUNCTION__, filepath));
#if defined(CONFIG_X86) && defined(OEM_ANDROID)
/* Check if it is Live Brix Image */
@@ -1202,8 +1202,8 @@
/* Try if it is Installed Brix Image */
filepath = MEMDUMPINFO_INST;
DHD_ERROR(("%s: Try File [%s]\n", __FUNCTION__, filepath));
- fp = dhd_filp_open(filepath, O_RDONLY, 0);
- if (IS_ERR(fp) || (fp == NULL)) {
+ fp = filp_open(filepath, O_RDONLY, 0);
+ if (IS_ERR(fp)) {
DHD_ERROR(("%s: File [%s] doesn't exist\n", __FUNCTION__, filepath));
goto done;
}
@@ -1213,10 +1213,10 @@
}
/* Handle success case */
- ret = dhd_kernel_read_compat(fp, 0, (char *)&mem_val, sizeof(uint32));
+ ret = kernel_read_compat(fp, 0, (char *)&mem_val, sizeof(uint32));
if (ret < 0) {
DHD_ERROR(("%s: File read error, ret=%d\n", __FUNCTION__, ret));
- dhd_filp_close(fp, NULL);
+ filp_close(fp, NULL);
goto done;
}
@@ -1224,7 +1224,7 @@
p_mem_val[sizeof(uint32) - 1] = '\0';
mem_val = bcm_atoi(p_mem_val);
- dhd_filp_close(fp, NULL);
+ filp_close(fp, NULL);
done:
return mem_val;
@@ -1335,11 +1335,11 @@
* 2: Trigger Kernel crash by BUG()
* File doesn't exist: Keep default value (1).
*/
- fp = dhd_filp_open(filepath, O_RDONLY, 0);
- if (IS_ERR(fp) || (fp == NULL)) {
+ fp = filp_open(filepath, O_RDONLY, 0);
+ if (IS_ERR(fp)) {
DHD_ERROR(("%s: File [%s] doesn't exist\n", __FUNCTION__, filepath));
} else {
- int ret = dhd_kernel_read_compat(fp, 0, (char *)&mem_val, sizeof(uint32));
+ int ret = kernel_read_compat(fp, 0, (char *)&mem_val, sizeof(uint32));
if (ret < 0) {
DHD_ERROR(("%s: File read error, ret=%d\n", __FUNCTION__, ret));
} else {
@@ -1348,7 +1348,7 @@
mem_val = bcm_atoi(p_mem_val);
DHD_ERROR(("%s: ASSERT ENABLED = %d\n", __FUNCTION__, mem_val));
}
- dhd_filp_close(fp, NULL);
+ filp_close(fp, NULL);
}
#ifdef CUSTOMER_HW4_DEBUG
--
Gitblit v1.6.2