From patchwork Mon Apr 6 11:17:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 11475283 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AED0915AB for ; Mon, 6 Apr 2020 11:19:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F52D2076C for ; Mon, 6 Apr 2020 11:19:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="CwRRofGu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727834AbgDFLSo (ORCPT ); Mon, 6 Apr 2020 07:18:44 -0400 Received: from mail-dm6nam11on2071.outbound.protection.outlook.com ([40.107.223.71]:6126 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727737AbgDFLSn (ORCPT ); Mon, 6 Apr 2020 07:18:43 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SNvB/iuP7CYZoNfxUgIuxUP3l86EKMLxlzyVdYgbgD2EtfCd2rr2O86NBVm3TQ0i+InPxj5i3TBaUHV7u3yRgK+TNG2igOYXfBH1e0h8/0ZpK/z/PxltvDaW1N6UtrNlil+7vlJ3KT9s9Tm3UBUmWAtgEzfL22NRcEC0sAkvLEi/V2DpRUMDRm8O4BHuXKCLB8Tf5gjB3Nxpja3IOhCqrdfM6Ejq8HFgLwuY3z6blFxmH6bd3bR4XH45XKFIZSIWWEvVPQLgjqqqnUW70/nyyGdSRSass8rcF75ND+b0scvgKNhPW+B3mas8i/z38xDk+T2doGVb7taQ+7Gu/bbvnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3z3rQZPzgNRFufNngeRmpsg9Ig8nES0BjyreFi6pGgU=; b=H62EuYLEe/tal1e07yOn0cwxlGnlcC6oXdLrr8N43JLFtj3CG50QgfRbmajqvK75MXtKMVDz6ocxJo4KYpreh5L+CAWzJRZ0Xwkxhg9JxEeEBboZ6IxMC/PFIUb1sVDXv0D6sZmqVU9SUa+CU1yufCeCJQeGdCiYa7DBNZnYj8/4jqb2YzoZod1aZuilWqryeQ4GH1G0xniFvwP1/giFE0SHYXFQ37daq4cVi1x1oeaGHIgKA6s/uxyV+2g+5yQVTlhRR7Z2IRMXt4ZAULnAMN8/cgouPEmVqZhom1vuqSjHfXY8t1KszDxZ7ZeiksfyO2S/FWhqhpnTbnkfCL2+gg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3z3rQZPzgNRFufNngeRmpsg9Ig8nES0BjyreFi6pGgU=; b=CwRRofGuq/Afuv09bn+mBvbIG0d2/O+NjQJMaWXAAck/l/HYkc8p/HC0QTQNkwhQ6+kwMv97vn+qLXW0Kvivd8Qg3z06P086FUWyWof6c2x8oUnitIPiyUCdGtM47VqwLLgI3OzK36AQJe19OkoB2cAPjBL0xPgSa7S4GWBTbSw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from BN6PR11MB4052.namprd11.prod.outlook.com (2603:10b6:405:7a::37) by BN6PR11MB3860.namprd11.prod.outlook.com (2603:10b6:405:77::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Mon, 6 Apr 2020 11:18:26 +0000 Received: from BN6PR11MB4052.namprd11.prod.outlook.com ([fe80::e0af:e9de:ffce:7376]) by BN6PR11MB4052.namprd11.prod.outlook.com ([fe80::e0af:e9de:ffce:7376%3]) with mapi id 15.20.2878.018; Mon, 6 Apr 2020 11:18:26 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 06/11] staging: wfx: fix endianness of hif API Date: Mon, 6 Apr 2020 13:17:51 +0200 Message-Id: <20200406111756.154086-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200406111756.154086-1-Jerome.Pouiller@silabs.com> References: <20200406111756.154086-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR05CA0010.namprd05.prod.outlook.com (2603:10b6:3:d4::20) To BN6PR11MB4052.namprd11.prod.outlook.com (2603:10b6:405:7a::37) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM5PR05CA0010.namprd05.prod.outlook.com (2603:10b6:3:d4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.13 via Frontend Transport; Mon, 6 Apr 2020 11:18:24 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e005a737-d38c-414d-4376-08d7da1c39ef X-MS-TrafficTypeDiagnostic: BN6PR11MB3860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-Forefront-PRVS: 0365C0E14B X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR11MB4052.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10009020)(396003)(39850400004)(346002)(366004)(136003)(376002)(186003)(16526019)(7696005)(52116002)(36756003)(5660300002)(107886003)(316002)(54906003)(66946007)(66476007)(4326008)(2616005)(66556008)(1076003)(66574012)(81166006)(6666004)(6486002)(8936002)(2906002)(86362001)(30864003)(81156014)(8676002)(478600001);DIR:OUT;SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /CNLeLy7PROcE9axT6asGzM+MEmuTl6Iyclv4yzTysGmsjpqKfWQqdoQrd6ceUXZICghKhUQDsLR8I4XDzTIwPRyrgsbFKDp25GwYex2GH9EBykbCW33KZULINhF9Q9JIZWdmquzecVGO+8iykt20guT4i14pkioES7aAzmG959FyPdBUqe5DNc2VaIf+on4dx6u2KjpKYOp/eXvnIOvE9qW9F4DQHy0722KcmLkb6dRrS1jVZA1oqjhMNvn/4iqVsnVZyzZnW/ls3P76UbEAIPAOLD8TaaI+a2h/XiggNctUIWMR1FK/9fPQhwCf7TgT4gOlZ5unSlKaPvpkzuKVhB+vdg2GgdluZUn4lnjw9LOwApnwvCbyXASGtHGvAki7Fepo4hB1jGfWbPiucmpY1ei+j7bsAfVWK7DDkiTvbS++nhwm7bPkCn73JTRXMxI X-MS-Exchange-AntiSpam-MessageData: ya7fN4w/rJuc6PflHaHK+yH1vtiQ2nkQ1okH/64ESZXAJ0tRKJ+bVZWyh0vfu54Gvc7HMBxlM00s/0SPzF7UwXDNPLeULeVdErAT6Y7/vaFV/U/gYnk2/GcHDKXY9xOVgrnKoLBN/GgC+80ItuXkhtRxyqftzPraCtkyfyhL5ifwXiKcvWL6VISIFO+kWSBz3BzUoBzggSeSA3Pokh40Ig== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: e005a737-d38c-414d-4376-08d7da1c39ef X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2020 11:18:26.5303 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UfgdCcna5o5vWbttUGVUf5iZsyDS8PCln/mmaGCRRm2WDlXfUCxPzhnrmTuKIKmIsmvxPTrxp5kVlMT//57dOg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB3860 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller 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: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 120 ++++++++++++------------- drivers/staging/wfx/hif_api_general.h | 56 ++++++------ drivers/staging/wfx/hif_api_mib.h | 124 +++++++++++++------------- 3 files changed, 150 insertions(+), 150 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 321f4fb27b35..82a9f4ae4555 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -94,25 +94,25 @@ struct hif_req_reset { } __packed; struct hif_req_read_mib { - u16 mib_id; - u16 reserved; + __le16 mib_id; + __le16 reserved; } __packed; struct hif_cnf_read_mib { - u32 status; - u16 mib_id; - u16 length; + __le32 status; + __le16 mib_id; + __le16 length; u8 mib_data[]; } __packed; struct hif_req_write_mib { - u16 mib_id; - u16 length; + __le16 mib_id; + __le16 length; u8 mib_data[]; } __packed; struct hif_cnf_write_mib { - u32 status; + __le32 status; } __packed; struct hif_ie_flags { @@ -131,12 +131,12 @@ struct hif_ie_tlv { struct hif_req_update_ie { struct hif_ie_flags ie_flags; - u16 num_ies; + __le16 num_ies; struct hif_ie_tlv ie[]; } __packed; struct hif_cnf_update_ie { - u32 status; + __le32 status; } __packed; struct hif_scan_type { @@ -153,13 +153,13 @@ struct hif_scan_flags { } __packed; struct hif_auto_scan_param { - u16 interval; + __le16 interval; u8 reserved; s8 rssi_thr; } __packed; struct hif_ssid_def { - u32 ssid_length; + __le32 ssid_length; u8 ssid[HIF_API_SSID_SIZE]; } __packed; @@ -176,19 +176,19 @@ struct hif_req_start_scan_alt { u8 probe_delay; u8 num_of_ssids; u8 num_of_channels; - u32 min_channel_time; - u32 max_channel_time; - s32 tx_power_level; + __le32 min_channel_time; + __le32 max_channel_time; + __le32 tx_power_level; // signed value struct hif_ssid_def ssid_def[HIF_API_MAX_NB_SSIDS]; u8 channel_list[]; } __packed; struct hif_cnf_start_scan { - u32 status; + __le32 status; } __packed; struct hif_cnf_stop_scan { - u32 status; + __le32 status; } __packed; enum hif_pm_mode_status { @@ -198,10 +198,10 @@ enum hif_pm_mode_status { }; struct hif_ind_scan_cmpl { - u32 status; + __le32 status; u8 pm_mode; u8 num_channels_completed; - u16 reserved; + __le16 reserved; } __packed; enum hif_queue_id { @@ -254,13 +254,13 @@ struct hif_ht_tx_parameters { } __packed; struct hif_req_tx { - u32 packet_id; + __le32 packet_id; u8 max_tx_rate; struct hif_queue queue_id; struct hif_data_flags data_flags; struct hif_tx_flags tx_flags; - u32 reserved; - u32 expire_time; + __le32 reserved; + __le32 expire_time; struct hif_ht_tx_parameters ht_tx_parameters; u8 frame[]; } __packed; @@ -282,17 +282,17 @@ struct hif_tx_result_flags { } __packed; struct hif_cnf_tx { - u32 status; - u32 packet_id; + __le32 status; + __le32 packet_id; u8 txed_rate; u8 ack_failures; struct hif_tx_result_flags tx_result_flags; - u32 media_delay; - u32 tx_queue_delay; + __le32 media_delay; + __le32 tx_queue_delay; } __packed; struct hif_cnf_multi_transmit { - u32 num_tx_confs; + __le32 num_tx_confs; struct hif_cnf_tx tx_conf_payload[]; } __packed; @@ -331,8 +331,8 @@ struct hif_rx_flags { } __packed; struct hif_ind_rx { - u32 status; - u16 channel_number; + __le32 status; + __le16 channel_number; u8 rxed_rate; u8 rcpi_rssi; struct hif_rx_flags rx_flags; @@ -345,15 +345,15 @@ struct hif_req_edca_queue_params { u8 reserved1; u8 aifsn; u8 reserved2; - u16 cw_min; - u16 cw_max; - u16 tx_op_limit; - u16 allowed_medium_time; - u32 reserved3; + __le16 cw_min; + __le16 cw_max; + __le16 tx_op_limit; + __le16 allowed_medium_time; + __le32 reserved3; } __packed; struct hif_cnf_edca_queue_params { - u32 status; + __le32 status; } __packed; struct hif_join_flags { @@ -367,26 +367,26 @@ struct hif_req_join { u8 infrastructure_bss_mode:1; u8 reserved1:7; u8 band; - u16 channel_number; + __le16 channel_number; u8 bssid[ETH_ALEN]; - u16 atim_window; + __le16 atim_window; u8 short_preamble:1; u8 reserved2:7; u8 probe_for_join; u8 reserved3; struct hif_join_flags join_flags; - u32 ssid_length; + __le32 ssid_length; u8 ssid[HIF_API_SSID_SIZE]; - u32 beacon_interval; - u32 basic_rate_set; + __le32 beacon_interval; + __le32 basic_rate_set; } __packed; struct hif_cnf_join { - u32 status; + __le32 status; } __packed; struct hif_ind_join_complete { - u32 status; + __le32 status; } __packed; struct hif_bss_flags { @@ -397,12 +397,12 @@ struct hif_bss_flags { struct hif_req_set_bss_params { struct hif_bss_flags bss_flags; u8 beacon_lost_count; - u16 aid; - u32 operational_rate_set; + __le16 aid; + __le32 operational_rate_set; } __packed; struct hif_cnf_set_bss_params { - u32 status; + __le32 status; } __packed; struct hif_pm_mode { @@ -419,11 +419,11 @@ struct hif_req_set_pm_mode { } __packed; struct hif_cnf_set_pm_mode { - u32 status; + __le32 status; } __packed; struct hif_ind_set_pm_mode_cmpl { - u32 status; + __le32 status; u8 pm_mode; u8 reserved[3]; } __packed; @@ -432,20 +432,20 @@ struct hif_ind_set_pm_mode_cmpl { struct hif_req_start { u8 mode; u8 band; - u16 channel_number; - u32 reserved1; - u32 beacon_interval; + __le16 channel_number; + __le32 reserved1; + __le32 beacon_interval; u8 dtim_period; u8 short_preamble:1; u8 reserved2:7; u8 reserved3; u8 ssid_length; u8 ssid[HIF_API_SSID_SIZE]; - u32 basic_rate_set; + __le32 basic_rate_set; } __packed; struct hif_cnf_start { - u32 status; + __le32 status; } __packed; enum hif_beacon { @@ -459,7 +459,7 @@ struct hif_req_beacon_transmit { } __packed; struct hif_cnf_beacon_transmit { - u32 status; + __le32 status; } __packed; #define HIF_LINK_ID_MAX 14 @@ -483,7 +483,7 @@ struct hif_req_map_link { } __packed; struct hif_cnf_map_link { - u32 status; + __le32 status; } __packed; struct hif_suspend_resume_flags { @@ -496,7 +496,7 @@ struct hif_suspend_resume_flags { struct hif_ind_suspend_resume_tx { struct hif_suspend_resume_flags suspend_resume_flags; - u16 peer_sta_set; + __le16 peer_sta_set; } __packed; @@ -612,7 +612,7 @@ struct hif_req_add_key { } __packed; struct hif_cnf_add_key { - u32 status; + __le32 status; } __packed; struct hif_req_remove_key { @@ -621,7 +621,7 @@ struct hif_req_remove_key { } __packed; struct hif_cnf_remove_key { - u32 status; + __le32 status; } __packed; enum hif_event_ind { @@ -642,12 +642,12 @@ enum hif_ps_mode_error { union hif_event_data { u8 rcpi_rssi; - u32 ps_mode_error; - u32 peer_sta_set; + __le32 ps_mode_error; + __le32 peer_sta_set; }; struct hif_ind_event { - u32 event_id; + __le32 event_id; union hif_event_data event_data; } __packed; diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index c58b9a1eff3d..5ff86e556182 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -23,7 +23,7 @@ #define HIF_COUNTER_MAX 7 struct hif_msg { - u16 len; + __le16 len; u8 id; u8 reserved:1; u8 interface:2; @@ -136,12 +136,12 @@ struct hif_otp_phy_info { } __packed; struct hif_ind_startup { - u32 status; - u16 hardware_id; + __le32 status; + __le16 hardware_id; u8 opn[14]; u8 uid[8]; - u16 num_inp_ch_bufs; - u16 size_inp_ch_buf; + __le16 num_inp_ch_bufs; + __le16 size_inp_ch_buf; u8 num_links_ap; u8 num_interfaces; u8 mac_addr[2][ETH_ALEN]; @@ -155,7 +155,7 @@ struct hif_ind_startup { u8 disabled_channel_list[2]; struct hif_otp_regul_sel_mode_info regul_sel_mode_info; struct hif_otp_phy_info otp_phy_info; - u32 supported_rate_mask; + __le32 supported_rate_mask; u8 firmware_label[128]; } __packed; @@ -163,12 +163,12 @@ struct hif_ind_wakeup { } __packed; struct hif_req_configuration { - u16 length; + __le16 length; u8 pds_data[]; } __packed; struct hif_cnf_configuration { - u32 status; + __le32 status; } __packed; enum hif_gpio_mode { @@ -187,8 +187,8 @@ struct hif_req_control_gpio { } __packed; struct hif_cnf_control_gpio { - u32 status; - u32 value; + __le32 status; + __le32 value; } __packed; enum hif_generic_indication_type { @@ -198,17 +198,17 @@ enum hif_generic_indication_type { }; struct hif_rx_stats { - u32 nb_rx_frame; - u32 nb_crc_frame; - u32 per_total; - u32 throughput; - u32 nb_rx_by_rate[API_RATE_NUM_ENTRIES]; - u16 per[API_RATE_NUM_ENTRIES]; - s16 snr[API_RATE_NUM_ENTRIES]; - s16 rssi[API_RATE_NUM_ENTRIES]; - s16 cfo[API_RATE_NUM_ENTRIES]; - u32 date; - u32 pwr_clk_freq; + __le32 nb_rx_frame; + __le32 nb_crc_frame; + __le32 per_total; + __le32 throughput; + __le32 nb_rx_by_rate[API_RATE_NUM_ENTRIES]; + __le16 per[API_RATE_NUM_ENTRIES]; + __le16 snr[API_RATE_NUM_ENTRIES]; // signed value + __le16 rssi[API_RATE_NUM_ENTRIES]; // signed value + __le16 cfo[API_RATE_NUM_ENTRIES]; // signed value + __le32 date; + __le32 pwr_clk_freq; u8 is_ext_pwr_clk; s8 current_temp; } __packed; @@ -219,7 +219,7 @@ union hif_indication_data { }; struct hif_ind_generic { - u32 indication_type; + __le32 indication_type; union hif_indication_data indication_data; } __packed; @@ -244,7 +244,7 @@ enum hif_error { }; struct hif_ind_error { - u32 type; + __le32 type; u8 data[]; } __packed; @@ -269,7 +269,7 @@ struct hif_sl_msg_hdr { struct hif_sl_msg { struct hif_sl_msg_hdr hdr; - u16 len; + __le16 len; u8 payload[]; } __packed; @@ -292,7 +292,7 @@ struct hif_req_set_sl_mac_key { } __packed; struct hif_cnf_set_sl_mac_key { - u32 status; + __le32 status; } __packed; enum hif_sl_session_key_alg { @@ -312,14 +312,14 @@ struct hif_req_sl_exchange_pub_keys { } __packed; struct hif_cnf_sl_exchange_pub_keys { - u32 status; + __le32 status; } __packed; #define API_NCP_PUB_KEY_SIZE 32 #define API_NCP_PUB_KEY_MAC_SIZE 64 struct hif_ind_sl_exchange_pub_keys { - u32 status; + __le32 status; u8 ncp_pub_key[API_NCP_PUB_KEY_SIZE]; u8 ncp_pub_key_mac[API_NCP_PUB_KEY_MAC_SIZE]; } __packed; @@ -332,7 +332,7 @@ struct hif_req_sl_configure { } __packed; struct hif_cnf_sl_configure { - u32 status; + __le32 status; } __packed; #endif diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index e6d05789720c..cd1c3fd37d1d 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -161,7 +161,7 @@ struct hif_ie_table_entry { } __packed; struct hif_mib_bcn_filter_table { - u32 num_of_info_elmts; + __le32 num_of_info_elmts; struct hif_ie_table_entry ie_table[]; } __packed; @@ -172,68 +172,68 @@ enum hif_beacon_filter { }; struct hif_mib_bcn_filter_enable { - u32 enable; - u32 bcn_count; + __le32 enable; + __le32 bcn_count; } __packed; struct hif_mib_extended_count_table { - u32 count_plcp_errors; - u32 count_fcs_errors; - u32 count_tx_packets; - u32 count_rx_packets; - u32 count_rx_packet_errors; - u32 count_rx_decryption_failures; - u32 count_rx_mic_failures; - u32 count_rx_no_key_failures; - u32 count_tx_multicast_frames; - u32 count_tx_frames_success; - u32 count_tx_frame_failures; - u32 count_tx_frames_retried; - u32 count_tx_frames_multi_retried; - u32 count_rx_frame_duplicates; - u32 count_rts_success; - u32 count_rts_failures; - u32 count_ack_failures; - u32 count_rx_multicast_frames; - u32 count_rx_frames_success; - u32 count_rx_cmacicv_errors; - u32 count_rx_cmac_replays; - u32 count_rx_mgmt_ccmp_replays; - u32 count_rx_bipmic_errors; - u32 count_rx_beacon; - u32 count_miss_beacon; - u32 reserved[15]; + __le32 count_plcp_errors; + __le32 count_fcs_errors; + __le32 count_tx_packets; + __le32 count_rx_packets; + __le32 count_rx_packet_errors; + __le32 count_rx_decryption_failures; + __le32 count_rx_mic_failures; + __le32 count_rx_no_key_failures; + __le32 count_tx_multicast_frames; + __le32 count_tx_frames_success; + __le32 count_tx_frame_failures; + __le32 count_tx_frames_retried; + __le32 count_tx_frames_multi_retried; + __le32 count_rx_frame_duplicates; + __le32 count_rts_success; + __le32 count_rts_failures; + __le32 count_ack_failures; + __le32 count_rx_multicast_frames; + __le32 count_rx_frames_success; + __le32 count_rx_cmacicv_errors; + __le32 count_rx_cmac_replays; + __le32 count_rx_mgmt_ccmp_replays; + __le32 count_rx_bipmic_errors; + __le32 count_rx_beacon; + __le32 count_miss_beacon; + __le32 reserved[15]; } __packed; struct hif_mib_count_table { - u32 count_plcp_errors; - u32 count_fcs_errors; - u32 count_tx_packets; - u32 count_rx_packets; - u32 count_rx_packet_errors; - u32 count_rx_decryption_failures; - u32 count_rx_mic_failures; - u32 count_rx_no_key_failures; - u32 count_tx_multicast_frames; - u32 count_tx_frames_success; - u32 count_tx_frame_failures; - u32 count_tx_frames_retried; - u32 count_tx_frames_multi_retried; - u32 count_rx_frame_duplicates; - u32 count_rts_success; - u32 count_rts_failures; - u32 count_ack_failures; - u32 count_rx_multicast_frames; - u32 count_rx_frames_success; - u32 count_rx_cmacicv_errors; - u32 count_rx_cmac_replays; - u32 count_rx_mgmt_ccmp_replays; - u32 count_rx_bipmic_errors; + __le32 count_plcp_errors; + __le32 count_fcs_errors; + __le32 count_tx_packets; + __le32 count_rx_packets; + __le32 count_rx_packet_errors; + __le32 count_rx_decryption_failures; + __le32 count_rx_mic_failures; + __le32 count_rx_no_key_failures; + __le32 count_tx_multicast_frames; + __le32 count_tx_frames_success; + __le32 count_tx_frame_failures; + __le32 count_tx_frames_retried; + __le32 count_tx_frames_multi_retried; + __le32 count_rx_frame_duplicates; + __le32 count_rts_success; + __le32 count_rts_failures; + __le32 count_ack_failures; + __le32 count_rx_multicast_frames; + __le32 count_rx_frames_success; + __le32 count_rx_cmacicv_errors; + __le32 count_rx_cmac_replays; + __le32 count_rx_mgmt_ccmp_replays; + __le32 count_rx_bipmic_errors; } __packed; struct hif_mib_mac_address { u8 mac_addr[ETH_ALEN]; - u16 reserved; + __le16 reserved; } __packed; struct hif_mib_wep_default_key_id { @@ -242,15 +242,15 @@ struct hif_mib_wep_default_key_id { } __packed; struct hif_mib_dot11_rts_threshold { - u32 threshold; + __le32 threshold; } __packed; struct hif_mib_slot_time { - u32 slot_time; + __le32 slot_time; } __packed; struct hif_mib_current_tx_power_level { - s32 power_level; + __le32 power_level; // signed value } __packed; struct hif_mib_non_erp_protection { @@ -274,7 +274,7 @@ struct hif_mib_template_frame { u8 frame_type; u8 init_rate:7; u8 mode:1; - u16 frame_length; + __le16 frame_length; u8 frame[700]; } __packed; @@ -328,7 +328,7 @@ struct hif_mib_set_association_mode { u8 greenfield:1; u8 reserved3:7; u8 mpdu_start_spacing; - u32 basic_rate_set; + __le32 basic_rate_set; } __packed; struct hif_mib_set_uapsd_information { @@ -342,9 +342,9 @@ struct hif_mib_set_uapsd_information { u8 deliv_video:1; u8 deliv_voice:1; u8 reserved2:4; - u16 min_auto_trigger_interval; - u16 max_auto_trigger_interval; - u16 auto_trigger_step; + __le16 min_auto_trigger_interval; + __le16 max_auto_trigger_interval; + __le16 auto_trigger_step; } __packed; struct hif_mib_tx_rate_retry_policy { @@ -384,7 +384,7 @@ struct hif_mib_set_ht_protection { } __packed; struct hif_mib_keep_alive_period { - u16 keep_alive_period; + __le16 keep_alive_period; u8 reserved[2]; } __packed;