libertas: replace MRVDRV_MAX_SSID_LENGTH with IW_ESSID_MAX_SIZE

Dan Williams dcbw at localhost.unroutablelocaldomain
Tue Nov 28 02:56:38 EST 2006


Commit:     2cea6d13b3b3dd05f8c1a706b83463de3afa57e9
Parent:     7cff9d208890085bd003f09949a7cf663ee4ef06
commit 2cea6d13b3b3dd05f8c1a706b83463de3afa57e9
Author:     Dan Williams <dcbw at localhost.localdomain>
AuthorDate: Tue Nov 14 16:32:47 2006 -0500
Commit:     Dan Williams <dcbw at localhost.localdomain>
CommitDate: Tue Nov 14 16:32:47 2006 -0500

    libertas: replace MRVDRV_MAX_SSID_LENGTH with IW_ESSID_MAX_SIZE
    
    Use the WE define instead for clarity.
---
 drivers/net/wireless/libertas/hostcmd.h            |    2 +-
 drivers/net/wireless/libertas/wlan_defs.h          |    1 -
 drivers/net/wireless/libertas/wlan_ioctl.c         |    4 ++--
 drivers/net/wireless/libertas/wlan_join.c          |    4 ++--
 drivers/net/wireless/libertas/wlan_scan.c          |    4 ++--
 drivers/net/wireless/libertas/wlan_scan.h          |    2 +-
 .../net/wireless/libertas/wlanconfig/wlanconfig.c  |    2 +-
 7 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/libertas/hostcmd.h b/drivers/net/wireless/libertas/hostcmd.h
index 118027b..f02bea8 100644
--- a/drivers/net/wireless/libertas/hostcmd.h
+++ b/drivers/net/wireless/libertas/hostcmd.h
@@ -658,7 +658,7 @@ struct HostCmd_DS_802_11_RATE_ADAPT_RATE
 
 /* HostCmd_DS_802_11_AD_HOC_START*/
 struct HostCmd_DS_802_11_AD_HOC_START {
-	u8 SSID[MRVDRV_MAX_SSID_LENGTH];
+	u8 SSID[IW_ESSID_MAX_SIZE];
 	u8 BSSType;
 	u16 BeaconPeriod;
 	u8 DTIMPeriod;
diff --git a/drivers/net/wireless/libertas/wlan_defs.h b/drivers/net/wireless/libertas/wlan_defs.h
index ba85c82..4b01c07 100644
--- a/drivers/net/wireless/libertas/wlan_defs.h
+++ b/drivers/net/wireless/libertas/wlan_defs.h
@@ -193,7 +193,6 @@ #define DEV_NAME_LEN			32
 /** Misc constants */
 /* This section defines 802.11 specific contants */
 
-#define MRVDRV_MAX_SSID_LENGTH			32
 #define MRVDRV_MAX_BSS_DESCRIPTS		16
 #define MRVDRV_MAX_REGION_CODE			6
 
diff --git a/drivers/net/wireless/libertas/wlan_ioctl.c b/drivers/net/wireless/libertas/wlan_ioctl.c
index 56f890f..cd6a4db 100644
--- a/drivers/net/wireless/libertas/wlan_ioctl.c
+++ b/drivers/net/wireless/libertas/wlan_ioctl.c
@@ -49,9 +49,9 @@ #include "wlan_join.h"
 #include "wlan_wext.h"
 
 #define MAX_SCAN_CELL_SIZE      (IW_EV_ADDR_LEN + \
-				MRVDRV_MAX_SSID_LENGTH + \
+				IW_ESSID_MAX_SIZE + \
 				IW_EV_UINT_LEN + IW_EV_FREQ_LEN + \
-				IW_EV_QUAL_LEN + MRVDRV_MAX_SSID_LENGTH + \
+				IW_EV_QUAL_LEN + IW_ESSID_MAX_SIZE + \
 				IW_EV_PARAM_LEN + 40)	/* 40 for WPAIE */
 
 #define WAIT_FOR_SCAN_RRESULT_MAX_TIME (10 * HZ)
