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

staging: wfx: drop macro API_SSID_SIZE

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: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200907101521.66082-27-Jerome.Pouiller@silabs.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a1a97225
......@@ -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;
......
......@@ -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
......
......@@ -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++) {
......
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