Move rtl92cu_update_hal_rate_tbl declartion to hw.h to correspond with function
definition in hw.c
Signed-off-by: Mark Schulte <[email protected]>
---
drivers/net/wireless/rtlwifi/rtl8192cu/hw.h | 3 +++
drivers/net/wireless/rtlwifi/rtl8192cu/sw.h | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
index 8e3ec1e..0f7812e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
@@ -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
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
index 262e1e4..a1310ab 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
@@ -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
--
1.8.3.3
On 07/31/2013 02:08 AM, Mark Schulte wrote:
> Adding type casts to suppress sparse warnings:
> * warning: cast to restricted __le32/__le16
>
> Signed-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
On 07/31/2013 02:08 AM, Mark Schulte wrote:
> Move rtl92cu_update_hal_rate_tbl declartion to hw.h to correspond with function
-------^
> definition in hw.c
>
> Signed-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.
Acked-by: Larry Finger <[email protected]>
Thanks,
Larry
> drivers/net/wireless/rtlwifi/rtl8192cu/hw.h | 3 +++
> drivers/net/wireless/rtlwifi/rtl8192cu/sw.h | 3 ---
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
> index 8e3ec1e..0f7812e 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
> @@ -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
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
> index 262e1e4..a1310ab 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
> @@ -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
>
Adding type casts to suppress sparse warnings:
* warning: cast to restricted __le32/__le16
Signed-off-by: Mark Schulte <[email protected]>
---
drivers/net/wireless/rtlwifi/ps.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/ps.c b/drivers/net/wireless/rtlwifi/ps.c
index 298b615..f646b75 100644
--- a/drivers/net/wireless/rtlwifi/ps.c
+++ b/drivers/net/wireless/rtlwifi/ps.c
@@ -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;
}
--
1.8.3.3
On 08/09/2013 12:41 PM, John W. Linville wrote:
> On Wed, Jul 31, 2013 at 12:21:45PM -0500, Larry Finger wrote:
>> On 07/31/2013 02:08 AM, Mark Schulte wrote:
>>> Adding type casts to suppress sparse warnings:
>>> * warning: cast to restricted __le32/__le16
>>>
>>> Signed-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.
>
> 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.
Acked-by: Larry Finger <[email protected]>
Larry
On Wed, Jul 31, 2013 at 12:21:45PM -0500, Larry Finger wrote:
> On 07/31/2013 02:08 AM, Mark Schulte wrote:
> >Adding type casts to suppress sparse warnings:
> > * warning: cast to restricted __le32/__le16
> >
> >Signed-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.
Any word on this? The patch doesn't look like it should be causing
such problems...?
--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.