From b22da3d8526a935aa31e086e63f60ff3246cb61c Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Sat, 09 Dec 2023 07:24:11 +0000
Subject: [PATCH] add stmac read mac form eeprom
---
kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_bam.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_bam.c b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_bam.c
old mode 100644
new mode 100755
index 21d2bf5..ec9e91c
--- a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_bam.c
+++ b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_bam.c
@@ -160,7 +160,7 @@
return BCME_NOMEM;
}
- ret = dhd_vfs_read(fp, buf, WL_BAD_AP_MAX_BUF_SIZE, &fp->f_pos);
+ ret = vfs_read(fp, buf, WL_BAD_AP_MAX_BUF_SIZE, &fp->f_pos);
if (ret < 0) {
WL_ERR(("%s: file read failed (%d)\n", __FUNCTION__, ret));
goto fail;
@@ -236,8 +236,8 @@
fs = get_fs();
set_fs(KERNEL_DS);
- fp = dhd_filp_open(fname, O_RDONLY, 0);
- if (IS_ERR(fp) || (fp == NULL)) {
+ fp = filp_open(fname, O_RDONLY, 0);
+ if (IS_ERR(fp)) {
fp = NULL;
WL_ERR(("%s: file open failed(%d)\n", __FUNCTION__, ret));
goto fail;
@@ -248,7 +248,7 @@
}
fail:
if (fp) {
- dhd_filp_close(fp, NULL);
+ filp_close(fp, NULL);
}
set_fs(fs);
@@ -283,8 +283,8 @@
fs = get_fs();
set_fs(KERNEL_DS);
- fp = dhd_filp_open(fname, O_CREAT | O_RDWR | O_TRUNC, 0666);
- if (IS_ERR(fp) || (fp == NULL)) {
+ fp = filp_open(fname, O_CREAT | O_RDWR | O_TRUNC, 0666);
+ if (IS_ERR(fp)) {
ret = PTR_ERR(fp);
WL_ERR(("%s: file open failed(%d)\n", __FUNCTION__, ret));
fp = NULL;
@@ -310,13 +310,13 @@
#pragma GCC diagnostic pop
#endif
- ret = dhd_vfs_write(fp, tmp, len, &fp->f_pos);
+ ret = vfs_write(fp, tmp, len, &fp->f_pos);
if (ret < 0) {
WL_ERR(("%s: file write failed(%d)\n", __FUNCTION__, ret));
goto fail;
}
/* Sync file from filesystem to physical media */
- ret = dhd_vfs_fsync(fp, 0);
+ ret = vfs_fsync(fp, 0);
if (ret < 0) {
WL_ERR(("%s: sync file failed(%d)\n", __FUNCTION__, ret));
goto fail;
@@ -324,7 +324,7 @@
ret = BCME_OK;
fail:
if (fp) {
- dhd_filp_close(fp, NULL);
+ filp_close(fp, NULL);
}
set_fs(fs);
mutex_unlock(&cfg->bad_ap_mngr.fs_lock);
--
Gitblit v1.6.2