mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: move mt76x02_init_device in mt76x02-lib module
Move mt76x02_init_device routine in mt76x02_util.c in order to be reused by mt76x0 driver and remove duplicated code. Move interface combo definition supported by the driver in mt76x02_init_device routine Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
d4391ae2f0
commit
aa6ebf9da5
@@ -158,40 +158,6 @@ void mt76_write_mac_initvals(struct mt76x02_dev *dev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_write_mac_initvals);
|
||||
|
||||
void mt76x2_init_device(struct mt76x02_dev *dev)
|
||||
{
|
||||
struct ieee80211_hw *hw = mt76_hw(dev);
|
||||
|
||||
INIT_DELAYED_WORK(&dev->mac_work, mt76x02_mac_work);
|
||||
|
||||
hw->queues = 4;
|
||||
hw->max_rates = 1;
|
||||
hw->max_report_rates = 7;
|
||||
hw->max_rate_tries = 1;
|
||||
hw->extra_tx_headroom = 2;
|
||||
if (mt76_is_usb(dev))
|
||||
hw->extra_tx_headroom += sizeof(struct mt76x02_txwi) +
|
||||
MT_DMA_HDR_LEN;
|
||||
|
||||
hw->sta_data_size = sizeof(struct mt76x02_sta);
|
||||
hw->vif_data_size = sizeof(struct mt76x02_vif);
|
||||
|
||||
ieee80211_hw_set(hw, SUPPORTS_HT_CCK_RATES);
|
||||
ieee80211_hw_set(hw, SUPPORTS_REORDERING_BUFFER);
|
||||
|
||||
dev->mt76.sband_2g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
|
||||
dev->mt76.sband_5g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
|
||||
|
||||
dev->mt76.chainmask = 0x202;
|
||||
dev->mt76.global_wcid.idx = 255;
|
||||
dev->mt76.global_wcid.hw_key_idx = -1;
|
||||
dev->slottime = 9;
|
||||
|
||||
/* init antenna configuration */
|
||||
dev->mt76.antenna_mask = 3;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x2_init_device);
|
||||
|
||||
void mt76x2_init_txpower(struct mt76x02_dev *dev,
|
||||
struct ieee80211_supported_band *sband)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user