mt76: remove wait argument from mt76x02_mcu_function_select

Remove wait argument from mt76x02_mcu_function_select and wait for
response when function is not Q_SELECT, what is the same behaviour
like in vendor driver.

Note this change behaviour for PCIe devices for Q_SELECT function
form wait to no-wait, and for mt76x0u BW_SETTING from no-wait to wait.
But the change is in align with vendor driver.

Signed-off-by: Stanislaw Gruszka <[email protected]>
This commit is contained in:
Stanislaw Gruszka
2018-11-01 18:29:27 +01:00
committed by Felix Fietkau
parent 94ad030758
commit 15cb426adf
6 changed files with 13 additions and 12 deletions
+7 -5
View File
@@ -132,9 +132,8 @@ out:
}
EXPORT_SYMBOL_GPL(mt76x02_mcu_msg_send);
int mt76x02_mcu_function_select(struct mt76x02_dev *dev,
enum mcu_function func,
u32 val, bool wait_resp)
int mt76x02_mcu_function_select(struct mt76x02_dev *dev, enum mcu_function func,
u32 val)
{
struct {
__le32 id;
@@ -143,9 +142,12 @@ int mt76x02_mcu_function_select(struct mt76x02_dev *dev,
.id = cpu_to_le32(func),
.value = cpu_to_le32(val),
};
bool wait = false;
return mt76_mcu_send_msg(dev, CMD_FUN_SET_OP, &msg, sizeof(msg),
wait_resp);
if (func != Q_SELECT)
wait = true;
return mt76_mcu_send_msg(dev, CMD_FUN_SET_OP, &msg, sizeof(msg), wait);
}
EXPORT_SYMBOL_GPL(mt76x02_mcu_function_select);