* [PATCH v2] staging: rtlwifi: Remove unnecessary function
@ 2018-10-23 23:07 Maya Nakamura
2018-10-24 5:00 ` Maya Nakamura
0 siblings, 1 reply; 2+ messages in thread
From: Maya Nakamura @ 2018-10-23 23:07 UTC (permalink / raw)
To: gregkh, outreachy-kernel
Because the odm_signal_scale_mapping function is only called to return the
second argument, remove the function and change five statements that call
it.
Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
---
Changes since v1:
- Remove a function's declaration, definition, and its comment.
- Change five statements that call the function.
.../staging/rtlwifi/phydm/phydm_hwconfig.c | 27 ++++---------------
.../staging/rtlwifi/phydm/phydm_hwconfig.h | 2 --
2 files changed, 5 insertions(+), 24 deletions(-)
diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
index 4bf86e5a451f..fd208581d857 100644
--- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
+++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
@@ -477,18 +477,6 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)
return 100 + ant_power;
}
-/*
- * 2012/01/12 MH MOve some signal strength smooth method to MP HAL layer.
- * IF other SW team do not support the feature, remove this section.??
- */
-
-s32 odm_signal_scale_mapping(struct phy_dm_struct *dm, s32 curr_sig)
-{
- {
- return curr_sig;
- }
-}
-
static u8 odm_sq_process_patch_rt_cid_819x_lenovo(struct phy_dm_struct *dm,
u8 is_cck_rate, u8 pwdb_all,
u8 path, u8 RSSI)
@@ -749,13 +737,11 @@ static void odm_rx_phy_status92c_series_parsing(
*/
/* It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp(). */
if (is_cck_rate) {
- phy_info->signal_strength = (u8)(
- odm_signal_scale_mapping(dm, pwdb_all)); /*pwdb_all;*/
+ phy_info->signal_strength = (u8)pwdb_all;
} else {
if (rf_rx_num != 0) {
phy_info->signal_strength =
- (u8)(odm_signal_scale_mapping(dm, total_rssi /=
- rf_rx_num));
+ (u8)(total_rssi /= rf_rx_num);
}
}
@@ -1051,8 +1037,7 @@ static void odm_rx_phy_status_jaguar_series_parsing(
*/
/*It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp().*/
if (is_cck_rate) {
- phy_info->signal_strength = (u8)(
- odm_signal_scale_mapping(dm, pwdb_all)); /*pwdb_all;*/
+ phy_info->signal_strength = (u8)pwdb_all;
} else {
if (rf_rx_num != 0) {
/* 2015/01 Sean, use the best two RSSI only,
@@ -1062,8 +1047,7 @@ static void odm_rx_phy_status_jaguar_series_parsing(
avg_rssi = best_rssi;
else
avg_rssi = (best_rssi + second_rssi) / 2;
- phy_info->signal_strength =
- (u8)(odm_signal_scale_mapping(dm, avg_rssi));
+ phy_info->signal_strength = (u8)avg_rssi;
}
}
dm->rx_pwdb_ave = dm->rx_pwdb_ave + phy_info->rx_pwdb_all;
@@ -1874,8 +1858,7 @@ void phydm_rx_phy_status_new_type(struct phy_dm_struct *phydm, u8 *phy_status,
/* Update signal strength to UI, and phy_info->rx_pwdb_all is the
* maximum RSSI of all path
*/
- phy_info->signal_strength =
- (u8)(odm_signal_scale_mapping(phydm, phy_info->rx_pwdb_all));
+ phy_info->signal_strength = (u8)phy_info->rx_pwdb_all;
/* Calculate average RSSI and smoothed RSSI */
phydm_process_rssi_for_dm_new_type(phydm, phy_info, pktinfo);
diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
index 6ad5e0292a97..c9833889688c 100644
--- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
+++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
@@ -216,8 +216,6 @@ odm_config_fw_with_header_file(struct phy_dm_struct *dm,
u32 odm_get_hw_img_version(struct phy_dm_struct *dm);
-s32 odm_signal_scale_mapping(struct phy_dm_struct *dm, s32 curr_sig);
-
/*For 8822B only!! need to move to FW finally */
/*==============================================*/
void phydm_rx_phy_status_new_type(struct phy_dm_struct *phydm, u8 *phy_status,
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] staging: rtlwifi: Remove unnecessary function
2018-10-23 23:07 [PATCH v2] staging: rtlwifi: Remove unnecessary function Maya Nakamura
@ 2018-10-24 5:00 ` Maya Nakamura
0 siblings, 0 replies; 2+ messages in thread
From: Maya Nakamura @ 2018-10-24 5:00 UTC (permalink / raw)
To: gregkh, outreachy-kernel
On Tue, Oct 23, 2018 at 04:07:20PM -0700, Maya Nakamura wrote:
> Because the odm_signal_scale_mapping function is only called to return the
> second argument, remove the function and change five statements that call
> it.
>
> Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
> ---
> Changes since v1:
> - Remove a function's declaration, definition, and its comment.
> - Change five statements that call the function.
>
> .../staging/rtlwifi/phydm/phydm_hwconfig.c | 27 ++++---------------
> .../staging/rtlwifi/phydm/phydm_hwconfig.h | 2 --
> 2 files changed, 5 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> index 4bf86e5a451f..fd208581d857 100644
> --- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> +++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> @@ -477,18 +477,6 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)
> return 100 + ant_power;
> }
>
> -/*
> - * 2012/01/12 MH MOve some signal strength smooth method to MP HAL layer.
> - * IF other SW team do not support the feature, remove this section.??
> - */
> -
> -s32 odm_signal_scale_mapping(struct phy_dm_struct *dm, s32 curr_sig)
> -{
> - {
> - return curr_sig;
> - }
> -}
> -
> static u8 odm_sq_process_patch_rt_cid_819x_lenovo(struct phy_dm_struct *dm,
> u8 is_cck_rate, u8 pwdb_all,
> u8 path, u8 RSSI)
> @@ -749,13 +737,11 @@ static void odm_rx_phy_status92c_series_parsing(
> */
> /* It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp(). */
> if (is_cck_rate) {
> - phy_info->signal_strength = (u8)(
> - odm_signal_scale_mapping(dm, pwdb_all)); /*pwdb_all;*/
> + phy_info->signal_strength = (u8)pwdb_all;
> } else {
> if (rf_rx_num != 0) {
> phy_info->signal_strength =
> - (u8)(odm_signal_scale_mapping(dm, total_rssi /=
> - rf_rx_num));
> + (u8)(total_rssi /= rf_rx_num);
> }
> }
>
> @@ -1051,8 +1037,7 @@ static void odm_rx_phy_status_jaguar_series_parsing(
> */
> /*It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp().*/
> if (is_cck_rate) {
> - phy_info->signal_strength = (u8)(
> - odm_signal_scale_mapping(dm, pwdb_all)); /*pwdb_all;*/
> + phy_info->signal_strength = (u8)pwdb_all;
> } else {
> if (rf_rx_num != 0) {
> /* 2015/01 Sean, use the best two RSSI only,
> @@ -1062,8 +1047,7 @@ static void odm_rx_phy_status_jaguar_series_parsing(
> avg_rssi = best_rssi;
> else
> avg_rssi = (best_rssi + second_rssi) / 2;
> - phy_info->signal_strength =
> - (u8)(odm_signal_scale_mapping(dm, avg_rssi));
> + phy_info->signal_strength = (u8)avg_rssi;
> }
> }
> dm->rx_pwdb_ave = dm->rx_pwdb_ave + phy_info->rx_pwdb_all;
> @@ -1874,8 +1858,7 @@ void phydm_rx_phy_status_new_type(struct phy_dm_struct *phydm, u8 *phy_status,
> /* Update signal strength to UI, and phy_info->rx_pwdb_all is the
> * maximum RSSI of all path
> */
> - phy_info->signal_strength =
> - (u8)(odm_signal_scale_mapping(phydm, phy_info->rx_pwdb_all));
> + phy_info->signal_strength = (u8)phy_info->rx_pwdb_all;
>
> /* Calculate average RSSI and smoothed RSSI */
> phydm_process_rssi_for_dm_new_type(phydm, phy_info, pktinfo);
> diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
> index 6ad5e0292a97..c9833889688c 100644
> --- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
> +++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
> @@ -216,8 +216,6 @@ odm_config_fw_with_header_file(struct phy_dm_struct *dm,
>
> u32 odm_get_hw_img_version(struct phy_dm_struct *dm);
>
> -s32 odm_signal_scale_mapping(struct phy_dm_struct *dm, s32 curr_sig);
> -
> /*For 8822B only!! need to move to FW finally */
> /*==============================================*/
> void phydm_rx_phy_status_new_type(struct phy_dm_struct *phydm, u8 *phy_status,
> --
> 2.17.1
Sorry! I will make this part of a patchset. Will you please ignore this
one? Thank you!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-24 5:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-23 23:07 [PATCH v2] staging: rtlwifi: Remove unnecessary function Maya Nakamura
2018-10-24 5:00 ` Maya Nakamura
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.