On Sat, 2009-05-30 at 16:00 -0500, Larry Finger wrote: > From the above patch, this hunk looks a little strange: > > diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c > index c143947..a01154e 100644 > --- a/net/mac80211/wext.c > +++ b/net/mac80211/wext.c > @@ -37,12 +37,13 @@ static int ieee80211_ioctl_siwgenie(struct > net_device *dev, > > if (sdata->vif.type == NL80211_IFTYPE_STATION) { > int ret = ieee80211_sta_set_extra_ie(sdata, extra, data->length); > - if (ret) > + if (ret && ret != -EALREADY) > return ret; > sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_BSSID_SEL; > sdata->u.mgd.flags &= ~IEEE80211_STA_EXT_SME; > sdata->u.mgd.flags &= ~IEEE80211_STA_CONTROL_PORT; > - ieee80211_sta_req_auth(sdata); > + if (ret != -EALREADY) > + ieee80211_sta_req_auth(sdata); > return 0; > } > > Why is there a check before the call to ieee80211_sta_req_auth()? If > ret != -EALREADY, would we not have already exited? No, it's && deliberately, I don't want to show -EALREADY to userspace, but I _do_ want to skip the req_auth() step, that's the whole purpose of the patch. Problem is I forgot to change the cfg80211 handlers accordingly and that created a problem Luis fixed. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part