Commit 3bf404b4 authored by Larry Finger's avatar Larry Finger Committed by Kalle Valo

rtlwifi: rtl8821ae: Fix incorrect returned values

In commit bd421dab ("rtlwifi: rtl8821ae: Convert macros that set
descriptor"), all the routines that get fields from a descriptor
were changed to return signed integer values. This is incorrect for the
routines that get the entire 32-bit word. In this case, an unsigned
quantity is required.

Fixes: bd421dab ("rtlwifi: rtl8821ae: Convert macros that set descriptor")
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent afd708f7
...@@ -214,7 +214,7 @@ static inline void set_tx_desc_tx_buffer_address(__le32 *__pdesc, u32 __val) ...@@ -214,7 +214,7 @@ static inline void set_tx_desc_tx_buffer_address(__le32 *__pdesc, u32 __val)
*(__pdesc + 10) = cpu_to_le32(__val); *(__pdesc + 10) = cpu_to_le32(__val);
} }
static inline int get_tx_desc_tx_buffer_address(__le32 *__pdesc) static inline u32 get_tx_desc_tx_buffer_address(__le32 *__pdesc)
{ {
return le32_to_cpu(*(__pdesc + 10)); return le32_to_cpu(*(__pdesc + 10));
} }
...@@ -324,12 +324,12 @@ static inline int get_rx_desc_bw(__le32 *__pdesc) ...@@ -324,12 +324,12 @@ static inline int get_rx_desc_bw(__le32 *__pdesc)
return le32_get_bits(*(__pdesc + 4), GENMASK(5, 4)); return le32_get_bits(*(__pdesc + 4), GENMASK(5, 4));
} }
static inline int get_rx_desc_tsfl(__le32 *__pdesc) static inline u32 get_rx_desc_tsfl(__le32 *__pdesc)
{ {
return le32_to_cpu(*(__pdesc + 5)); return le32_to_cpu(*(__pdesc + 5));
} }
static inline int get_rx_desc_buff_addr(__le32 *__pdesc) static inline u32 get_rx_desc_buff_addr(__le32 *__pdesc)
{ {
return le32_to_cpu(*(__pdesc + 6)); return le32_to_cpu(*(__pdesc + 6));
} }
...@@ -341,12 +341,12 @@ static inline void set_rx_desc_buff_addr(__le32 *__pdesc, u32 __val) ...@@ -341,12 +341,12 @@ static inline void set_rx_desc_buff_addr(__le32 *__pdesc, u32 __val)
/* TX report 2 format in Rx desc*/ /* TX report 2 format in Rx desc*/
static inline int get_rx_rpt2_desc_macid_valid_1(__le32 *__status) static inline u32 get_rx_rpt2_desc_macid_valid_1(__le32 *__status)
{ {
return le32_to_cpu(*(__status + 4)); return le32_to_cpu(*(__status + 4));
} }
static inline int get_rx_rpt2_desc_macid_valid_2(__le32 *__status) static inline u32 get_rx_rpt2_desc_macid_valid_2(__le32 *__status)
{ {
return le32_to_cpu(*(__status + 5)); return le32_to_cpu(*(__status + 5));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment