linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jerome Pouiller <Jerome.Pouiller@silabs.com>
To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Kalle Valo" <kvalo@codeaurora.org>,
	"David S . Miller" <davem@davemloft.net>,
	"Jérôme Pouiller" <jerome.pouiller@silabs.com>
Subject: [PATCH 26/31] staging: wfx: drop macro API_SSID_SIZE
Date: Mon,  7 Sep 2020 12:15:16 +0200	[thread overview]
Message-ID: <20200907101521.66082-27-Jerome.Pouiller@silabs.com> (raw)
In-Reply-To: <20200907101521.66082-1-Jerome.Pouiller@silabs.com>

From: Jérôme Pouiller <jerome.pouiller@silabs.com>

The maximum length of a SSID is defined by 802.11 specification. It is
already defined in mac80211: IEEE80211_MAX_SSID_LEN. Therefore, use this
generic definition.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
 drivers/staging/wfx/hif_api_cmd.h     | 8 +++-----
 drivers/staging/wfx/hif_api_general.h | 2 --
 drivers/staging/wfx/hif_tx.c          | 2 --
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h
index ef5483609dcb..7b365bd01b81 100644
--- a/drivers/staging/wfx/hif_api_cmd.h
+++ b/drivers/staging/wfx/hif_api_cmd.h
@@ -12,8 +12,6 @@
 
 #include "hif_api_general.h"
 
