mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-15 19:55:32 +00:00
wifi: mt76: mt7921: do not support one stream on secondary antenna only
mt7921 support following antenna combiantions only.
* primary + secondary (2x2)
* primary only (1x1)
Since we cannot work on secondary antenna only, return error if the
antenna bitmap is 0x2 in .set_antenna().
For example:
iw phy0 set antenna 3 3 /* valid */
iw phy0 set antenna 1 1 /* valid */
iw phy0 set antenna 2 2 /* invalid */
Cc: stable@vger.kernel.org
Fixes: e0f9fdda81
("mt76: mt7921: add ieee80211_ops")
Suggested-by: Knox Chiou <knoxchiou@google.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
b34f346b91
commit
d616d36802
1 changed files with 1 additions and 1 deletions
|
@ -1363,7 +1363,7 @@ mt7921_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
|
|||
return -EINVAL;
|
||||
|
||||
if ((BIT(hweight8(tx_ant)) - 1) != tx_ant)
|
||||
tx_ant = BIT(ffs(tx_ant) - 1) - 1;
|
||||
return -EINVAL;
|
||||
|
||||
mt7921_mutex_acquire(dev);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue