This command is necessary to write into the serial eeprom.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
BIT(CARL9170FW_HW_COUNTERS) |
BIT(CARL9170FW_RX_BA_FILTER) |
BIT(CARL9170FW_USB_INIT_FIRMWARE) |
+ BIT(CARL9170FW_HAS_WREGB_CMD) |
#ifdef CONFIG_CARL9170FW_USB_UP_STREAM
BIT(CARL9170FW_USB_UP_STREAM) |
#endif /* CONFIG_CARL9170FW_USB_UP_STREAM */
memset(&fw.tally, 0, sizeof(struct carl9170_tally_rsp));
break;
+ case CARL9170_CMD_WREGB:
+ resp->hdr.len = 0;
+ for (i = 0; i < MIN(cmd->wregb.count, cmd->hdr.len - 8); i++)
+ setb(cmd->wregb.addr + i, cmd->wregb.val[i]);
+ break;
+
case CARL9170_CMD_BCN_CTRL:
resp->hdr.len = 0;
CARL9170_CMD_RX_FILTER = 0x07,
CARL9170_CMD_WOL = 0x08,
CARL9170_CMD_TALLY = 0x09,
+ CARL9170_CMD_WREGB = 0x0a,
/* CAM */
CARL9170_CMD_EKEY = 0x10,
} regs[0] __packed;
} __packed;
+struct carl9170_write_reg_byte {
+ __le32 addr;
+ __le32 count;
+ u8 val[0];
+} __packed;
+
#define CARL9170FW_PHY_HT_ENABLE 0x4
#define CARL9170FW_PHY_HT_DYN2040 0x8
#define CARL9170FW_PHY_HT_EXT_CHAN_OFF 0x3
struct carl9170_u32_list echo;
struct carl9170_reg_list rreg;
struct carl9170_write_reg wreg;
+ struct carl9170_write_reg_byte wregb;
struct carl9170_rf_init rf_init;
struct carl9170_psm psm;
struct carl9170_wol_cmd wol;
/* Firmware will pass BA when BARs are queued */
CARL9170FW_RX_BA_FILTER,
+ /* Firmware has support to write a byte at a time */
+ CARL9170FW_HAS_WREGB_CMD,
+
/* KEEP LAST */
__CARL9170FW_FEATURE_NUM
};
CHECK_FOR_FEATURE(CARL9170FW_FIXED_5GHZ_PSM),
CHECK_FOR_FEATURE(CARL9170FW_HW_COUNTERS),
CHECK_FOR_FEATURE(CARL9170FW_RX_BA_FILTER),
+ CHECK_FOR_FEATURE(CARL9170FW_HAS_WREGB_CMD),
};
static void check_feature_list(const struct carl9170fw_desc_head *head,