-#define HIF_API_SSID_SIZE                      API_SSID_SIZE
-
 enum hif_requests_ids {
 	HIF_REQ_ID_RESET                = 0x0a,
 	HIF_REQ_ID_READ_MIB             = 0x05,
@@ -111,7 +109,7 @@ struct hif_cnf_update_ie {
 
 struct hif_ssid_def {
 	__le32 ssid_length;
-	u8     ssid[HIF_API_SSID_SIZE];
+	u8     ssid[IEEE80211_MAX_SSID_LEN];
 } __packed;
 
 #define HIF_API_MAX_NB_SSIDS                           2
@@ -307,7 +305,7 @@ struct hif_req_join {
 	u8     force_with_ind:1;
 	u8     reserved6:4;
 	__le32 ssid_length;
-	u8     ssid[HIF_API_SSID_SIZE];
+	u8     ssid[IEEE80211_MAX_SSID_LEN];
 	__le32 beacon_interval;
 	__le32 basic_rate_set;
 } __packed;
@@ -364,7 +362,7 @@ struct hif_req_start {
 	u8     reserved3:7;
 	u8     reserved4;
 	u8     ssid_length;
-	u8     ssid[HIF_API_SSID_SIZE];
+	u8     ssid[IEEE80211_MAX_SSID_LEN];
 	__le32 basic_rate_set;
 } __packed;
 
diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h
index da63ba6f5148..c9e3c0f758c8 100644
--- a/drivers/staging/wfx/hif_api_general.h
+++ b/drivers/staging/wfx/hif_api_general.h
@@ -17,8 +17,6 @@
 #define __packed __attribute__((__packed__))
 #endif
 
-#define API_SSID_SIZE             32
-
 #define HIF_ID_IS_INDICATION      0x80
 #define HIF_COUNTER_MAX           7
 
diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c
index 0553e79595a6..a75c6b9804ba 100644
--- a/drivers/staging/wfx/hif_tx.c
+++ b/drivers/staging/wfx/hif_tx.c
@@ -245,8 +245,6 @@ int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req,
 	WARN(chan_num > HIF_API_MAX_NB_CHANNELS, "invalid params");
 	WARN(req->n_ssids > HIF_API_MAX_NB_SSIDS, "invalid params");
 
-	compiletime_assert(IEEE80211_MAX_SSID_LEN == HIF_API_SSID_SIZE,
-			   "API inconsistency");
 	if (!hif)
 		return -ENOMEM;
 	for (i = 0; i < req->n_ssids; i++) {
-- 
2.28.0


  parent reply	other threads:[~2020-09-07 10:19 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07 10:14 [PATCH 00/31] staging: wfx: fix last items of the TODO list Jerome Pouiller
2020-09-07 10:14 ` [PATCH 01/31] staging: wfx: improve readability of association processing Jerome Pouiller
2020-09-07 10:14 ` [PATCH 02/31] staging: wfx: relocate wfx_join() beside wfx_join_finalize() Jerome Pouiller
2020-09-07 10:14 ` [PATCH 03/31] staging: wfx: simplify hif_set_association_mode() Jerome Pouiller
2020-09-07 10:14 ` [PATCH 04/31] staging: wfx: keep API error list up-to-date Jerome Pouiller
2020-09-07 10:14 ` [PATCH 05/31] staging: wfx: drop 'secure link' feature Jerome Pouiller
2020-09-07 10:14 ` [PATCH 06/31] staging: wfx: drop multicast filtering Jerome Pouiller
2020-09-07 10:14 ` [PATCH 07/31] staging: wfx: drop useless function Jerome Pouiller
2020-09-07 10:14 ` [PATCH 08/31] staging: wfx: drop useless enum hif_beacon Jerome Pouiller
2020-09-07 10:14 ` [PATCH 09/31] staging: wfx: drop useless union hif_commands_ids Jerome Pouiller
2020-09-07 10:15 ` [PATCH 10/31] staging: wfx: drop useless struct hif_reset_flags Jerome Pouiller
2020-09-07 10:15 ` [PATCH 11/31] staging: wfx: drop useless struct hif_ie_flags Jerome Pouiller
2020-09-07 10:15 ` [PATCH 12/31] staging: wfx: drop useless struct hif_join_flags Jerome Pouiller
2020-09-07 10:15 ` [PATCH 13/31] staging: wfx: drop useless struct hif_bss_flags Jerome Pouiller
2020-09-07 10:15 ` [PATCH 14/31] staging: wfx: drop useless struct hif_map_link_flags Jerome Pouiller
2020-09-07 10:15 ` [PATCH 15/31] staging: wfx: drop useless struct hif_suspend_resume_flags Jerome Pouiller
2020-09-07 10:15 ` [PATCH 16/31] staging: wfx: drop useless struct hif_pm_mode Jerome Pouiller
2020-09-07 10:15 ` [PATCH 17/31] staging: wfx: drop useless struct hif_rx_flags Jerome Pouiller
2020-09-07 10:15 ` [PATCH 18/31] staging: wfx: drop useless struct hif_tx_result_flags Jerome Pouiller
2020-09-07 10:15 ` [PATCH 19/31] staging: wfx: drop useless structs only used in hif_req_tx Jerome Pouiller
2020-09-07 10:15 ` [PATCH 20/31] staging: wfx: drop useless stricts only used in hif_req_start_scan_alt Jerome Pouiller
2020-09-07 10:15 ` [PATCH 21/31] staging: wfx: drop useless structs only used in hif_ind_startup Jerome Pouiller
2020-09-07 10:15 ` [PATCH 22/31] staging: wfx: drop useless union hif_privacy_key_data Jerome Pouiller
2020-09-07 10:15 ` [PATCH 23/31] staging: wfx: drop useless union hif_event_data Jerome Pouiller
2020-09-07 10:15 ` [PATCH 24/31] staging: wfx: drop useless union hif_indication_data Jerome Pouiller
2020-09-07 10:15 ` [PATCH 25/31] staging: wfx: drop struct hif_ie_tlv Jerome Pouiller
2020-09-07 10:15 ` Jerome Pouiller [this message]
2020-09-07 10:15 ` [PATCH 27/31] staging: wfx: fix naming of hif_tx_rate_retry_policy Jerome Pouiller
2020-09-07 10:15 ` [PATCH 28/31] staging: wfx: fix spaces Jerome Pouiller
2020-09-07 10:15 ` [PATCH 29/31] staging: wfx: uniformize naming rules in hif_tx_mib.c Jerome Pouiller
2020-09-07 10:15 ` [PATCH 30/31] staging: wfx: drop async field from struct hif_cmd Jerome Pouiller
2020-09-07 10:15 ` [PATCH 31/31] staging: wfx: update TODO list Jerome Pouiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200907101521.66082-27-Jerome.Pouiller@silabs.com \
    --to=jerome.pouiller@silabs.com \
    --cc=davem@davemloft.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).