summaryrefslogtreecommitdiff
path: root/target/linux/s3c24xx/patches/0139-fix-wep-needs-keys-before-ap.patch.patch
blob: 80c0b80f97dd8a5290e465d6ebb68df045bebdb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
From 0010ecb4113ddaa113f084cc4a8dce7c6d807bf4 Mon Sep 17 00:00:00 2001
From: Sean McNeil <sean@mcneil.com>
Date: Fri, 25 Jul 2008 23:06:08 +0100
Subject: [PATCH] fix-wep-needs-keys-before-ap.patch

Signed-off-by: Andy Green <andy@openmoko.com>
---
 .../function/wlan/ar6000/ar6000/wireless_ext.c     |   20 +++++++-------------
 1 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/drivers/sdio/function/wlan/ar6000/ar6000/wireless_ext.c b/drivers/sdio/function/wlan/ar6000/ar6000/wireless_ext.c
index db749e2..ede8e62 100644
--- a/drivers/sdio/function/wlan/ar6000/ar6000/wireless_ext.c
+++ b/drivers/sdio/function/wlan/ar6000/ar6000/wireless_ext.c
@@ -424,10 +424,6 @@ ar6000_ioctl_giwessid(struct net_device *dev,
         return -EIO;
     }
 
-    if (!ar->arSsidLen) {
-        return -EINVAL;
-    }
-
     data->flags = 1;
     data->length = ar->arSsidLen;
     A_MEMCPY(essid, ar->arSsid, ar->arSsidLen);
@@ -818,12 +814,6 @@ ar6000_ioctl_siwencode(struct net_device *dev,
     AR_SOFTC_T *ar = (AR_SOFTC_T *)dev->priv;
     int index;
     A_INT32 auth = ar->arDot11AuthMode;
-    /*
-     *  Static WEP Keys should be configured before setting the SSID
-     */
-    if (ar->arSsidLen) {
-        return -EIO;
-    }
 
     if (ar->arWlanState == WLAN_DISABLED) {
         return -EIO;
@@ -894,6 +884,7 @@ ar6000_ioctl_siwencode(struct net_device *dev,
      * profile has changed.  Erase ssid to signal change
      */
     A_MEMZERO(ar->arSsid, sizeof(ar->arSsid));
+    ar->arSsidLen = 0;
 
     return 0;
 }
@@ -1096,8 +1087,10 @@ static int ar6000_ioctl_siwauth(struct net_device *dev,
 		return -EOPNOTSUPP;
 	}
 
-	if (reset)
-		memset(ar->arSsid, 0, sizeof(ar->arSsid));
+	if (reset) {
+		A_MEMZERO(ar->arSsid, sizeof(ar->arSsid));
+		ar->arSsidLen = 0;
+	}
 
 	return 0;
 }
@@ -1335,7 +1328,8 @@ ar6000_ioctl_setparam(struct net_device *dev,
         /*
          * profile has changed.  Erase ssid to signal change
          */
-        A_MEMZERO(ar->arSsid, sizeof(ar->arSsid));
+	A_MEMZERO(ar->arSsid, sizeof(ar->arSsid));
+	ar->arSsidLen = 0;
     }
 
     return ret;
-- 
1.5.6.3