mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt7603: main: fix warning in ieee80211_get_key_rx_seq()
Fall back to software encryption for hw unsupported ciphers in order to fix the following warning in ieee80211_get_key_rx_seq routine: WARNING: CPU: 0 PID: 1546 at backports-2017-11-01/net/mac80211/key.c:1010 mt76_wcid_key_setup+0x6c/0x210 [mt76] CPU: 0 PID: 1546 Comm: hostapd Not tainted 4.9.87 #0 ... Call Trace: [<8000e220>] show_stack+0x70/0x8c [<80023a34>] __warn+0x110/0x118 [<80023ad0>] warn_slowpath_null+0x1c/0x2c [<871515c0>] mt76_wcid_key_setup+0x6c/0x210 [mt76] [<870a0c94>] 0x870a0c94 ---[ end trace 1a391bb242f6a068 ]--- Signed-off-by: Lorenzo Bianconi <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
238f3f1c2d
commit
880611b041
@@ -343,6 +343,17 @@ mt7603_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
|
||||
struct mt76_wcid *wcid = msta ? &msta->wcid : &mvif->wcid;
|
||||
int idx = key->keyidx;
|
||||
|
||||
/* fall back to sw encryption for unsupported ciphers */
|
||||
switch (key->cipher) {
|
||||
case WLAN_CIPHER_SUITE_WEP40:
|
||||
case WLAN_CIPHER_SUITE_WEP104:
|
||||
case WLAN_CIPHER_SUITE_TKIP:
|
||||
case WLAN_CIPHER_SUITE_CCMP:
|
||||
break;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
/*
|
||||
* The hardware does not support per-STA RX GTK, fall back
|
||||
* to software mode for these.
|
||||
|
||||
Reference in New Issue
Block a user