All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] rtlwifi: rtl8192cu: fix function declaration header
@ 2013-07-31  7:08 Mark Schulte
  2013-07-31  7:08 ` [PATCH 2/2] rtlwifi: sparse warnings: cast to restricted type Mark Schulte
  2013-07-31 15:02 ` [PATCH 1/2] rtlwifi: rtl8192cu: fix function declaration header Larry Finger
  0 siblings, 2 replies; 6+ messages in thread
From: Mark Schulte @ 2013-07-31  7:08 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Larry.Finger, Mark Schulte

Move rtl92cu_update_hal_rate_tbl declartion to hw.h to correspond with function
definition in hw.c

Signed-off-by: Mark Schulte <schultetwin@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] rtlwifi: sparse warnings: cast to restricted type
  2013-07-31  7:08 [PATCH 1/2] rtlwifi: rtl8192cu: fix function declaration header Mark Schulte
@ 2013-07-31  7:08 ` Mark Schulte
  2013-07-31 17:21   ` Larry Finger
  2013-07-31 15:02 ` [PATCH 1/2] rtlwifi: rtl8192cu: fix function declaration header Larry Finger
  1 sibling, 1 reply; 6+ messages in thread
From: Mark Schulte @ 2013-07-31  7:08 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Larry.Finger, Mark Schulte

Adding type casts to suppress sparse warnings:
 * warning: cast to restricted __le32/__le16

Signed-off-by: Mark Schulte <schultetwin@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] rtlwifi: rtl8192cu: fix function declaration header
  2013-07-31  7:08 [PATCH 1/2] rtlwifi: rtl8192cu: fix function declaration header Mark Schulte
  2013-07-31  7:08 ` [PATCH 2/2] rtlwifi: sparse warnings: cast to restricted type Mark Schulte
@ 2013-07-31 15:02 ` Larry Finger
  1 sibling, 0 replies; 6+ messages in thread
From: Larry Finger @ 2013-07-31 15:02 UTC (permalink / raw)
  To: Mark Schulte; +Cc: linville, linux-wireless

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 <schultetwin@gmail.com>
> ---

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 <Larry.Finger@lwfinger.net>

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
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] rtlwifi: sparse warnings: cast to restricted type
  2013-07-31  7:08 ` [PATCH 2/2] rtlwifi: sparse warnings: cast to restricted type Mark Schulte
@ 2013-07-31 17:21   ` Larry Finger
  2013-08-09 17:41     ` John W. Linville
  0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2013-07-31 17:21 UTC (permalink / raw)
  To: Mark Schulte; +Cc: linville, linux-wireless

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 <schultetwin@gmail.com>
> ---
>   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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] rtlwifi: sparse warnings: cast to restricted type
  2013-07-31 17:21   ` Larry Finger
@ 2013-08-09 17:41     ` John W. Linville
  2013-08-09 22:08       ` Larry Finger
  0 siblings, 1 reply; 6+ messages in thread
From: John W. Linville @ 2013-08-09 17:41 UTC (permalink / raw)
  To: Larry Finger; +Cc: Mark Schulte, linux-wireless

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 <schultetwin@gmail.com>
> >---
> >  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
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] rtlwifi: sparse warnings: cast to restricted type
  2013-08-09 17:41     ` John W. Linville
@ 2013-08-09 22:08       ` Larry Finger
  0 siblings, 0 replies; 6+ messages in thread
From: Larry Finger @ 2013-08-09 22:08 UTC (permalink / raw)
  To: John W. Linville; +Cc: Mark Schulte, linux-wireless

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 <schultetwin@gmail.com>
>>> ---
>>>   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 <Larry.Finger@lwfinger.net>

Larry



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-08-09 22:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-31  7:08 [PATCH 1/2] rtlwifi: rtl8192cu: fix function declaration header Mark Schulte
2013-07-31  7:08 ` [PATCH 2/2] rtlwifi: sparse warnings: cast to restricted type Mark Schulte
2013-07-31 17:21   ` Larry Finger
2013-08-09 17:41     ` John W. Linville
2013-08-09 22:08       ` Larry Finger
2013-07-31 15:02 ` [PATCH 1/2] rtlwifi: rtl8192cu: fix function declaration header Larry Finger

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.