mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: initialize available_antennas_{tx,rx} info
Initialize available_antennas related info in wiphy data structure
according to antenna_mask field; antenna_mask info is initialized
in device specific code and will be used in mac80211 {set,get}_antenna
callbacks
Signed-off-by: Lorenzo Bianconi <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
eb359f19b4
commit
7e6e00bf0a
@@ -263,6 +263,9 @@ int mt76_register_device(struct mt76_dev *dev, bool vht,
|
||||
|
||||
wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR;
|
||||
|
||||
wiphy->available_antennas_tx = dev->antenna_mask;
|
||||
wiphy->available_antennas_rx = dev->antenna_mask;
|
||||
|
||||
hw->txq_data_size = sizeof(struct mt76_txq);
|
||||
hw->max_tx_fragments = 16;
|
||||
|
||||
|
||||
@@ -253,6 +253,8 @@ struct mt76_dev {
|
||||
u32 rev;
|
||||
unsigned long state;
|
||||
|
||||
u8 antenna_mask;
|
||||
|
||||
struct mt76_sband sband_2g;
|
||||
struct mt76_sband sband_5g;
|
||||
struct debugfs_blob_wrapper eeprom;
|
||||
|
||||
@@ -440,6 +440,9 @@ int mt7603_register_device(struct mt7603_dev *dev)
|
||||
dev->mt76.led_cdev.brightness_set = mt7603_led_set_brightness;
|
||||
dev->mt76.led_cdev.blink_set = mt7603_led_set_blink;
|
||||
|
||||
/* init antenna configuration */
|
||||
dev->mt76.antenna_mask = 3;
|
||||
|
||||
ret = mt76_register_device(&dev->mt76, true, mt7603_rates,
|
||||
ARRAY_SIZE(mt7603_rates));
|
||||
if (ret)
|
||||
|
||||
@@ -864,6 +864,9 @@ int mt76x2_register_device(struct mt76x2_dev *dev)
|
||||
dev->mt76.led_cdev.brightness_set = mt76x2_led_set_brightness;
|
||||
dev->mt76.led_cdev.blink_set = mt76x2_led_set_blink;
|
||||
|
||||
/* init antenna configuration */
|
||||
dev->mt76.antenna_mask = 3;
|
||||
|
||||
ret = mt76_register_device(&dev->mt76, true, mt76x2_rates,
|
||||
ARRAY_SIZE(mt76x2_rates));
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user