From 89e79bf30ac03d905fbfbb9d4ea0d79f8f9f60fc Mon Sep 17 00:00:00 2001 From: Magnus Bergmark Date: Tue, 10 Nov 2015 23:04:30 +0100 Subject: [PATCH] Fix `file_path` symbol conflict with Linux 4.3 file_path is now something in kernel 4.3 that conflicts with this version of the driver. Work-around found here: https://github.com/hadess/rtl8723bs/commit/e2ca8113463891d16d0d7f141166fdb416d3030b See related issue for discussion about it: https://github.com/hadess/rtl8723bs/issues/24 --- hal/hal_com_phycfg.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/hal/hal_com_phycfg.c b/hal/hal_com_phycfg.c index c0c65e4..625e640 100644 --- a/hal/hal_com_phycfg.c +++ b/hal/hal_com_phycfg.c @@ -2575,7 +2575,7 @@ Hal_ChannelPlanToRegulation( #ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE extern char *rtw_phy_file_path; -char file_path[PATH_LENGTH_MAX]; +char file_path_bs[PATH_LENGTH_MAX]; #define GetLineFromBuffer(buffer) strsep(&buffer, "\n") @@ -2597,11 +2597,11 @@ phy_ConfigMACWithParaFile( if ((pHalData->mac_reg_len == 0) && (pHalData->mac_reg == NULL)) { - rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName); + rtw_merge_string(file_path_bs, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName); - if (rtw_is_file_readable(file_path) == _TRUE) + if (rtw_is_file_readable(file_path_bs) == _TRUE) { - rlen = rtw_retrive_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); + rlen = rtw_retrive_from_file(file_path_bs, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) { rtStatus = _SUCCESS; @@ -2696,11 +2696,11 @@ phy_ConfigBBWithParaFile( if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL)) { - rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName); + rtw_merge_string(file_path_bs, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName); - if (rtw_is_file_readable(file_path) == _TRUE) + if (rtw_is_file_readable(file_path_bs) == _TRUE) { - rlen = rtw_retrive_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); + rlen = rtw_retrive_from_file(file_path_bs, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) { rtStatus = _SUCCESS; @@ -3149,11 +3149,11 @@ phy_ConfigBBWithPgParaFile( if ((pHalData->bb_phy_reg_pg_len == 0) && (pHalData->bb_phy_reg_pg == NULL)) { - rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName); + rtw_merge_string(file_path_bs, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName); - if (rtw_is_file_readable(file_path) == _TRUE) + if (rtw_is_file_readable(file_path_bs) == _TRUE) { - rlen = rtw_retrive_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); + rlen = rtw_retrive_from_file(file_path_bs, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) { rtStatus = _SUCCESS; @@ -3212,11 +3212,11 @@ phy_ConfigBBWithMpParaFile( if ((pHalData->bb_phy_reg_mp_len == 0) && (pHalData->bb_phy_reg_mp == NULL)) { - rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName); + rtw_merge_string(file_path_bs, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName); - if (rtw_is_file_readable(file_path) == _TRUE) + if (rtw_is_file_readable(file_path_bs) == _TRUE) { - rlen = rtw_retrive_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); + rlen = rtw_retrive_from_file(file_path_bs, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) { rtStatus = _SUCCESS; @@ -3348,11 +3348,11 @@ PHY_ConfigRFWithParaFile( if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL)) { - rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName); + rtw_merge_string(file_path_bs, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName); - if (rtw_is_file_readable(file_path) == _TRUE) + if (rtw_is_file_readable(file_path_bs) == _TRUE) { - rlen = rtw_retrive_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); + rlen = rtw_retrive_from_file(file_path_bs, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) { rtStatus = _SUCCESS; @@ -3626,11 +3626,11 @@ PHY_ConfigRFWithTxPwrTrackParaFile( if ((pHalData->rf_tx_pwr_track_len == 0) && (pHalData->rf_tx_pwr_track == NULL)) { - rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName); + rtw_merge_string(file_path_bs, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName); - if (rtw_is_file_readable(file_path) == _TRUE) + if (rtw_is_file_readable(file_path_bs) == _TRUE) { - rlen = rtw_retrive_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); + rlen = rtw_retrive_from_file(file_path_bs, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) { rtStatus = _SUCCESS; @@ -3995,11 +3995,11 @@ PHY_ConfigRFWithPowerLimitTableParaFile( if ((pHalData->rf_tx_pwr_lmt_len == 0) && (pHalData->rf_tx_pwr_lmt == NULL)) { - rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName); + rtw_merge_string(file_path_bs, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName); - if (rtw_is_file_readable(file_path) == _TRUE) + if (rtw_is_file_readable(file_path_bs) == _TRUE) { - rlen = rtw_retrive_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); + rlen = rtw_retrive_from_file(file_path_bs, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN); if (rlen > 0) { rtStatus = _SUCCESS;