On 2008?11?03? 06:45, James Carlson wrote:
> As part of investigating the troubles behind CR 6764186, Pengcheng
> Chen found that dladm_wlan_scan can wipe out a connected interface
> rather unexpectedly.
> 
> The current dladm_wlan_scan() code does this before starting the scan:
> 
>       status = do_get_linkstatus(linkid, &wl_status, sizeof (wl_status));
> 
> and then this after completion:
> 
>       if (wl_status != WL_CONNECTED) {
>               status = do_get_linkstatus(linkid, &wl_status,
>                   sizeof (&wl_status));
>               if (status != DLADM_STATUS_OK)
>                       goto done;
>               if (wl_status == WL_CONNECTED)
>                       (void) do_disconnect(linkid, buf, sizeof (buf));
> 
> Variations on this logic appear to have been in the code since the
> very first integration as part of PSARC 2007/140.  The effect of this
> code is that if we become connected while the scan is running, we
> immediately disconnect after the scan is done.
> 
> What isn't clear is why the code needs to do this.  The questions this
> brings up are:
> 
>   - What was the original purpose of this code?  Does anyone remember?
>     I can't seem to find a CR related to this code.
> 
>   - Do (or should) the wireless drivers support running a scan at the
>     same time that connect is requested?  If not, then whose
>     responsibility should it be to ensure serialization of these
>     operations?
> 
> Any hints or pointers welcome.
> 
I don't know the reason behind this, but it seems the code like this the 
first day when it is introduced by PSARC/2006/406. I am copying to Judy 
and see whether see knows the answer.

Thanks
- Cathy

Reply via email to