mt76: mt7615: use module parameter option for offload firmware preference

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2020-05-05 17:54:06 +02:00
parent 10a5b7630a
commit 8688ed70c9
2 changed files with 6 additions and 14 deletions
-13
View File
@@ -38,16 +38,3 @@ config MT7663U
This adds support for MT7663U 802.11ax 2x2:2 wireless devices.
To compile this driver as a module, choose M here.
config MT7615_OFFLOAD_FIRMWARE
bool "Prefer client mode offload firmware (MT7663)"
depends on MT7615E || MT7663U
default y
help
Load MT7663 client mode offload firmware (v3) as primary option
and fallback to MT7663 firmware v2 in case of failure.
If MT7615_OFFLOAD_FIRMWARE is not selected MT7663 firmware v2
will be used as primary option.
MT7663 client mode offload firmware supports low power features
(hw frequency scanning, scheduled frequency scanning, WoW,
802.11 power save) but is more limited in AP mode
+6 -1
View File
@@ -11,6 +11,11 @@
#include "mac.h"
#include "eeprom.h"
static bool prefer_offload_fw = true;
module_param(prefer_offload_fw, bool, 0644);
MODULE_PARM_DESC(prefer_offload_fw,
"Prefer client mode offload firmware (MT7663)");
struct mt7615_patch_hdr {
char build_date[16];
char platform[4];
@@ -2091,7 +2096,7 @@ mt7663_load_rom_patch(struct mt7615_dev *dev, const char **n9_firmware)
const char *primary_rom = MT7663_OFFLOAD_ROM_PATCH;
int ret;
if (!IS_ENABLED(CONFIG_MT7615_OFFLOAD_FIRMWARE)) {
if (!prefer_offload_fw) {
secondary_rom = MT7663_OFFLOAD_ROM_PATCH;
primary_rom = MT7663_ROM_PATCH;
}