hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_exportfs.c
old mode 100644new mode 100755
....@@ -1191,8 +1191,8 @@
11911191 int ret = 0;
11921192
11931193 /* Read memdump info from the file */
1194
- fp = dhd_filp_open(filepath, O_RDONLY, 0);
1195
- if (IS_ERR(fp) || (fp == NULL)) {
1194
+ fp = filp_open(filepath, O_RDONLY, 0);
1195
+ if (IS_ERR(fp)) {
11961196 DHD_ERROR(("%s: File [%s] doesn't exist\n", __FUNCTION__, filepath));
11971197 #if defined(CONFIG_X86) && defined(OEM_ANDROID)
11981198 /* Check if it is Live Brix Image */
....@@ -1202,8 +1202,8 @@
12021202 /* Try if it is Installed Brix Image */
12031203 filepath = MEMDUMPINFO_INST;
12041204 DHD_ERROR(("%s: Try File [%s]\n", __FUNCTION__, filepath));
1205
- fp = dhd_filp_open(filepath, O_RDONLY, 0);
1206
- if (IS_ERR(fp) || (fp == NULL)) {
1205
+ fp = filp_open(filepath, O_RDONLY, 0);
1206
+ if (IS_ERR(fp)) {
12071207 DHD_ERROR(("%s: File [%s] doesn't exist\n", __FUNCTION__, filepath));
12081208 goto done;
12091209 }
....@@ -1213,10 +1213,10 @@
12131213 }
12141214
12151215 /* Handle success case */
1216
- ret = dhd_kernel_read_compat(fp, 0, (char *)&mem_val, sizeof(uint32));
1216
+ ret = kernel_read_compat(fp, 0, (char *)&mem_val, sizeof(uint32));
12171217 if (ret < 0) {
12181218 DHD_ERROR(("%s: File read error, ret=%d\n", __FUNCTION__, ret));
1219
- dhd_filp_close(fp, NULL);
1219
+ filp_close(fp, NULL);
12201220 goto done;
12211221 }
12221222
....@@ -1224,7 +1224,7 @@
12241224 p_mem_val[sizeof(uint32) - 1] = '\0';
12251225 mem_val = bcm_atoi(p_mem_val);
12261226
1227
- dhd_filp_close(fp, NULL);
1227
+ filp_close(fp, NULL);
12281228
12291229 done:
12301230 return mem_val;
....@@ -1335,11 +1335,11 @@
13351335 * 2: Trigger Kernel crash by BUG()
13361336 * File doesn't exist: Keep default value (1).
13371337 */
1338
- fp = dhd_filp_open(filepath, O_RDONLY, 0);
1339
- if (IS_ERR(fp) || (fp == NULL)) {
1338
+ fp = filp_open(filepath, O_RDONLY, 0);
1339
+ if (IS_ERR(fp)) {
13401340 DHD_ERROR(("%s: File [%s] doesn't exist\n", __FUNCTION__, filepath));
13411341 } else {
1342
- int ret = dhd_kernel_read_compat(fp, 0, (char *)&mem_val, sizeof(uint32));
1342
+ int ret = kernel_read_compat(fp, 0, (char *)&mem_val, sizeof(uint32));
13431343 if (ret < 0) {
13441344 DHD_ERROR(("%s: File read error, ret=%d\n", __FUNCTION__, ret));
13451345 } else {
....@@ -1348,7 +1348,7 @@
13481348 mem_val = bcm_atoi(p_mem_val);
13491349 DHD_ERROR(("%s: ASSERT ENABLED = %d\n", __FUNCTION__, mem_val));
13501350 }
1351
- dhd_filp_close(fp, NULL);
1351
+ filp_close(fp, NULL);
13521352 }
13531353
13541354 #ifdef CUSTOMER_HW4_DEBUG