libertas: fix WPA adhoc network creation
authorDan Williams <dcbw@redhat.com>
Sat, 23 May 2009 00:09:58 +0000 (20:09 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 3 Jun 2009 18:05:09 +0000 (14:05 -0400)
Oddly enough, the firmware's JOIN/START commands don't appear to have
any facility for setting custom IEs, thus the started adhoc network
doesn't advertise its WPA capability in the beacon.  Whee!

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/assoc.c

index cb737207d208c9ce36d56788b131b9f01fa71aea..b9b374119033f7fa92f04a0bfa7b6e8cf7e737ac 100644 (file)
@@ -711,11 +711,13 @@ static int lbs_adhoc_start(struct lbs_private *priv,
 
        /* set capability info */
        tmpcap = WLAN_CAPABILITY_IBSS;
-       if (assoc_req->secinfo.wep_enabled) {
-               lbs_deb_join("ADHOC_START: WEP enabled, setting privacy on\n");
+       if (assoc_req->secinfo.wep_enabled ||
+           assoc_req->secinfo.WPAenabled ||
+           assoc_req->secinfo.WPA2enabled) {
+               lbs_deb_join("ADHOC_START: WEP/WPA enabled, privacy on\n");
                tmpcap |= WLAN_CAPABILITY_PRIVACY;
        } else
-               lbs_deb_join("ADHOC_START: WEP disabled, setting privacy off\n");
+               lbs_deb_join("ADHOC_START: WEP disabled, privacy off\n");
 
        cmd.capability = cpu_to_le16(tmpcap);