rtlwifi: rtl8192cu: fix function declaration header
PATCH 1/2 rtlwifi: rtl8192cu: fix function declaration header
Move rtl92cu_update_hal_rate_tbl declartion to hw.h to correspond with function definition in hw.c
--- drivers/net/wireless/rtlwifi/rtl8192cu/hw.h | 3 +++ drivers/net/wireless/rtlwifi/rtl8192cu/sw.h | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/rtlwifi/rtl8192cu/hw.h +3 -0
@@ -109,5 +109,8 @@ void rtl92c_set_fw_joinbss_report_cmd(struct ieee80211_hw *hw, u8 mstatus);void rtl92c_fill_h2c_cmd (struct ieee80211_hw *hw,u8 element_id,u32 cmd_len,u8 *p_cmdbuffer);bool rtl92cu_phy_mac_config (struct ieee80211_hw *hw); +void rtl92cu_update_hal_rate_tbl (struct ieee80211_hw *hw, +struct ieee80211_sta *sta, +u8 rssi_level);#endif
drivers/net/wireless/rtlwifi/rtl8192cu/sw.h +0 -3
@@ -49,8 +49,5 @@ bool rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,u32 rtl92cu_phy_query_rf_reg (struct ieee80211_hw *hw,enum radio_path rfpath,u32 regaddr,u32 bitmask);void rtl92cu_phy_set_bw_mode_callback (struct ieee80211_hw *hw); -void rtl92cu_update_hal_rate_tbl (struct ieee80211_hw *hw, -struct ieee80211_sta *sta, -u8 rssi_level);#endif
Signature · 1 line
1.8.3.3
PATCH 2/2 rtlwifi: sparse warnings: cast to restricted type
Adding type casts to suppress sparse warnings:
* warning: cast to restricted __le32/__le16
--- drivers/net/wireless/rtlwifi/ps.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/net/wireless/rtlwifi/ps.c +8 -8
@@ -688,7 +688,7 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, find_p2p_ie = true;/*to find noa ie*/ while (ie +1 < end) { - noa_len =READEF2BYTE (&ie[1 ]); + noa_len =READEF2BYTE ((__le16 *)&ie[1 ]);if (ie +3 + ie[1 ] > end)return ;
@@ -717,13 +717,13 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data,READEF1BYTE (ie+index); index +=1 ; p2pinfo->noa_duration[i] = -READEF4BYTE (ie+index); +READEF4BYTE ((__le32 *)ie+index); index +=4 ; p2pinfo->noa_interval[i] = -READEF4BYTE (ie+index); +READEF4BYTE ((__le32 *)ie+index); index +=4 ; p2pinfo->noa_start_time[i] = -READEF4BYTE (ie+index); +READEF4BYTE ((__le32 *)ie+index); index +=4 ; }
@@ -780,7 +780,7 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data,RT_TRACE (rtlpriv,COMP_FW ,DBG_LOUD ,"action frame find P2P IE.\n" );/*to find noa ie*/ while (ie +1 < end) { - noa_len =READEF2BYTE (&ie[1 ]); + noa_len =READEF2BYTE ((__le16 *)&ie[1 ]);if (ie +3 + ie[1 ] > end)return ;
@@ -809,13 +809,13 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data,READEF1BYTE (ie+index); index +=1 ; p2pinfo->noa_duration[i] = -READEF4BYTE (ie+index); +READEF4BYTE ((__le32 *)ie+index); index +=4 ; p2pinfo->noa_interval[i] = -READEF4BYTE (ie+index); +READEF4BYTE ((__le32 *)ie+index); index +=4 ; p2pinfo->noa_start_time[i] = -READEF4BYTE (ie+index); +READEF4BYTE ((__le32 *)ie+index); index +=4 ; }
Signature · 1 line
1.8.3.3
Quoted 1 line · Mark Schulte
Move
rtl92cu_update_hal_rate_tbldeclartion tohw.hto correspond with function
-------^
Quoted 4 lines
definition in
hw.cSigned-off-by Mark Schulte <[email protected]>---
Please fix the typo above. In addition, please modify the commit message to note that this change fixes a sparse warning in hw.c. Other than those two comments, the patch is OK.
Thanks,
Larry
Quoted 31 lines
drivers/net/wireless/rtlwifi/rtl8192cu/hw.h | 3 +++ drivers/net/wireless/rtlwifi/rtl8192cu/sw.h | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-)drivers/net/wireless/rtlwifi/rtl8192cu/hw.h +3
-0@@ -109,5 +109,8 @@ void rtl92c_set_fw_joinbss_report_cmd(struct ieee80211_hw *hw, u8 mstatus);void rtl92c_fill_h2c_cmd (struct ieee80211_hw *hw,u8 element_id,u32 cmd_len,u8 *p_cmdbuffer);bool rtl92cu_phy_mac_config (struct ieee80211_hw *hw); +void rtl92cu_update_hal_rate_tbl (struct ieee80211_hw *hw, +struct ieee80211_sta *sta, +u8 rssi_level);#endif drivers/net/wireless/rtlwifi/rtl8192cu/sw.h +0
-3@@ -49,8 +49,5 @@ bool rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,u32 rtl92cu_phy_query_rf_reg (struct ieee80211_hw *hw,enum radio_path rfpath,u32 regaddr,u32 bitmask);void rtl92cu_phy_set_bw_mode_callback (struct ieee80211_hw *hw); -void rtl92cu_update_hal_rate_tbl (struct ieee80211_hw *hw, -struct ieee80211_sta *sta, -u8 rssi_level);#endif
Re: [PATCH 2/2] rtlwifi: sparse warnings: cast to restricted type
In reply to Mark SchulteQuoted 7 lines · Mark Schulte
Adding type casts to suppress sparse warnings:
* warning: cast to restricted __le32/__le16Signed-off-by Mark Schulte <[email protected]>--- drivers/net/wireless/rtlwifi/ps.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
I think this patch is OK, but until I get a chance to test it on a big-endian machine (PowerBook G4 Titanium), please do not apply it.
When I tried the patch, I discovered some kind of regression that causes a kernel oops with an RTL8192CU device installed. This patch is not the problem, but I will need to bisect the oops before I can test. The machine takes a long time to build each kernel, thus it will probably be a while.
Larry
Re: [PATCH 2/2] rtlwifi: sparse warnings: cast to restricted type
Quoted 9 lines · Larry Finger
Quoted 7 lines · Mark Schulte
Adding type casts to suppress sparse warnings:
* warning: cast to restricted __le32/__le16Signed-off-by Mark Schulte <[email protected]>--- drivers/net/wireless/rtlwifi/ps.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
Quoted 8 lines
I think this patch is OK, but until I get a chance to test it on a big-endian machine (PowerBook G4 Titanium), please do not apply it.
When I tried the patch, I discovered some kind of regression that causes a kernel oops with an RTL8192CU device installed. This patch is not the problem, but I will need to bisect the oops before I can test. The machine takes a long time to build each kernel, thus it will probably be a while.
Any word on this? The patch doesn't look like it should be causing such problems...?
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.
Larry Finger
Acked-byRe: [PATCH 2/2] rtlwifi: sparse warnings: cast to restricted type
Quoted 13 lines · John W. Linville
Quoted 12 lines · Larry Finger
Quoted 7 lines · Mark Schulte
Adding type casts to suppress sparse warnings:
* warning: cast to restricted __le32/__le16Signed-off-by Mark Schulte <[email protected]>--- drivers/net/wireless/rtlwifi/ps.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)I think this patch is OK, but until I get a chance to test it on a big-endian machine (PowerBook G4 Titanium), please do not apply it.
Quoted 8 lines
Quoted 5 lines
When I tried the patch, I discovered some kind of regression that causes a kernel oops with an RTL8192CU device installed. This patch is not the problem, but I will need to bisect the oops before I can test. The machine takes a long time to build each kernel, thus it will probably be a while.
Any word on this? The patch doesn't look like it should be causing such problems...?
I have not ywt solved the PPC crash. Unfortunately, thos processors are finicky and my debugging skills on that architecture are quite low. Go ahaed any apply this patch.
Larry