From: Quytelda Kahja <quytelda@tamalin.org>
To: gregkh@linuxfoundation.org, wsa@the-dreams.de
Cc: driverdev-devel@linuxdriverproject.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Quytelda Kahja <quytelda@tamalin.org>
Subject: [PATCH 2/5] staging: ks7010: Replace SSID_MAX_SIZE with IEEE80211_MAX_SSID_LEN.
Date: Wed, 28 Feb 2018 21:19:08 -0800 [thread overview]
Message-ID: <20180301051911.1314-2-quytelda@tamalin.org> (raw)
In-Reply-To: <20180301051911.1314-1-quytelda@tamalin.org>
SSID_MAX_SIZE is a constant defined locally in ks_hostif.h, but it should
be replaced with IEEE80211_MAX_SSID_LEN from the kernel's 802.11 header,
of which it is just a copy.
Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
---
drivers/staging/ks7010/ks_hostif.c | 4 ++--
drivers/staging/ks7010/ks_hostif.h | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index 67cf32433023..59f7c4e422d3 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -253,12 +253,12 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info,
while (bsize > offset) {
switch (*bp) { /* Information Element ID */
case WLAN_EID_SSID:
- if (*(bp + 1) <= SSID_MAX_SIZE) {
+ if (*(bp + 1) <= IEEE80211_MAX_SSID_LEN) {
ap->ssid.size = *(bp + 1);
} else {
DPRINTK(1, "size over :: ssid size=%d\n",
*(bp + 1));
- ap->ssid.size = SSID_MAX_SIZE;
+ ap->ssid.size = IEEE80211_MAX_SSID_LEN;
}
memcpy(ap->ssid.body, bp + 2, ap->ssid.size);
break;
diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
index 9ac317e4b507..b46aa94c0d48 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -225,10 +225,9 @@ struct hostif_start_confirm_t {
__le16 result_code;
} __packed;
-#define SSID_MAX_SIZE 32
struct ssid_t {
u8 size;
- u8 body[SSID_MAX_SIZE];
+ u8 body[IEEE80211_MAX_SSID_LEN];
u8 ssid_pad;
} __packed;
--
2.16.2
next prev parent reply other threads:[~2018-03-01 5:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 5:19 [PATCH 1/5] staging: ks7010: Use constants from ieee80211_eid instead of literal ints Quytelda Kahja
2018-03-01 5:19 ` Quytelda Kahja [this message]
2018-03-01 5:19 ` [PATCH 3/5] staging: ks7010: Factor out repeated code into function 'ks_wlan_cap()' Quytelda Kahja
2018-03-01 6:37 ` Tobin C. Harding
2018-03-01 11:15 ` Dan Carpenter
2018-03-01 20:54 ` Tobin C. Harding
2018-03-02 1:28 ` Quytelda Kahja
2018-03-02 2:21 ` Tobin C. Harding
2018-03-02 9:07 ` Dan Carpenter
2018-03-02 9:05 ` Dan Carpenter
2018-03-04 22:57 ` Tobin C. Harding
2018-03-01 5:19 ` [PATCH 4/5] staging: ks7010: Replace local capability constants with kernel constants Quytelda Kahja
2018-03-01 5:19 ` [PATCH 5/5] staging: ks7010: Replace local frame type " Quytelda Kahja
2018-03-01 6:33 ` [PATCH 1/5] staging: ks7010: Use constants from ieee80211_eid instead of literal ints Tobin C. Harding
2018-03-01 6:34 ` Tobin C. Harding
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=20180301051911.1314-2-quytelda@tamalin.org \
--to=quytelda@tamalin.org \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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
all inboxes | Powered by JetHome®