mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
wifi: rtlwifi: set initial values for unexpected cases of USB endpoint priority
Map USB endpoints to hardware and AC queues according to number of USB endpoints. However, original only give a warning for unexpected cases but initial values are not given. Then, smatch warns: drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c:642 _rtl92cu_init_chipn_two_out_ep_priority() error: uninitialized symbol 'valuelow'. drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c:644 _rtl92cu_init_chipn_two_out_ep_priority() error: uninitialized symbol 'valuehi'. drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c:649 _rtl92cu_init_chipn_two_out_ep_priority() error: uninitialized symbol 'valuehi'. drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c:650 _rtl92cu_init_chipn_two_out_ep_priority() error: uninitialized symbol 'valuelow'. The regular selection is high and low queues, so move default (unexpected) case along with that. Compile tested only. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240216033949.34765-1-pkshih@realtek.com
This commit is contained in:
parent
513c559ca9
commit
9208e85c62
1 changed files with 3 additions and 3 deletions
|
@ -622,6 +622,9 @@ static void _rtl92cu_init_chipn_two_out_ep_priority(struct ieee80211_hw *hw,
|
||||||
u16 valuelow;
|
u16 valuelow;
|
||||||
|
|
||||||
switch (queue_sel) {
|
switch (queue_sel) {
|
||||||
|
default:
|
||||||
|
WARN_ON(1);
|
||||||
|
fallthrough;
|
||||||
case (TX_SELE_HQ | TX_SELE_LQ):
|
case (TX_SELE_HQ | TX_SELE_LQ):
|
||||||
valuehi = QUEUE_HIGH;
|
valuehi = QUEUE_HIGH;
|
||||||
valuelow = QUEUE_LOW;
|
valuelow = QUEUE_LOW;
|
||||||
|
@ -634,9 +637,6 @@ static void _rtl92cu_init_chipn_two_out_ep_priority(struct ieee80211_hw *hw,
|
||||||
valuehi = QUEUE_HIGH;
|
valuehi = QUEUE_HIGH;
|
||||||
valuelow = QUEUE_NORMAL;
|
valuelow = QUEUE_NORMAL;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
WARN_ON(1);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
if (!wmm_enable) {
|
if (!wmm_enable) {
|
||||||
beq = valuelow;
|
beq = valuelow;
|
||||||
|
|
Loading…
Add table
Reference in a new issue