Commit 31db18cc authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman

staging: wfx: fix endianness of hif API

The chip expects little endian in all structs it sends/receives. This
patch fixes the hif API to reflect this fact. Sparse should now report
meaningful errors.
Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200406111756.154086-7-Jerome.Pouiller@silabs.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a3d96828
...@@ -94,25 +94,25 @@ struct hif_req_reset { ...@@ -94,25 +94,25 @@ struct hif_req_reset {
} __packed; } __packed;
struct hif_req_read_mib { struct hif_req_read_mib {
u16 mib_id; __le16 mib_id;
u16 reserved; __le16 reserved;
} __packed; } __packed;
struct hif_cnf_read_mib { struct hif_cnf_read_mib {
u32 status; __le32 status;
u16 mib_id; __le16 mib_id;
u16 length; __le16 length;
u8 mib_data[]; u8 mib_data[];
} __packed; } __packed;
struct hif_req_write_mib { struct hif_req_write_mib {
u16 mib_id; __le16 mib_id;
u16 length; __le16 length;
u8 mib_data[]; u8 mib_data[];
} __packed; } __packed;
struct hif_cnf_write_mib { struct hif_cnf_write_mib {
u32 status; __le32 status;
} __packed; } __packed;
struct hif_ie_flags { struct hif_ie_flags {
...@@ -131,12 +131,12 @@ struct hif_ie_tlv { ...@@ -131,12 +131,12 @@ struct hif_ie_tlv {
struct hif_req_update_ie { struct hif_req_update_ie {
struct hif_ie_flags ie_flags; struct hif_ie_flags ie_flags;
u16 num_ies; __le16 num_ies;
struct hif_ie_tlv ie[]; struct hif_ie_tlv ie[];
} __packed; } __packed;
struct hif_cnf_update_ie { struct hif_cnf_update_ie {
u32 status; __le32 status;
} __packed; } __packed;
struct hif_scan_type { struct hif_scan_type {
...@@ -153,13 +153,13 @@ struct hif_scan_flags { ...@@ -153,13 +153,13 @@ struct hif_scan_flags {
} __packed; } __packed;
struct hif_auto_scan_param { struct hif_auto_scan_param {
u16 interval; __le16 interval;
u8 reserved; u8 reserved;
s8 rssi_thr; s8 rssi_thr;
} __packed; } __packed;
struct hif_ssid_def { struct hif_ssid_def {
u32 ssid_length; __le32 ssid_length;
u8 ssid[HIF_API_SSID_SIZE]; u8 ssid[HIF_API_SSID_SIZE];
} __packed; } __packed;
...@@ -176,19 +176,19 @@ struct hif_req_start_scan_alt { ...@@ -176,19 +176,19 @@ struct hif_req_start_scan_alt {
u8 probe_delay; u8 probe_delay;
u8 num_of_ssids; u8 num_of_ssids;
u8 num_of_channels; u8 num_of_channels;
u32 min_channel_time; __le32 min_channel_time;
u32 max_channel_time; __le32 max_channel_time;
s32 tx_power_level; __le32 tx_power_level; // signed value
struct hif_ssid_def ssid_def[HIF_API_MAX_NB_SSIDS]; struct hif_ssid_def ssid_def[HIF_API_MAX_NB_SSIDS];
u8 channel_list[]; u8 channel_list[];
} __packed; } __packed;
struct hif_cnf_start_scan { struct hif_cnf_start_scan {
u32 status; __le32 status;
} __packed; } __packed;
struct hif_cnf_stop_scan { struct hif_cnf_stop_scan {
u32 status; __le32 status;
} __packed; } __packed;
enum hif_pm_mode_status { enum hif_pm_mode_status {
...@@ -198,10 +198,10 @@ enum hif_pm_mode_status { ...@@ -198,10 +198,10 @@ enum hif_pm_mode_status {
}; };
struct hif_ind_scan_cmpl { struct hif_ind_scan_cmpl {
u32 status; __le32 status;
u8 pm_mode; u8 pm_mode;
u8 num_channels_completed; u8 num_channels_completed;
u16 reserved; __le16 reserved;
} __packed; } __packed;
enum hif_queue_id { enum hif_queue_id {
...@@ -254,13 +254,13 @@ struct hif_ht_tx_parameters { ...@@ -254,13 +254,13 @@ struct hif_ht_tx_parameters {
} __packed; } __packed;
struct hif_req_tx { struct hif_req_tx {
u32 packet_id; __le32 packet_id;
u8 max_tx_rate; u8 max_tx_rate;
struct hif_queue queue_id; struct hif_queue queue_id;
struct hif_data_flags data_flags; struct hif_data_flags data_flags;
struct hif_tx_flags tx_flags; struct hif_tx_flags tx_flags;
u32 reserved; __le32 reserved;
u32 expire_time; __le32 expire_time;
struct hif_ht_tx_parameters ht_tx_parameters; struct hif_ht_tx_parameters ht_tx_parameters;
u8 frame[]; u8 frame[];
} __packed; } __packed;
...@@ -282,17 +282,17 @@ struct hif_tx_result_flags { ...@@ -282,17 +282,17 @@ struct hif_tx_result_flags {
} __packed; } __packed;
struct hif_cnf_tx { struct hif_cnf_tx {
u32 status; __le32 status;
u32 packet_id; __le32 packet_id;
u8 txed_rate; u8 txed_rate;
u8 ack_failures; u8 ack_failures;
struct hif_tx_result_flags tx_result_flags; struct hif_tx_result_flags tx_result_flags;
u32 media_delay; __le32 media_delay;
u32 tx_queue_delay; __le32 tx_queue_delay;
} __packed; } __packed;
struct hif_cnf_multi_transmit { struct hif_cnf_multi_transmit {
u32 num_tx_confs; __le32 num_tx_confs;
struct hif_cnf_tx tx_conf_payload[]; struct hif_cnf_tx tx_conf_payload[];
} __packed; } __packed;
...@@ -331,8 +331,8 @@ struct hif_rx_flags { ...@@ -331,8 +331,8 @@ struct hif_rx_flags {
} __packed; } __packed;
struct hif_ind_rx { struct hif_ind_rx {
u32 status; __le32 status;
u16 channel_number; __le16 channel_number;
u8 rxed_rate; u8 rxed_rate;
u8 rcpi_rssi; u8 rcpi_rssi;
struct hif_rx_flags rx_flags; struct hif_rx_flags rx_flags;
...@@ -345,15 +345,15 @@ struct hif_req_edca_queue_params { ...@@ -345,15 +345,15 @@ struct hif_req_edca_queue_params {
u8 reserved1; u8 reserved1;
u8 aifsn; u8 aifsn;
u8 reserved2; u8 reserved2;
u16 cw_min; __le16 cw_min;
u16 cw_max; __le16 cw_max;
u16 tx_op_limit; __le16 tx_op_limit;
u16 allowed_medium_time; __le16 allowed_medium_time;
u32 reserved3; __le32 reserved3;
} __packed; } __packed;
struct hif_cnf_edca_queue_params { struct hif_cnf_edca_queue_params {
u32 status; __le32 status;
} __packed; } __packed;
struct hif_join_flags { struct hif_join_flags {
...@@ -367,26 +367,26 @@ struct hif_req_join { ...@@ -367,26 +367,26 @@ struct hif_req_join {
u8 infrastructure_bss_mode:1; u8 infrastructure_bss_mode:1;
u8 reserved1:7; u8 reserved1:7;
u8 band; u8 band;
u16 channel_number; __le16 channel_number;
u8 bssid[ETH_ALEN]; u8 bssid[ETH_ALEN];
u16 atim_window; __le16 atim_window;
u8 short_preamble:1; u8 short_preamble:1;
u8 reserved2:7; u8 reserved2:7;
u8 probe_for_join; u8 probe_for_join;
u8 reserved3; u8 reserved3;
struct hif_join_flags join_flags; struct hif_join_flags join_flags;
u32 ssid_length; __le32 ssid_length;
u8 ssid[HIF_API_SSID_SIZE]; u8 ssid[HIF_API_SSID_SIZE];
u32 beacon_interval; __le32 beacon_interval;
u32 basic_rate_set; __le32 basic_rate_set;
} __packed; } __packed;
struct hif_cnf_join { struct hif_cnf_join {
u32 status; __le32 status;
} __packed; } __packed;
struct hif_ind_join_complete { struct hif_ind_join_complete {
u32 status; __le32 status;
} __packed; } __packed;
struct hif_bss_flags { struct hif_bss_flags {
...@@ -397,12 +397,12 @@ struct hif_bss_flags { ...@@ -397,12 +397,12 @@ struct hif_bss_flags {
struct hif_req_set_bss_params { struct hif_req_set_bss_params {
struct hif_bss_flags bss_flags; struct hif_bss_flags bss_flags;
u8 beacon_lost_count; u8 beacon_lost_count;
u16 aid; __le16 aid;
u32 operational_rate_set; __le32 operational_rate_set;
} __packed; } __packed;
struct hif_cnf_set_bss_params { struct hif_cnf_set_bss_params {
u32 status; __le32 status;
} __packed; } __packed;
struct hif_pm_mode { struct hif_pm_mode {
...@@ -419,11 +419,11 @@ struct hif_req_set_pm_mode { ...@@ -419,11 +419,11 @@ struct hif_req_set_pm_mode {
} __packed; } __packed;
struct hif_cnf_set_pm_mode { struct hif_cnf_set_pm_mode {
u32 status; __le32 status;
} __packed; } __packed;
struct hif_ind_set_pm_mode_cmpl { struct hif_ind_set_pm_mode_cmpl {
u32 status; __le32 status;
u8 pm_mode; u8 pm_mode;
u8 reserved[3]; u8 reserved[3];
} __packed; } __packed;
...@@ -432,20 +432,20 @@ struct hif_ind_set_pm_mode_cmpl { ...@@ -432,20 +432,20 @@ struct hif_ind_set_pm_mode_cmpl {
struct hif_req_start { struct hif_req_start {
u8 mode; u8 mode;
u8 band; u8 band;
u16 channel_number; __le16 channel_number;
u32 reserved1; __le32 reserved1;
u32 beacon_interval; __le32 beacon_interval;
u8 dtim_period; u8 dtim_period;
u8 short_preamble:1; u8 short_preamble:1;
u8 reserved2:7; u8 reserved2:7;
u8 reserved3; u8 reserved3;
u8 ssid_length; u8 ssid_length;
u8 ssid[HIF_API_SSID_SIZE]; u8 ssid[HIF_API_SSID_SIZE];
u32 basic_rate_set; __le32 basic_rate_set;
} __packed; } __packed;
struct hif_cnf_start { struct hif_cnf_start {
u32 status; __le32 status;
} __packed; } __packed;
enum hif_beacon { enum hif_beacon {
...@@ -459,7 +459,7 @@ struct hif_req_beacon_transmit { ...@@ -459,7 +459,7 @@ struct hif_req_beacon_transmit {
} __packed; } __packed;
struct hif_cnf_beacon_transmit { struct hif_cnf_beacon_transmit {
u32 status; __le32 status;
} __packed; } __packed;
#define HIF_LINK_ID_MAX 14 #define HIF_LINK_ID_MAX 14
...@@ -483,7 +483,7 @@ struct hif_req_map_link { ...@@ -483,7 +483,7 @@ struct hif_req_map_link {
} __packed; } __packed;
struct hif_cnf_map_link { struct hif_cnf_map_link {
u32 status; __le32 status;
} __packed; } __packed;
struct hif_suspend_resume_flags { struct hif_suspend_resume_flags {
...@@ -496,7 +496,7 @@ struct hif_suspend_resume_flags { ...@@ -496,7 +496,7 @@ struct hif_suspend_resume_flags {
struct hif_ind_suspend_resume_tx { struct hif_ind_suspend_resume_tx {
struct hif_suspend_resume_flags suspend_resume_flags; struct hif_suspend_resume_flags suspend_resume_flags;
u16 peer_sta_set; __le16 peer_sta_set;
} __packed; } __packed;
...@@ -612,7 +612,7 @@ struct hif_req_add_key { ...@@ -612,7 +612,7 @@ struct hif_req_add_key {
} __packed; } __packed;
struct hif_cnf_add_key { struct hif_cnf_add_key {
u32 status; __le32 status;
} __packed; } __packed;
struct hif_req_remove_key { struct hif_req_remove_key {
...@@ -621,7 +621,7 @@ struct hif_req_remove_key { ...@@ -621,7 +621,7 @@ struct hif_req_remove_key {
} __packed; } __packed;
struct hif_cnf_remove_key { struct hif_cnf_remove_key {
u32 status; __le32 status;
} __packed; } __packed;
enum hif_event_ind { enum hif_event_ind {
...@@ -642,12 +642,12 @@ enum hif_ps_mode_error { ...@@ -642,12 +642,12 @@ enum hif_ps_mode_error {
union hif_event_data { union hif_event_data {
u8 rcpi_rssi; u8 rcpi_rssi;
u32 ps_mode_error; __le32 ps_mode_error;
u32 peer_sta_set; __le32 peer_sta_set;
}; };
struct hif_ind_event { struct hif_ind_event {
u32 event_id; __le32 event_id;
union hif_event_data event_data; union hif_event_data event_data;
} __packed; } __packed;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#define HIF_COUNTER_MAX 7 #define HIF_COUNTER_MAX 7
struct hif_msg { struct hif_msg {
u16 len; __le16 len;
u8 id; u8 id;
u8 reserved:1; u8 reserved:1;
u8 interface:2; u8 interface:2;
...@@ -136,12 +136,12 @@ struct hif_otp_phy_info { ...@@ -136,12 +136,12 @@ struct hif_otp_phy_info {
} __packed; } __packed;
struct hif_ind_startup { struct hif_ind_startup {
u32 status; __le32 status;
u16 hardware_id; __le16 hardware_id;
u8 opn[14]; u8 opn[14];
u8 uid[8]; u8 uid[8];
u16 num_inp_ch_bufs; __le16 num_inp_ch_bufs;
u16 size_inp_ch_buf; __le16 size_inp_ch_buf;
u8 num_links_ap; u8 num_links_ap;
u8 num_interfaces; u8 num_interfaces;
u8 mac_addr[2][ETH_ALEN]; u8 mac_addr[2][ETH_ALEN];
...@@ -155,7 +155,7 @@ struct hif_ind_startup { ...@@ -155,7 +155,7 @@ struct hif_ind_startup {
u8 disabled_channel_list[2]; u8 disabled_channel_list[2];
struct hif_otp_regul_sel_mode_info regul_sel_mode_info; struct hif_otp_regul_sel_mode_info regul_sel_mode_info;
struct hif_otp_phy_info otp_phy_info; struct hif_otp_phy_info otp_phy_info;
u32 supported_rate_mask; __le32 supported_rate_mask;
u8 firmware_label[128]; u8 firmware_label[128];
} __packed; } __packed;
...@@ -163,12 +163,12 @@ struct hif_ind_wakeup { ...@@ -163,12 +163,12 @@ struct hif_ind_wakeup {
} __packed; } __packed;
struct hif_req_configuration { struct hif_req_configuration {
u16 length; __le16 length;
u8 pds_data[]; u8 pds_data[];
} __packed; } __packed;
struct hif_cnf_configuration { struct hif_cnf_configuration {
u32 status; __le32 status;
} __packed; } __packed;
enum hif_gpio_mode { enum hif_gpio_mode {
...@@ -187,8 +187,8 @@ struct hif_req_control_gpio { ...@@ -187,8 +187,8 @@ struct hif_req_control_gpio {
} __packed; } __packed;
struct hif_cnf_control_gpio { struct hif_cnf_control_gpio {
u32 status; __le32 status;
u32 value; __le32 value;
} __packed; } __packed;
enum hif_generic_indication_type { enum hif_generic_indication_type {
...@@ -198,17 +198,17 @@ enum hif_generic_indication_type { ...@@ -198,17 +198,17 @@ enum hif_generic_indication_type {
}; };
struct hif_rx_stats { struct hif_rx_stats {
u32 nb_rx_frame; __le32 nb_rx_frame;
u32 nb_crc_frame; __le32 nb_crc_frame;
u32 per_total; __le32 per_total;
u32 throughput; __le32 throughput;
u32 nb_rx_by_rate[API_RATE_NUM_ENTRIES]; __le32 nb_rx_by_rate[API_RATE_NUM_ENTRIES];
u16 per[API_RATE_NUM_ENTRIES]; __le16 per[API_RATE_NUM_ENTRIES];
s16 snr[API_RATE_NUM_ENTRIES]; __le16 snr[API_RATE_NUM_ENTRIES]; // signed value
s16 rssi[API_RATE_NUM_ENTRIES]; __le16 rssi[API_RATE_NUM_ENTRIES]; // signed value
s16 cfo[API_RATE_NUM_ENTRIES]; __le16 cfo[API_RATE_NUM_ENTRIES]; // signed value
u32 date; __le32 date;
u32 pwr_clk_freq; __le32 pwr_clk_freq;
u8 is_ext_pwr_clk; u8 is_ext_pwr_clk;
s8 current_temp; s8 current_temp;
} __packed; } __packed;
...@@ -219,7 +219,7 @@ union hif_indication_data { ...@@ -219,7 +219,7 @@ union hif_indication_data {
}; };
struct hif_ind_generic { struct hif_ind_generic {
u32 indication_type; __le32 indication_type;
union hif_indication_data indication_data; union hif_indication_data indication_data;
} __packed; } __packed;
...@@ -244,7 +244,7 @@ enum hif_error { ...@@ -244,7 +244,7 @@ enum hif_error {
}; };
struct hif_ind_error { struct hif_ind_error {
u32 type; __le32 type;
u8 data[]; u8 data[];
} __packed; } __packed;
...@@ -269,7 +269,7 @@ struct hif_sl_msg_hdr { ...@@ -269,7 +269,7 @@ struct hif_sl_msg_hdr {
struct hif_sl_msg { struct hif_sl_msg {
struct hif_sl_msg_hdr hdr; struct hif_sl_msg_hdr hdr;
u16 len; __le16 len;
u8 payload[]; u8 payload[];
} __packed; } __packed;
...@@ -292,7 +292,7 @@ struct hif_req_set_sl_mac_key { ...@@ -292,7 +292,7 @@ struct hif_req_set_sl_mac_key {
} __packed; } __packed;
struct hif_cnf_set_sl_mac_key { struct hif_cnf_set_sl_mac_key {
u32 status; __le32 status;
} __packed; } __packed;
enum hif_sl_session_key_alg { enum hif_sl_session_key_alg {
...@@ -312,14 +312,14 @@ struct hif_req_sl_exchange_pub_keys { ...@@ -312,14 +312,14 @@ struct hif_req_sl_exchange_pub_keys {
} __packed; } __packed;
struct hif_cnf_sl_exchange_pub_keys { struct hif_cnf_sl_exchange_pub_keys {
u32 status; __le32 status;
} __packed; } __packed;
#define API_NCP_PUB_KEY_SIZE 32 #define API_NCP_PUB_KEY_SIZE 32
#define API_NCP_PUB_KEY_MAC_SIZE 64 #define API_NCP_PUB_KEY_MAC_SIZE 64
struct hif_ind_sl_exchange_pub_keys { struct hif_ind_sl_exchange_pub_keys {
u32 status; __le32 status;
u8 ncp_pub_key[API_NCP_PUB_KEY_SIZE]; u8 ncp_pub_key[API_NCP_PUB_KEY_SIZE];
u8 ncp_pub_key_mac[API_NCP_PUB_KEY_MAC_SIZE]; u8 ncp_pub_key_mac[API_NCP_PUB_KEY_MAC_SIZE];
} __packed; } __packed;
...@@ -332,7 +332,7 @@ struct hif_req_sl_configure { ...@@ -332,7 +332,7 @@ struct hif_req_sl_configure {
} __packed; } __packed;
struct hif_cnf_sl_configure { struct hif_cnf_sl_configure {
u32 status; __le32 status;
} __packed; } __packed;
#endif #endif
...@@ -161,7 +161,7 @@ struct hif_ie_table_entry { ...@@ -161,7 +161,7 @@ struct hif_ie_table_entry {
} __packed; } __packed;
struct hif_mib_bcn_filter_table { struct hif_mib_bcn_filter_table {
u32 num_of_info_elmts; __le32 num_of_info_elmts;
struct hif_ie_table_entry ie_table[]; struct hif_ie_table_entry ie_table[];
} __packed; } __packed;
...@@ -172,68 +172,68 @@ enum hif_beacon_filter { ...@@ -172,68 +172,68 @@ enum hif_beacon_filter {
}; };
struct hif_mib_bcn_filter_enable { struct hif_mib_bcn_filter_enable {
u32 enable; __le32 enable;
u32 bcn_count; __le32 bcn_count;
} __packed; } __packed;
struct hif_mib_extended_count_table { struct hif_mib_extended_count_table {
u32 count_plcp_errors; __le32 count_plcp_errors;
u32 count_fcs_errors; __le32 count_fcs_errors;
u32 count_tx_packets; __le32 count_tx_packets;
u32 count_rx_packets; __le32 count_rx_packets;
u32 count_rx_packet_errors; __le32 count_rx_packet_errors;
u32 count_rx_decryption_failures; __le32 count_rx_decryption_failures;
u32 count_rx_mic_failures; __le32 count_rx_mic_failures;
u32 count_rx_no_key_failures; __le32 count_rx_no_key_failures;
u32 count_tx_multicast_frames; __le32 count_tx_multicast_frames;
u32 count_tx_frames_success; __le32 count_tx_frames_success;
u32 count_tx_frame_failures; __le32 count_tx_frame_failures;
u32 count_tx_frames_retried; __le32 count_tx_frames_retried;
u32 count_tx_frames_multi_retried; __le32 count_tx_frames_multi_retried;
u32 count_rx_frame_duplicates; __le32 count_rx_frame_duplicates;
u32 count_rts_success; __le32 count_rts_success;
u32 count_rts_failures; __le32 count_rts_failures;
u32 count_ack_failures; __le32 count_ack_failures;
u32 count_rx_multicast_frames; __le32 count_rx_multicast_frames;
u32 count_rx_frames_success; __le32 count_rx_frames_success;
u32 count_rx_cmacicv_errors; __le32 count_rx_cmacicv_errors;
u32 count_rx_cmac_replays; __le32 count_rx_cmac_replays;
u32 count_rx_mgmt_ccmp_replays; __le32 count_rx_mgmt_ccmp_replays;
u32 count_rx_bipmic_errors; __le32 count_rx_bipmic_errors;
u32 count_rx_beacon; __le32 count_rx_beacon;
u32 count_miss_beacon; __le32 count_miss_beacon;
u32 reserved[15]; __le32 reserved[15];
} __packed; } __packed;
struct hif_mib_count_table { struct hif_mib_count_table {
u32 count_plcp_errors; __le32 count_plcp_errors;
u32 count_fcs_errors; __le32 count_fcs_errors;
u32 count_tx_packets; __le32 count_tx_packets;
u32 count_rx_packets; __le32 count_rx_packets;
u32 count_rx_packet_errors; __le32 count_rx_packet_errors;
u32 count_rx_decryption_failures; __le32 count_rx_decryption_failures;
u32 count_rx_mic_failures; __le32 count_rx_mic_failures;
u32 count_rx_no_key_failures; __le32 count_rx_no_key_failures;
u32 count_tx_multicast_frames; __le32 count_tx_multicast_frames;
u32 count_tx_frames_success; __le32 count_tx_frames_success;
u32 count_tx_frame_failures; __le32 count_tx_frame_failures;
u32 count_tx_frames_retried; __le32 count_tx_frames_retried;
u32 count_tx_frames_multi_retried; __le32 count_tx_frames_multi_retried;
u32 count_rx_frame_duplicates; __le32 count_rx_frame_duplicates;
u32 count_rts_success; __le32 count_rts_success;
u32 count_rts_failures; __le32 count_rts_failures;
u32 count_ack_failures; __le32 count_ack_failures;
u32 count_rx_multicast_frames; __le32 count_rx_multicast_frames;
u32 count_rx_frames_success; __le32 count_rx_frames_success;
u32 count_rx_cmacicv_errors; __le32 count_rx_cmacicv_errors;
u32 count_rx_cmac_replays; __le32 count_rx_cmac_replays;
u32 count_rx_mgmt_ccmp_replays; __le32 count_rx_mgmt_ccmp_replays;
u32 count_rx_bipmic_errors; __le32 count_rx_bipmic_errors;
} __packed; } __packed;
struct hif_mib_mac_address { struct hif_mib_mac_address {
u8 mac_addr[ETH_ALEN]; u8 mac_addr[ETH_ALEN];
u16 reserved; __le16 reserved;
} __packed; } __packed;
struct hif_mib_wep_default_key_id { struct hif_mib_wep_default_key_id {
...@@ -242,15 +242,15 @@ struct hif_mib_wep_default_key_id { ...@@ -242,15 +242,15 @@ struct hif_mib_wep_default_key_id {
} __packed; } __packed;
struct hif_mib_dot11_rts_threshold { struct hif_mib_dot11_rts_threshold {
u32 threshold; __le32 threshold;
} __packed; } __packed;
struct hif_mib_slot_time { struct hif_mib_slot_time {
u32 slot_time; __le32 slot_time;
} __packed; } __packed;
struct hif_mib_current_tx_power_level { struct hif_mib_current_tx_power_level {
s32 power_level; __le32 power_level; // signed value
} __packed; } __packed;
struct hif_mib_non_erp_protection { struct hif_mib_non_erp_protection {
...@@ -274,7 +274,7 @@ struct hif_mib_template_frame { ...@@ -274,7 +274,7 @@ struct hif_mib_template_frame {
u8 frame_type; u8 frame_type;
u8 init_rate:7; u8 init_rate:7;
u8 mode:1; u8 mode:1;
u16 frame_length; __le16 frame_length;
u8 frame[700]; u8 frame[700];
} __packed; } __packed;
...@@ -328,7 +328,7 @@ struct hif_mib_set_association_mode { ...@@ -328,7 +328,7 @@ struct hif_mib_set_association_mode {
u8 greenfield:1; u8 greenfield:1;
u8 reserved3:7; u8 reserved3:7;
u8 mpdu_start_spacing; u8 mpdu_start_spacing;
u32 basic_rate_set; __le32 basic_rate_set;
} __packed; } __packed;
struct hif_mib_set_uapsd_information { struct hif_mib_set_uapsd_information {
...@@ -342,9 +342,9 @@ struct hif_mib_set_uapsd_information { ...@@ -342,9 +342,9 @@ struct hif_mib_set_uapsd_information {
u8 deliv_video:1; u8 deliv_video:1;
u8 deliv_voice:1; u8 deliv_voice:1;
u8 reserved2:4; u8 reserved2:4;
u16 min_auto_trigger_interval; __le16 min_auto_trigger_interval;
u16 max_auto_trigger_interval; __le16 max_auto_trigger_interval;
u16 auto_trigger_step; __le16 auto_trigger_step;
} __packed; } __packed;
struct hif_mib_tx_rate_retry_policy { struct hif_mib_tx_rate_retry_policy {
...@@ -384,7 +384,7 @@ struct hif_mib_set_ht_protection { ...@@ -384,7 +384,7 @@ struct hif_mib_set_ht_protection {
} __packed; } __packed;
struct hif_mib_keep_alive_period { struct hif_mib_keep_alive_period {
u16 keep_alive_period; __le16 keep_alive_period;
u8 reserved[2]; u8 reserved[2];
} __packed; } __packed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment