summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723au
diff options
context:
space:
mode:
authorAnatoly Stepanov <drivengroove@gmail.com>2015-12-17 16:47:36 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-07 19:45:30 -0800
commit485b099ad8c0a9ad5c856bef60017faa5178e744 (patch)
tree15acf947c5f4e947011341b768e346b792233fce /drivers/staging/rtl8723au
parent3d7a84776a87bfcf9f7ed5de5e8ac71d3ca8a49b (diff)
downloadlinux-485b099ad8c0a9ad5c856bef60017faa5178e744.tar.bz2
staging: rtl8723au: change parameter type in rtl8723a_set_rssi_cmd declaration
Previosly the function had the following prototype: int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u8 *param) My suggestion here is to modify the prototype this way: int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u32 param) We can do this based on the following considerations: 1. rtl8723a_set_rssi_cmd is used only with 32-bit "param" values 2. There's no point in using "u8 *param" until we pass param length 3. As we just read "param", it's ok to pass it by value Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723au')
-rw-r--r--drivers/staging/rtl8723au/hal/odm.c2
-rw-r--r--drivers/staging/rtl8723au/hal/rtl8723a_cmd.c6
-rw-r--r--drivers/staging/rtl8723au/include/rtl8723a_cmd.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/rtl8723au/hal/odm.c b/drivers/staging/rtl8723au/hal/odm.c
index 6b9dbeffafcb..45d70fd49da8 100644
--- a/drivers/staging/rtl8723au/hal/odm.c
+++ b/drivers/staging/rtl8723au/hal/odm.c
@@ -1274,7 +1274,7 @@ static void odm_RSSIMonitorCheck(struct dm_odm_t *pDM_Odm)
for (i = 0; i < sta_cnt; i++) {
if (PWDB_rssi[i] != (0))
- rtl8723a_set_rssi_cmd(Adapter, (u8 *)&PWDB_rssi[i]);
+ rtl8723a_set_rssi_cmd(Adapter, PWDB_rssi[i]);
}
pdmpriv->EntryMaxUndecoratedSmoothedPWDB = MaxDB;
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
index 1662c03c1323..2230f4c539ec 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
@@ -113,11 +113,11 @@ exit:
return ret;
}
-int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u8 *param)
+int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u32 param)
{
- *((u32 *)param) = cpu_to_le32(*((u32 *)param));
+ __le32 cmd = cpu_to_le32(param);
- FillH2CCmd(padapter, RSSI_SETTING_EID, 3, param);
+ FillH2CCmd(padapter, RSSI_SETTING_EID, 3, (void *)&cmd);
return _SUCCESS;
}
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_cmd.h b/drivers/staging/rtl8723au/include/rtl8723a_cmd.h
index 014c02edded6..f95535a915ab 100644
--- a/drivers/staging/rtl8723au/include/rtl8723a_cmd.h
+++ b/drivers/staging/rtl8723au/include/rtl8723a_cmd.h
@@ -149,7 +149,7 @@ void rtl8723a_set_BTCoex_AP_mode_FwRsvdPkt_cmd(struct rtw_adapter *padapter);
#else
#define rtl8723a_set_BTCoex_AP_mode_FwRsvdPkt_cmd(padapter) do {} while(0)
#endif
-int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u8 *param);
+int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u32 param);
int rtl8723a_set_raid_cmd(struct rtw_adapter *padapter, u32 mask, u8 arg);
void rtl8723a_add_rateatid(struct rtw_adapter *padapter, u32 bitmap, u8 arg, u8 rssi_level);