diff --git a/drivers/net/wireless/libertas/wlan_join.c b/drivers/net/wireless/libertas/wlan_join.c
index e4a24f7..ac0ebb7 100644
--- a/drivers/net/wireless/libertas/wlan_join.c
+++ b/drivers/net/wireless/libertas/wlan_join.c
@@ -710,14 +710,14 @@ int libertas_cmd_80211_ad_hoc_start(wlan
 	 *   and operational rates.
 	 */
 
-	memset(adhs->SSID, 0, MRVDRV_MAX_SSID_LENGTH);
+	memset(adhs->SSID, 0, IW_ESSID_MAX_SIZE);
 
 	memcpy(adhs->SSID, ((struct WLAN_802_11_SSID *)pssid)->Ssid,
 	       ((struct WLAN_802_11_SSID *)pssid)->SsidLength);
 
 	PRINTM(INFO, "ADHOC_S_CMD: SSID = %s\n", adhs->SSID);
 
-	memset(pBSSDesc->Ssid.Ssid, 0, MRVDRV_MAX_SSID_LENGTH);
+	memset(pBSSDesc->Ssid.Ssid, 0, IW_ESSID_MAX_SIZE);
 	memcpy(pBSSDesc->Ssid.Ssid,
 	       ((struct WLAN_802_11_SSID *)pssid)->Ssid,
 	       ((struct WLAN_802_11_SSID *)pssid)->SsidLength);
diff --git a/drivers/net/wireless/libertas/wlan_scan.c b/drivers/net/wireless/libertas/wlan_scan.c
index d7034bd..80c8f3a 100644
--- a/drivers/net/wireless/libertas/wlan_scan.c
+++ b/drivers/net/wireless/libertas/wlan_scan.c
@@ -50,11 +50,11 @@ #include "wlan_scan.h"
 
 //! Approximate amount of data needed to pass a scan result back to iwlist
 #define MAX_SCAN_CELL_SIZE  (IW_EV_ADDR_LEN             \
-                             + MRVDRV_MAX_SSID_LENGTH   \
+                             + IW_ESSID_MAX_SIZE        \
                              + IW_EV_UINT_LEN           \
                              + IW_EV_FREQ_LEN           \
                              + IW_EV_QUAL_LEN           \
-                             + MRVDRV_MAX_SSID_LENGTH   \
+                             + IW_ESSID_MAX_SIZE        \
                              + IW_EV_PARAM_LEN          \
                              + 40)	/* 40 for WPAIE */
 
diff --git a/drivers/net/wireless/libertas/wlan_scan.h b/drivers/net/wireless/libertas/wlan_scan.h
index 0b9d7b8..820743c 100644
--- a/drivers/net/wireless/libertas/wlan_scan.h
+++ b/drivers/net/wireless/libertas/wlan_scan.h
@@ -153,7 +153,7 @@ struct wlan_ioctl_user_scan_cfg {
     /**
      *  @brief SSID filter sent in the firmware command to limit the results
      */
-	char specificSSID[MRVDRV_MAX_SSID_LENGTH + 1];
+	char specificSSID[IW_ESSID_MAX_SIZE + 1];
 
     /**
      *  @brief Variable number (fixed maximum) of channels to scan up
diff --git a/drivers/net/wireless/libertas/wlanconfig/wlanconfig.c b/drivers/net/wireless/libertas/wlanconfig/wlanconfig.c
index 493858a..04725e5 100644
--- a/drivers/net/wireless/libertas/wlanconfig/wlanconfig.c
+++ b/drivers/net/wireless/libertas/wlanconfig/wlanconfig.c
@@ -1205,7 +1205,7 @@ #endif
                     
                 case SSID:
                     if (*pElementLen && 
-                        *pElementLen <= MRVDRV_MAX_SSID_LENGTH) {
+                        *pElementLen <= IW_ESSID_MAX_SIZE) {
                         for (ssidIdx = 0; ssidIdx < *pElementLen; ssidIdx++) {
                             if (isprint(*(pCurrent + ssidIdx))) {
                                 printf("%c", *(pCurrent + ssidIdx));


More information about the Commits-kernel mailing list