Partially revert "mt7603: use mcu command to set timing registers, fix OFDM timeout values"

This reverts commit 268467b9a4.
It is unnecessary to go through the MCU for this.

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2017-12-07 17:09:28 +01:00
parent d02a05b0b3
commit 4d4cd05966
3 changed files with 9 additions and 25 deletions
-2
View File
@@ -232,8 +232,6 @@ void mt7603_mac_tx_ba_reset(struct mt7603_dev *dev, int wcid, int tid, int ssn,
int mt7603_mcu_set_channel(struct mt7603_dev *dev);
int mt7603_mcu_set_eeprom(struct mt7603_dev *dev);
int mt7603_mcu_set_timing(struct mt7603_dev *dev, int slot, int sifs, int rifs,
int eifs);
void mt7603_mcu_exit(struct mt7603_dev *dev);
void mt7603_wtbl_init(struct mt7603_dev *dev, int idx, int vif, const u8 *mac_addr);
+9 -1
View File
@@ -60,9 +60,17 @@ void mt7603_mac_set_timing(struct mt7603_dev *dev)
else
sifs = 10;
mt7603_mcu_set_timing(dev, dev->slottime + offset, sifs, 2, 360);
mt7603_mac_stop(dev);
mt76_wr(dev, MT_TIMEOUT_CCK, cck + reg_offset);
mt76_wr(dev, MT_TIMEOUT_OFDM, ofdm + reg_offset);
mt76_wr(dev, MT_IFS,
FIELD_PREP(MT_IFS_EIFS, 360) |
FIELD_PREP(MT_IFS_RIFS, 2) |
FIELD_PREP(MT_IFS_SIFS, sifs) |
FIELD_PREP(MT_IFS_SLOT, dev->slottime));
mt7603_mac_start(dev);
}
static void
-22
View File
@@ -497,25 +497,3 @@ int mt7603_mcu_set_channel(struct mt7603_dev *dev)
return mt7603_mcu_set_tx_power(dev);
}
int mt7603_mcu_set_timing(struct mt7603_dev *dev, int slot, int sifs, int rifs,
int eifs)
{
struct {
u8 slot_time;
u8 sifs_time;
u8 rifs_time;
u8 __res0;
__le16 eifs_time;
__le16 __res1;
} req = {
.slot_time = slot,
.sifs_time = sifs,
.rifs_time = cpu_to_le16(rifs),
.eifs_time = cpu_to_le16(eifs),
};
struct sk_buff *skb;
skb = mt7603_mcu_msg_alloc(&req, sizeof(req));
return mt7603_mcu_msg_send(dev, skb, MCU_EXT_CMD_SLOT_TIME_SET, MCU_Q_SET, NULL);
}