--- wext.c.orig 2008-07-21 22:18:29.000000000 +0200 +++ wext.c 2008-09-14 16:46:09.000000000 +0200 @@ -929,6 +929,14 @@ else idx--; + if (sdata->vif.type == IEEE80211_IF_TYPE_STA) { + struct ieee80211_if_sta *ifsta = &sdata->u.sta; + if (erq->flags & IW_ENCODE_OPEN) + ifsta->auth_alg = WLAN_AUTH_OPEN; + else if (erq->flags & IW_ENCODE_RESTRICTED) + ifsta->auth_alg = WLAN_AUTH_SHARED_KEY; + } + if (erq->flags & IW_ENCODE_DISABLED) remove = 1; else if (erq->length == 0) {