old mode 100644new mode 100755| .. | .. |
|---|
| 1204 | 1204 | set_fs(KERNEL_DS); |
|---|
| 1205 | 1205 | file_mode = O_CREAT | O_WRONLY; |
|---|
| 1206 | 1206 | |
|---|
| 1207 | | - w_pcap_fp = dhd_filp_open(pktlogdump_path, file_mode, 0664); |
|---|
| 1208 | | - if (IS_ERR(w_pcap_fp) || (w_pcap_fp == NULL)) { |
|---|
| 1207 | + w_pcap_fp = filp_open(pktlogdump_path, file_mode, 0664); |
|---|
| 1208 | + if (IS_ERR(w_pcap_fp)) { |
|---|
| 1209 | 1209 | DHD_ERROR(("%s: Couldn't open file '%s' err %ld\n", |
|---|
| 1210 | 1210 | __FUNCTION__, pktlogdump_path, PTR_ERR(w_pcap_fp))); |
|---|
| 1211 | 1211 | ret = BCME_ERROR; |
|---|
| .. | .. |
|---|
| 1219 | 1219 | } |
|---|
| 1220 | 1220 | |
|---|
| 1221 | 1221 | /* Sync file from filesystem to physical media */ |
|---|
| 1222 | | - ret = dhd_vfs_fsync(w_pcap_fp, 0); |
|---|
| 1222 | + ret = vfs_fsync(w_pcap_fp, 0); |
|---|
| 1223 | 1223 | if (ret < 0) { |
|---|
| 1224 | 1224 | DHD_ERROR(("%s(): sync pcap file error, err = %d\n", __FUNCTION__, ret)); |
|---|
| 1225 | 1225 | goto fail; |
|---|
| 1226 | 1226 | } |
|---|
| 1227 | 1227 | fail: |
|---|
| 1228 | 1228 | if (!IS_ERR(w_pcap_fp)) { |
|---|
| 1229 | | - dhd_filp_close(w_pcap_fp, NULL); |
|---|
| 1229 | + filp_close(w_pcap_fp, NULL); |
|---|
| 1230 | 1230 | } |
|---|
| 1231 | 1231 | |
|---|
| 1232 | 1232 | set_fs(old_fs); |
|---|