struct rtw89_fw_def {
const char *fw_basename;
u8 fw_format_max;
+ u16 fw_b_aid;
};
struct rtw89_phy_table {
RTW89_FW_NORMAL = 1,
RTW89_FW_WOWLAN = 3,
RTW89_FW_NORMAL_CE = 5,
+ RTW89_FW_NORMAL_B = 14,
+ RTW89_FW_WOWLAN_B = 15,
RTW89_FW_BBMCU0 = 64,
RTW89_FW_BBMCU1 = 65,
RTW89_FW_LOGFMT = 255,
switch (type) {
case RTW89_FW_WOWLAN:
+ case RTW89_FW_WOWLAN_B:
return &fw_info->wowlan;
case RTW89_FW_LOGFMT:
return &fw_info->log.suit;
int rtw89_fw_recognize(struct rtw89_dev *rtwdev)
{
+ const struct rtw89_fw_def *fw_def = rtw89_chip_get_fw_def(rtwdev);
const struct rtw89_chip_info *chip = rtwdev->chip;
+ const struct rtw89_hal *hal = &rtwdev->hal;
+ enum rtw89_fw_type normal_fw_type = RTW89_FW_NORMAL;
+ enum rtw89_fw_type wowlan_fw_type = RTW89_FW_WOWLAN;
int ret;
+ if (fw_def->fw_b_aid && fw_def->fw_b_aid == hal->aid) {
+ normal_fw_type = RTW89_FW_NORMAL_B;
+ wowlan_fw_type = RTW89_FW_WOWLAN_B;
+ }
+
if (chip->try_ce_fw) {
ret = __rtw89_fw_recognize(rtwdev, RTW89_FW_NORMAL_CE, true);
if (!ret)
goto normal_done;
}
- ret = __rtw89_fw_recognize(rtwdev, RTW89_FW_NORMAL, false);
+ ret = __rtw89_fw_recognize(rtwdev, normal_fw_type, false);
if (ret)
return ret;
return ret;
/* It still works if wowlan firmware isn't existing. */
- __rtw89_fw_recognize(rtwdev, RTW89_FW_WOWLAN, false);
+ __rtw89_fw_recognize(rtwdev, wowlan_fw_type, false);
/* It still works if log format file isn't existing. */
__rtw89_fw_recognize(rtwdev, RTW89_FW_LOGFMT, true);