From patchwork Mon Apr 6 11:17:49 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: 216093 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF38AC2BA2B for ; Mon, 6 Apr 2020 11:19:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B275D2072A for ; Mon, 6 Apr 2020 11:19:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="l1lv3Qb0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727732AbgDFLSh (ORCPT ); Mon, 6 Apr 2020 07:18:37 -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 S1727181AbgDFLSf (ORCPT ); Mon, 6 Apr 2020 07:18:35 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Djvsa8NWb4sMlYkJCUC3wvosJMNrHJ0rEBqJc5dpOJnrh96y5x7xyF1HXA+E9lC28M/1WPxkpSj8S6c13s3pmq0OQ58y1U/Z+fP1gLeLp11UFZBYY/swHf7JTrUE6g/EXOqaIvQvi9yzt5Jnug9BieSZvsLSfFx0toJiY8ULyzTme5ZTaWMa7whkCO1iCGFc5W7vfyxAZNtDeEgQSbffeVEOQxymInB7as8WwRTQo1a0yoDM7SWQqLOsUX6KZDj0ZJyyBwvJcZzn36xYfeqQLtO56Me0epk6xM7C62DwanDzRzSbalv2Zvnn5HWAjJYH+dW1zNJQKGEkXxeTQL7TVw== 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=DfnL3pRd194MvXJy4u4gkfopF+Bsj+lYq4RBZHnEnn4=; b=fTNDAsRszLkUB1b3LGwwax4s1iWHv3p1lpOhxTIF0K9Nyl2nruM5fOrtNOTX6RMjwV7OU/mQCvqCKhb6g29Gi7zQgH3LsZ/ESQoYTJcp7eIBVcaaQ8lfoBOx2nPuw1otW5AocP+YRCX2EJAo+SNSCwTCc2zGL8MnNfzdJ9YqJKW472mn0BCl6qwTO0EEGkehjbWrJZXkxwvfSSPCIVr2WE/4mtqMNok6b6nNHMiMeXA9KJmSSxs+1HvKp5wzMv5ip2EKACLCWEkS29n5QHOhrZ+ye6u1FTpDWW9YR5DWePNfd6ZO9pKbaF+FRJ7S5uJAGaoXN7h8Y2LbF2A9kUdvZQ== 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=DfnL3pRd194MvXJy4u4gkfopF+Bsj+lYq4RBZHnEnn4=; b=l1lv3Qb0XD1bBMPIDux63slkqwregU442300dD1pFmxQUeuh44ypa5iIkgiPmZC8xgo1A4dQrJuW5OWGmGR+FapgUD/SMai9qhCAVzPyCB50EMd8Q35HQswiClIy3QLolQGlfSQx4OVupZ+cQ0/gx2CcCnH1LryEprufqbuE0j0= 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:22 +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:22 +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 04/11] staging: wfx: remove unused definitions from the hif API Date: Mon, 6 Apr 2020 13:17:49 +0200 Message-Id: <20200406111756.154086-5-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:20 +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: b664122a-f6eb-4a62-fb5e-08d7da1c3776 X-MS-TrafficTypeDiagnostic: BN6PR11MB3860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2582; 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)(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: ULa4lye8Wml866zouKYfjNmvrNI578rekrSnHnFzCHns8yvD2jQRyBvAidD81haCb6v9HoMthilW+ROXbjrKhMG+pFbrAX3HJljftHAmkFwx+ctevY9mgsmcxcbnPqYggpGJygANvQoWEL91S39JTm+hYvwLx4DiemCLyqZY0zE+q2h0xgVjbT0HdOasDE7REGztca2yAfVWQR1VykHllaTiWQkGGhjO+wAWeUybma8kQ80xNi8O8t5W3r2U5ZU4K4pYQRccg+e/tY3BBxIRDC9XLf1kIbR+cTQ9i1/3A+pSR8jHA+nQ7r1iwgN7Dl+5eMCYRb0H6JQB41lsdYZYpz5FECIsZ4Z9csZuqNh91DyfD/xuKavakAzv+rAZ3XnGZ5RQxbMbg0kiZYLk93C+NnRCjRzUnN4ozlyuxwcGNTGmQfcqYZNbsRH7kB7pDIx4 X-MS-Exchange-AntiSpam-MessageData: i7yO4vsWkxlH0cxXy4Bpq32u6V67oBgPSKVsGFpIlWe5yKHAuKy3Il0jRAYSJa4WjqFIEMRlc6yH7stT4JyrlcWxksBY/VDT+1LKTJt/yBMUKXsQf1dKPFSso0nzTvXtXffKMIax+QrH8S8ZjadOlVhdAU6uHvEkTiEtRNgdRoq/K3GY1nfI+axlLd4b1NonSjfxM66QbmkDg4JFR+g6IA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b664122a-f6eb-4a62-fb5e-08d7da1c3776 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2020 11:18:22.5036 (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: vMNdl3R7vDISE3wW3aaM1rCIQCvzc81FYgZdgkIAkj6RqcIXXqYmTlPAilmOy3h5vEN75PIvFY8bbjQPSdyRLA== 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 Until now, hif API was directly imported from firmware sources. However, it does not make sense to keep ton of unused structures in the driver. Moreover, the hif API is now stable enough to be keep in sync by importing delta from firmware. So, drop unused definitions from the hif API. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 18 --- drivers/staging/wfx/hif_api_general.h | 90 --------------- drivers/staging/wfx/hif_api_mib.h | 155 -------------------------- 3 files changed, 263 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index f6934598f319..321f4fb27b35 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -10,8 +10,6 @@ #include "hif_api_general.h" -#define HIF_NUM_AC 4 - #define HIF_API_SSID_SIZE API_SSID_SIZE enum hif_requests_ids { @@ -168,22 +166,6 @@ struct hif_ssid_def { #define HIF_API_MAX_NB_SSIDS 2 #define HIF_API_MAX_NB_CHANNELS 14 -struct hif_req_start_scan { - u8 band; - struct hif_scan_type scan_type; - struct hif_scan_flags scan_flags; - u8 max_transmit_rate; - struct hif_auto_scan_param auto_scan_param; - u8 num_of_probe_requests; - u8 probe_delay; - u8 num_of_ssids; - u8 num_of_channels; - u32 min_channel_time; - u32 max_channel_time; - s32 tx_power_level; - u8 ssid_and_channel_lists[]; -} __packed; - struct hif_req_start_scan_alt { u8 band; struct hif_scan_type scan_type; diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index a069c3a21b4d..73016135f538 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -191,12 +191,6 @@ struct hif_req_control_gpio { u8 gpio_mode; } __packed; -enum hif_gpio_error { - HIF_GPIO_ERROR_0 = 0x0, - HIF_GPIO_ERROR_1 = 0x1, - HIF_GPIO_ERROR_2 = 0x2 -}; - struct hif_cnf_control_gpio { u32 status; u32 value; @@ -350,88 +344,4 @@ struct hif_cnf_sl_configure { u32 status; } __packed; -struct hif_req_prevent_rollback { - u32 magic_word; -} __packed; - -struct hif_cnf_prevent_rollback { - u32 status; -} __packed; - -enum hif_pta_mode { - PTA_1W_WLAN_MASTER = 0, - PTA_1W_COEX_MASTER = 1, - PTA_2W = 2, - PTA_3W = 3, - PTA_4W = 4 -}; - -enum hif_signal_level { - SIGNAL_LOW = 0, - SIGNAL_HIGH = 1 -}; - -enum hif_coex_type { - COEX_TYPE_GENERIC = 0, - COEX_TYPE_BLE = 1 -}; - -enum hif_grant_state { - NO_GRANT = 0, - GRANT = 1 -}; - -struct hif_req_pta_settings { - u8 pta_mode; - u8 request_signal_active_level; - u8 priority_signal_active_level; - u8 freq_signal_active_level; - u8 grant_signal_active_level; - u8 coex_type; - u8 default_grant_state; - u8 simultaneous_rx_accesses; - u8 priority_sampling_time; - u8 tx_rx_sampling_time; - u8 freq_sampling_time; - u8 grant_valid_time; - u8 fem_control_time; - u8 first_slot_time; - u16 periodic_tx_rx_sampling_time; - u16 coex_quota; - u16 wlan_quota; -} __packed; - -struct hif_cnf_pta_settings { - u32 status; -} __packed; - -enum hif_pta_priority { - HIF_PTA_PRIORITY_COEX_MAXIMIZED = 0x00000562, - HIF_PTA_PRIORITY_COEX_HIGH = 0x00000462, - HIF_PTA_PRIORITY_BALANCED = 0x00001461, - HIF_PTA_PRIORITY_WLAN_HIGH = 0x00001851, - HIF_PTA_PRIORITY_WLAN_MAXIMIZED = 0x00001A51 -}; - -struct hif_req_pta_priority { - u32 priority; -} __packed; - -struct hif_cnf_pta_priority { - u32 status; -} __packed; - -enum hif_pta_state { - PTA_OFF = 0, - PTA_ON = 1 -}; - -struct hif_req_pta_state { - u32 pta_state; -} __packed; - -struct hif_cnf_pta_state { - u32 status; -} __packed; - #endif diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index 36c9152785c4..732f82d10a19 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -63,8 +63,6 @@ enum hif_mib_ids { HIF_MIB_ID_BEACON_STATS = 0x2056, }; -#define HIF_OP_POWER_MODE_MASK 0xf - enum hif_op_power_mode { HIF_OP_POWER_MODE_ACTIVE = 0x0, HIF_OP_POWER_MODE_DOZE = 0x1, @@ -78,78 +76,12 @@ struct hif_mib_gl_operational_power_mode { u8 reserved2[3]; } __packed; -struct hif_mib_gl_block_ack_info { - u8 rx_buffer_size; - u8 rx_max_num_agreements; - u8 tx_buffer_size; - u8 tx_max_num_agreements; -} __packed; - struct hif_mib_gl_set_multi_msg { u8 enable_multi_tx_conf:1; u8 reserved1:7; u8 reserved2[3]; } __packed; -enum hif_cca_thr_mode { - HIF_CCA_THR_MODE_RELATIVE = 0x0, - HIF_CCA_THR_MODE_ABSOLUTE = 0x1 -}; - -struct hif_mib_gl_cca_config { - u8 cca_thr_mode; - u8 reserved[3]; -} __packed; - -#define MAX_NUMBER_DATA_FILTERS 0xA - -#define MAX_NUMBER_IPV4_ADDR_CONDITIONS 0x4 -#define MAX_NUMBER_IPV6_ADDR_CONDITIONS 0x4 -#define MAX_NUMBER_MAC_ADDR_CONDITIONS 0x4 -#define MAX_NUMBER_UC_MC_BC_CONDITIONS 0x4 -#define MAX_NUMBER_ETHER_TYPE_CONDITIONS 0x4 -#define MAX_NUMBER_PORT_CONDITIONS 0x4 -#define MAX_NUMBER_MAGIC_CONDITIONS 0x4 -#define MAX_NUMBER_ARP_CONDITIONS 0x2 -#define MAX_NUMBER_NS_CONDITIONS 0x2 - -struct hif_mib_ethertype_data_frame_condition { - u8 condition_idx; - u8 reserved; - u16 ether_type; -} __packed; - -enum hif_udp_tcp_protocol { - HIF_PROTOCOL_UDP = 0x0, - HIF_PROTOCOL_TCP = 0x1, - HIF_PROTOCOL_BOTH_UDP_TCP = 0x2 -}; - -enum hif_which_port { - HIF_PORT_DST = 0x0, - HIF_PORT_SRC = 0x1, - HIF_PORT_SRC_OR_DST = 0x2 -}; - -struct hif_mib_ports_data_frame_condition { - u8 condition_idx; - u8 protocol; - u8 which_port; - u8 reserved1; - u16 port_number; - u8 reserved2[2]; -} __packed; - -#define HIF_API_MAGIC_PATTERN_SIZE 32 - -struct hif_mib_magic_data_frame_condition { - u8 condition_idx; - u8 offset; - u8 magic_pattern_length; - u8 reserved; - u8 magic_pattern[HIF_API_MAGIC_PATTERN_SIZE]; -} __packed; - enum hif_mac_addr_type { HIF_MAC_ADDR_A1 = 0x0, HIF_MAC_ADDR_A2 = 0x1, @@ -162,25 +94,6 @@ struct hif_mib_mac_addr_data_frame_condition { u8 mac_address[ETH_ALEN]; } __packed; -enum hif_ip_addr_mode { - HIF_IP_ADDR_SRC = 0x0, - HIF_IP_ADDR_DST = 0x1 -}; - -struct hif_mib_ipv4_addr_data_frame_condition { - u8 condition_idx; - u8 address_mode; - u8 reserved[2]; - u8 i_pv4_address[HIF_API_IPV4_ADDRESS_SIZE]; -} __packed; - -struct hif_mib_ipv6_addr_data_frame_condition { - u8 condition_idx; - u8 address_mode; - u8 reserved[2]; - u8 i_pv6_address[HIF_API_IPV6_ADDRESS_SIZE]; -} __packed; - #define HIF_FILTER_UNICAST 0x1 #define HIF_FILTER_MULTICAST 0x2 #define HIF_FILTER_BROADCAST 0x4 @@ -226,13 +139,6 @@ struct hif_mib_arp_ip_addr_table { u8 ipv4_address[HIF_API_IPV4_ADDRESS_SIZE]; } __packed; -struct hif_mib_ns_ip_addr_table { - u8 condition_idx; - u8 ns_enable; - u8 reserved[2]; - u8 ipv6_address[HIF_API_IPV6_ADDRESS_SIZE]; -} __packed; - struct hif_mib_rx_filter { u8 reserved1:1; u8 bssid_filter:1; @@ -273,23 +179,6 @@ struct hif_mib_bcn_filter_enable { u32 bcn_count; } __packed; -struct hif_mib_group_seq_counter { - u32 bits4716; - u16 bits1500; - u16 reserved; -} __packed; - -struct hif_mib_tsf_counter { - u32 tsf_counterlo; - u32 tsf_counterhi; -} __packed; - -struct hif_mib_stats_table { - s16 latest_snr; - u8 latest_rcpi; - s8 latest_rssi; -} __packed; - struct hif_mib_extended_count_table { u32 count_plcp_errors; u32 count_fcs_errors; @@ -345,29 +234,11 @@ struct hif_mib_count_table { u32 count_rx_bipmic_errors; } __packed; -struct hif_mib_max_tx_power_level { - s32 max_tx_power_level_rf_port1; - s32 max_tx_power_level_rf_port2; -} __packed; - -struct hif_mib_beacon_stats { - s32 latest_tbtt_diff; - u32 reserved[4]; -} __packed; - struct hif_mib_mac_address { u8 mac_addr[ETH_ALEN]; u16 reserved; } __packed; -struct hif_mib_dot11_max_transmit_msdu_lifetime { - u32 max_life_time; -} __packed; - -struct hif_mib_dot11_max_receive_lifetime { - u32 max_life_time; -} __packed; - struct hif_mib_wep_default_key_id { u8 wep_default_key_id; u8 reserved[3]; @@ -440,12 +311,6 @@ struct hif_mib_block_ack_policy { u8 block_ack_rx_max_buffer_size; } __packed; -struct hif_mib_override_int_rate { - u8 internal_tx_rate; - u8 non_erp_internal_tx_rate; - u8 reserved[2]; -} __packed; - enum hif_mpdu_start_spacing { HIF_MPDU_START_SPACING_NO_RESTRIC = 0x0, HIF_MPDU_START_SPACING_QUARTER = 0x1, @@ -528,24 +393,4 @@ struct hif_mib_keep_alive_period { u8 reserved[2]; } __packed; -struct hif_mib_arp_keep_alive_period { - u16 arp_keep_alive_period; - u8 encr_type; - u8 reserved; - u8 sender_ipv4_address[HIF_API_IPV4_ADDRESS_SIZE]; - u8 target_ipv4_address[HIF_API_IPV4_ADDRESS_SIZE]; -} __packed; - -struct hif_mib_inactivity_timer { - u8 min_active_time; - u8 max_active_time; - u16 reserved; -} __packed; - -struct hif_mib_interface_protection { - u8 use_cts_prot:1; - u8 reserved1:7; - u8 reserved2[3]; -} __packed; - #endif