Commit 15b6d73e authored by Quytelda Kahja's avatar Quytelda Kahja Committed by Greg Kroah-Hartman

staging: ks7010: Replace SSID_MAX_SIZE with IEEE80211_MAX_SSID_LEN.

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: default avatarQuytelda Kahja <quytelda@tamalin.org>
Reviewed-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dc13498a
...@@ -253,12 +253,12 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, ...@@ -253,12 +253,12 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info,
while (bsize > offset) { while (bsize > offset) {
switch (*bp) { /* Information Element ID */ switch (*bp) { /* Information Element ID */
case WLAN_EID_SSID: case WLAN_EID_SSID:
if (*(bp + 1) <= SSID_MAX_SIZE) { if (*(bp + 1) <= IEEE80211_MAX_SSID_LEN) {
ap->ssid.size = *(bp + 1); ap->ssid.size = *(bp + 1);
} else { } else {
DPRINTK(1, "size over :: ssid size=%d\n", DPRINTK(1, "size over :: ssid size=%d\n",
*(bp + 1)); *(bp + 1));
ap->ssid.size = SSID_MAX_SIZE; ap->ssid.size = IEEE80211_MAX_SSID_LEN;
} }
memcpy(ap->ssid.body, bp + 2, ap->ssid.size); memcpy(ap->ssid.body, bp + 2, ap->ssid.size);
break; break;
......
...@@ -225,10 +225,9 @@ struct hostif_start_confirm_t { ...@@ -225,10 +225,9 @@ struct hostif_start_confirm_t {
__le16 result_code; __le16 result_code;
} __packed; } __packed;
#define SSID_MAX_SIZE 32
struct ssid_t { struct ssid_t {
u8 size; u8 size;
u8 body[SSID_MAX_SIZE]; u8 body[IEEE80211_MAX_SSID_LEN];
u8 ssid_pad; u8 ssid_pad;
} __packed; } __packed;
......
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