Skip to content

Commit

Permalink
mt7603: main: fix warning in ieee80211_get_key_rx_seq()
Browse files Browse the repository at this point in the history
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 <lorenzo.bianconi@redhat.com>
  • Loading branch information
LorenzoBianconi authored and nbd168 committed Mar 28, 2018
1 parent 238f3f1 commit 880611b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mt7603_main.c
Expand Up @@ -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.
Expand Down

0 comments on commit 880611b

Please sign in to comment.