summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2009-05-23 02:09:58 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-06-03 20:05:09 +0200
commit2fa7a98fc96abe431e5d54d97104cdca197391fa (patch)
treec2c111907a5f85a1fe6ca936cf370f98f81811e0
parentlibertas: convert CMD_802_11_ASSOCIATE to a direct command (diff)
downloadlinux-2fa7a98fc96abe431e5d54d97104cdca197391fa.tar.xz
linux-2fa7a98fc96abe431e5d54d97104cdca197391fa.zip
libertas: fix WPA adhoc network creation
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>
-rw-r--r--drivers/net/wireless/libertas/assoc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index cb737207d208..b9b374119033 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -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);