wifi: rtl8xxxu: convert EN_DESC_ID of TX descriptor to le32 type
PATCH 1/2 wifi: rtl8xxxu: convert EN_DESC_ID of TX descriptor to le32 type
Fields of TX descriptor are little-endian order, so correct EN_DESC_ID field to le32 type.
--- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +1 -1
@@ -5619,7 +5619,7 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw,break ; }if (bmc && rtlvif->hw_key_idx !=0xff ) { - tx_desc->txdw1 |=TXDESC_EN_DESC_ID ; + tx_desc->txdw1 |=cpu_to_le32 (TXDESC_EN_DESC_ID ); macid = rtlvif->hw_key_idx; } }
Signature · 1 line
2.25.1
PATCH 2/2 wifi: rtl8xxxu: make instances of iface limit and combination to be static const
rtl8xxxu_limits and rtl8xxxu_combinations can be static const, so add modifiers as desire. Otherwise, Sparse reports warnings
rtl8xxxu_core.c:7677:30: warning: symbol 'rtl8xxxu_limits' was not declared. Should it be static? rtl8xxxu_core.c:7682:36: warning: symbol 'rtl8xxxu_combinations' was not declared. Should it be static?
--- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +2 -2
@@ -7674,12 +7674,12 @@ static void rtl8xxxu_deinit_led(struct rtl8xxxu_priv *priv)led_classdev_unregister (led); } -struct ieee80211_iface_limit rtl8xxxu_limits[] = { +static const struct ieee80211_iface_limit rtl8xxxu_limits[] = { { .max =2 , .types =BIT (NL80211_IFTYPE_STATION ), }, { .max =1 , .types =BIT (NL80211_IFTYPE_AP ), }, }; -struct ieee80211_iface_combination rtl8xxxu_combinations[] = { +static const struct ieee80211_iface_combination rtl8xxxu_combinations[] = { { .limits = rtl8xxxu_limits, .n_limits =ARRAY_SIZE (rtl8xxxu_limits),
Signature · 1 line
2.25.1
Quoted 8 lines · Ping-Ke Shih
Fields of TX descriptor are little-endian order, so correct
EN_DESC_IDfield to le32 type.Fixes b837f78fbffa ("wifi: rtl8xxxu: add hw crypto support for AP mode")Reported-by kernel test robot <[email protected]>Cc Martin Kaistra <[email protected]>Signed-off-by Ping-Ke Shih <[email protected]>
2 patches applied to wireless-next.git, thanks.
426e7b477392 wifi: rtl8xxxu: convert EN_DESC_ID of TX descriptor to le32 type 92c7428f942d wifi: rtl8xxxu: make instances of iface limit and combination to be static const
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches