mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 13:22:23 +00:00
staging: wfx: drop useless structs only used in hif_ind_startup
The structs hif_capabilities, hif_otp_regul_sel_mode_info and hif_otp_phy_info have no real reasons to exist. Drop them and simplify access to fields of struct hif_ind_startup. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200907101521.66082-22-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0bb4728cd5
commit
a1fe137d1c
@ -122,25 +122,6 @@ enum hif_fw_type {
|
||||
HIF_FW_TYPE_WSM = 0x2
|
||||
};
|
||||
|
||||
struct hif_capabilities {
|
||||
u8 link_mode:2;
|
||||
u8 reserved1:6;
|
||||
u8 reserved2;
|
||||
u8 reserved3;
|
||||
u8 reserved4;
|
||||
} __packed;
|
||||
|
||||
struct hif_otp_regul_sel_mode_info {
|
||||
u8 region_sel_mode:4;
|
||||
u8 reserved:4;
|
||||
} __packed;
|
||||
|
||||
struct hif_otp_phy_info {
|
||||
u8 phy1_region:3;
|
||||
u8 phy0_region:3;
|
||||
u8 otp_phy_ver:2;
|
||||
} __packed;
|
||||
|
||||
struct hif_ind_startup {
|
||||
// As the others, this struct is interpreted as little endian by the
|
||||
// device. However, this struct is also used by the driver. We prefer to
|
||||
@ -156,14 +137,21 @@ struct hif_ind_startup {
|
||||
u8 mac_addr[2][ETH_ALEN];
|
||||
u8 api_version_minor;
|
||||
u8 api_version_major;
|
||||
struct hif_capabilities capabilities;
|
||||
u8 link_mode:2;
|
||||
u8 reserved1:6;
|
||||
u8 reserved2;
|
||||
u8 reserved3;
|
||||
u8 reserved4;
|
||||
u8 firmware_build;
|
||||
u8 firmware_minor;
|
||||
u8 firmware_major;
|
||||
u8 firmware_type;
|
||||
u8 disabled_channel_list[2];
|
||||
struct hif_otp_regul_sel_mode_info regul_sel_mode_info;
|
||||
struct hif_otp_phy_info otp_phy_info;
|
||||
u8 region_sel_mode:4;
|
||||
u8 reserved5:4;
|
||||
u8 phy1_region:3;
|
||||
u8 phy0_region:3;
|
||||
u8 otp_phy_ver:2;
|
||||
u32 supported_rate_mask;
|
||||
u8 firmware_label[128];
|
||||
} __packed;
|
||||
|
@ -359,9 +359,8 @@ int wfx_probe(struct wfx_dev *wdev)
|
||||
dev_info(wdev->dev, "started firmware %d.%d.%d \"%s\" (API: %d.%d, keyset: %02X, caps: 0x%.8X)\n",
|
||||
wdev->hw_caps.firmware_major, wdev->hw_caps.firmware_minor,
|
||||
wdev->hw_caps.firmware_build, wdev->hw_caps.firmware_label,
|
||||
wdev->hw_caps.api_version_major,
|
||||
wdev->hw_caps.api_version_minor,
|
||||
wdev->keyset, *((u32 *)&wdev->hw_caps.capabilities));
|
||||
wdev->hw_caps.api_version_major, wdev->hw_caps.api_version_minor,
|
||||
wdev->keyset, wdev->hw_caps.link_mode);
|
||||
snprintf(wdev->hw->wiphy->fw_version,
|
||||
sizeof(wdev->hw->wiphy->fw_version),
|
||||
"%d.%d.%d",
|
||||
@ -377,13 +376,13 @@ int wfx_probe(struct wfx_dev *wdev)
|
||||
goto err0;
|
||||
}
|
||||
|
||||
if (wdev->hw_caps.capabilities.link_mode == SEC_LINK_ENFORCED) {
|
||||
if (wdev->hw_caps.link_mode == SEC_LINK_ENFORCED) {
|
||||
dev_err(wdev->dev,
|
||||
"chip require secure_link, but can't negotiate it\n");
|
||||
goto err0;
|
||||
}
|
||||
|
||||
if (wdev->hw_caps.regul_sel_mode_info.region_sel_mode) {
|
||||
if (wdev->hw_caps.region_sel_mode) {
|
||||
wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[11].flags |= IEEE80211_CHAN_NO_IR;
|
||||
wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[12].flags |= IEEE80211_CHAN_NO_IR;
|
||||
wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[13].flags |= IEEE80211_CHAN_DISABLED;
|
||||
|
Loading…
Reference in New Issue
Block a user