I have successfully connected my Linksys WPC54G to my AP using WPA-PSK encryption using the
bcm43xx/softmac software.
To be able to do this, it was necessary to patch ieee80211softmac_wx.c and bcm43xx_wx.c using the
two attached patches. I used the wext interface of wpa_supplicant V1.8rc1 with the following
configuration file /etc/wpa_supplicant.conf:
# WPA encryption
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="xxxxxxx"
scan_ssid=1
key_mgmt=WPA-PSK
proto=WPA
pairwise=CCMP TKIP
group=CCMP TKIP
psk="yyyyyyyyyyyyyy"
priority=3
}
The command to start wpa_supplicant is
wpa_supplicant -iwlan0 -Dwext -c/etc/wpa_supplicant.conf -B
I have not tried using DHCP on the interface due to the reports of it not working, but that will be
my next project.
Note: Earlier, I had been able to use WPA with the dscape version, but I found that the sta_up.sh
script kept giving errors when trying to start the 'sta0' pseudo-interface. The softmac version is a
lot easier to start.
Congratulations to all the developers.
Larry
diff --git a/include/net/ieee80211softmac_wx.h
b/include/net/ieee80211softmac_wx.h
index 165ea4c..594a39a 100644
--- a/include/net/ieee80211softmac_wx.h
+++ b/include/net/ieee80211softmac_wx.h
@@ -63,4 +63,16 @@ ieee80211softmac_wx_get_genie(struct net
struct iw_request_info *info,
union iwreq_data *wrqu,
char *extra);
+
+extern int
+ieee80211softmac_wx_set_auth(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu,
+ char *extra);
+
+extern int
+ieee80211softmac_wx_get_auth(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu,
+ char *extra);
#endif /* _IEEE80211SOFTMAC_WX */
diff --git a/net/ieee80211/softmac/ieee80211softmac_wx.c
b/net/ieee80211/softmac/ieee80211softmac_wx.c
index ca11737..a163059 100644
--- a/net/ieee80211/softmac/ieee80211softmac_wx.c
+++ b/net/ieee80211/softmac/ieee80211softmac_wx.c
@@ -388,3 +388,97 @@ ieee80211softmac_wx_get_genie(struct net
}
EXPORT_SYMBOL_GPL(ieee80211softmac_wx_get_genie);
+int ieee80211softmac_wx_set_auth(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu,
+ char *extra)
+{
+ struct ieee80211softmac_device *mac = ieee80211_priv(dev);
+ unsigned long flags;
+ int err = 0;
+
+ spin_lock_irqsave(&mac->lock, flags);
+
+ switch (wrqu->param.flags & IW_AUTH_INDEX) {
+ case IW_AUTH_WPA_VERSION:
+ case IW_AUTH_CIPHER_PAIRWISE:
+ case IW_AUTH_CIPHER_GROUP:
+ case IW_AUTH_KEY_MGMT:
+ /*
+ * Host AP driver does not use these parameters and allows
+ * wpa_supplicant to control them internally.
+ */
+ break;
+ case IW_AUTH_TKIP_COUNTERMEASURES:
+ break; // FIXME
+ case IW_AUTH_DROP_UNENCRYPTED:
+ mac->ieee->drop_unencrypted = wrqu->param.value;
+ break;
+ case IW_AUTH_80211_AUTH_ALG:
+ break; // FIXME
+ case IW_AUTH_WPA_ENABLED:
+ if (wrqu->param.value == 0) {
+ mac->ieee->wpa_enabled = 0;
+ mac->ieee->privacy_invoked = 0;
+ break;
+ }
+ mac->ieee->privacy_invoked = 1;
+ mac->ieee->wpa_enabled = 1;
+ break;
+ case IW_AUTH_RX_UNENCRYPTED_EAPOL:
+ mac->ieee->ieee802_1x = wrqu->param.value;
+ break;
+ case IW_AUTH_PRIVACY_INVOKED:
+ mac->ieee->privacy_invoked = wrqu->param.value;
+ break;
+ default:
+ err = -EOPNOTSUPP;
+ break;
+ }
+ spin_unlock_irqrestore(&mac->lock, flags);
+ return err;
+}
+EXPORT_SYMBOL_GPL(ieee80211softmac_wx_set_auth);
+
+int ieee80211softmac_wx_get_auth(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu,
+ char *extra)
+{
+ struct ieee80211softmac_device *mac = ieee80211_priv(dev);
+ unsigned long flags;
+ int err = 0;
+
+ spin_lock_irqsave(&mac->lock, flags);
+
+ switch (wrqu->param.flags & IW_AUTH_INDEX) {
+ case IW_AUTH_WPA_VERSION:
+ case IW_AUTH_CIPHER_PAIRWISE:
+ case IW_AUTH_CIPHER_GROUP:
+ case IW_AUTH_KEY_MGMT:
+ case IW_AUTH_TKIP_COUNTERMEASURES: // FIXME
+ case IW_AUTH_80211_AUTH_ALG: // FIXME
+ /*
+ * Host AP driver does not use these parameters and allows
+ * wpa_supplicant to control them internally.
+ */
+ err = -EOPNOTSUPP;
+ break;
+ case IW_AUTH_DROP_UNENCRYPTED:
+ wrqu->param.value = mac->ieee->drop_unencrypted;
+ break;
+ case IW_AUTH_WPA_ENABLED:
+ wrqu->param.value = mac->ieee->wpa_enabled;
+ break;
+ case IW_AUTH_RX_UNENCRYPTED_EAPOL:
+ wrqu->param.value = mac->ieee->ieee802_1x;
+ break;
+ default:
+ err = -EOPNOTSUPP;
+ break;
+ }
+ spin_unlock_irqrestore(&mac->lock, flags);
+ return err;
+}
+EXPORT_SYMBOL_GPL(ieee80211softmac_wx_get_auth);
+
Index: bcm43xx_wx.c
===================================================================
--- bcm43xx_wx.c (revision 1051)
+++ bcm43xx_wx.c (working copy)
@@ -554,6 +554,21 @@
return err;
}
+static int bcm43xx_wx_set_encodingext(struct net_device *net_dev,
+ struct iw_request_info *info,
+ union iwreq_data *data,
+ char *extra)
+{
+ struct bcm43xx_private *bcm = bcm43xx_priv(net_dev);
+ int err;
+
+ wx_enter();
+
+ err = ieee80211_wx_set_encodeext(bcm->ieee, info, data, extra);
+
+ return err;
+}
+
static int bcm43xx_wx_get_encoding(struct net_device *net_dev,
struct iw_request_info *info,
union iwreq_data *data,
@@ -569,6 +584,21 @@
return err;
}
+static int bcm43xx_wx_get_encodingext(struct net_device *net_dev,
+ struct iw_request_info *info,
+ union iwreq_data *data,
+ char *extra)
+{
+ struct bcm43xx_private *bcm = bcm43xx_priv(net_dev);
+ int err;
+
+ wx_enter();
+
+ err = ieee80211_wx_get_encodeext(bcm->ieee, info, data, extra);
+
+ return err;
+}
+
static int bcm43xx_wx_set_power(struct net_device *net_dev,
struct iw_request_info *info,
union iwreq_data *data,
@@ -970,11 +1000,15 @@
/* Encoding */
WX(SIOCSIWENCODE) = bcm43xx_wx_set_encoding,
WX(SIOCGIWENCODE) = bcm43xx_wx_get_encoding,
+ WX(SIOCSIWENCODEEXT) = bcm43xx_wx_set_encodingext,
+ WX(SIOCGIWENCODEEXT) = bcm43xx_wx_get_encodingext,
/* Power saving */
//TODO WX(SIOCSIWPOWER) = bcm43xx_wx_set_power,
//TODO WX(SIOCGIWPOWER) = bcm43xx_wx_get_power,
WX(SIOCSIWGENIE) = ieee80211softmac_wx_set_genie,
WX(SIOCGIWGENIE) = ieee80211softmac_wx_get_genie,
+ WX(SIOCSIWAUTH) = ieee80211softmac_wx_set_auth,
+ WX(SIOCGIWAUTH) = ieee80211softmac_wx_get_auth,
};
#undef WX