On Fri, 2009-07-31 at 16:56 +0300, Maxim Levitsky wrote: > > That appears to be in the wrong place. Shouldn't that be in the > > _set_associated function? Otherwise you're always setting it to 0 before > > sending the probe? > I thought about this too, but I think this is the right place. > ieee80211_mgd_probe_ap is called to start a probe on an AP, it will > ignore following calls till ether AP responds or we reconnect. > What I did is not to fail after first timeout, but resend the assoc > request once more, thus this function won't be called again. Ok, that makes sense. > > > + else if (ifmgd->probe_miss_count < IEEE80211_ASSOC_RETRIES) { > > > + > > > + printk(KERN_DEBUG "No probe response from AP %pM" > > > > and that one too > same here > > > > > + " after %dms, try %d\n", bssid, > > > + (1000 * IEEE80211_PROBE_WAIT)/HZ, > > > + (int)ifmgd->probe_miss_count); > > > + > > > + ifmgd->probe_miss_count++; > > > + ifmgd->probe_timeout = jiffies + IEEE80211_PROBE_WAIT; > > > + run_again(ifmgd, ifmgd->probe_timeout); > > > + > > > + ssid = ieee80211_bss_get_ie(&ifmgd->associated->cbss, WLAN_EID_SSID); > > > + ieee80211_send_probe_req(sdata, ifmgd->associated->cbss.bssid, > > > + ssid + 2, ssid[1], NULL, 0); > > > + } else { > > > > Shouldn't this just call _probe_ap() again? After you move the setting > > to 0 out of it, that is? > No, first of all I tried it :-). :) > It takes the ifmgd->mtx first of all, > and besides this way it is more logical, ieee80211_mgd_probe_ap is > called once per AP ping, and here we continue it. > Since I have copied these 3 lines from ieee80211_mgd_probe_ap I have no > objection to put them in a new function. Don't think it really matters, it's just two function calls anyway... But maybe it would make sense to put this whole block into a _mgd_probe_ap_retry function or so? On the other hand, it's just a handful lines of code, so this is fine too. johannes