Kacheong,
Thanks for your quick response. Please see my answer below.
Kacheong Poon On 11/15/06 00:05 wrote:
| EXPLAIN
| ENETRESET, as the return value of ieee80211_ioctl(), is checked
| and used by wifi drivers. For example, if the desired ESSID is
| changed, ENETRESET is returned by ieee80211_ioctl(), wifi driver
| then is supposed to re-start connecting to an AP with the specified
| ESSID.
| ENETRESET is ignored when ieee80211_ioctl() sending back ioctl ACK
| message to config tools (dladm or wificonfig).
I c. Could you please add a comment in ieee80211_ioctl() before
calling miocack() explaining this?
OK. Added comments for function ieee80211_ioctl() as below:
* Return value should be checked by WiFi drivers. Return 0
* on success. Otherwise, return non-zero value to indicate
* the error. Driver should operate as below when the return
* error is:
* ENETRESET Reset wireless network and re-start to join a
* WLAN. ENETRESET is returned when a configuration
* parameter has been changed.
* When acknowledge a M_IOCTL message, thie error
* is ignored.
Also added comments before miocack() as below:
/* ignore ENETRESET when acknowledge the M_IOCTL message */
Here since the error ERESTART is not used. So removed '|| err == ERESTART'
from L1113.
| EXPLAIN
| Yes, it's the desired behavior. The desired rate is only for data
| transfer. So usually the desired rate is checked and used when the
| driver changes to RUN state.
| If the driver is SCAN, the desired rate is set but driver don't have
| to do anything.
| If the driver is AUTH or ASSOC, the drate is checked against rates
| supported by current ESS, nothing will be done if the drate is
| supported, and re-connecting is required to check if another ESS
| with specified drate can be found when the drate is not supported
| by the current ESS.
Could you please add a comment explaining the above?
OK. Added comments before L672 as below:
/*
* Set desired rate. the desired rate is for data transfer
* and usually is checked and used when driver changes to
* RUN state.
* If the driver is in AUTH | ASSOC | RUN state, desired
* rate is checked against rates supported by current ESS.
* If it's supported and current state is AUTH|ASSOC, nothing
* needs to be doen by driver since the desired rate will
* be enabled when the device changes to RUN state. And
* when current state is RUN, Re-associate with the ESS to
* enable the desired rate.
*/
721: I guess a comment is needed to explain what the code is trying
to do here. Why rescale the RSSI value to [0, MAX_RSSI]?
| ACCEPT & EXPLAIN
| Each wifi device has its own range of RSSI value. The wifi driver
| IOCTLs defines the range of printed RSSI value between 0 and 15
| (MAX_RSSI). So the device's RSSI value is rescaled.
| Added comments to function wifi_getrssi() as below:
|/*
| * Rescale device's RSSI value to (0, 15) as required by WiFi
| * driver IOCTLs (PSARC/2003/722)
| */
Could you also explain why the range is [0, 15], as defined
in the PSARC case? Is this required by some third party
code? I am just curious why 15, not 10, not 100 :-)
Here is the explain from its designer:
In 802.11 protocol, RSSI for the frequency-Hopping(FH) PHY is defined
as 0-15. So the MAX_RSSI is defined to be 15.
While for DSSS PHY, RSSI is a 8-bit value, then they need to be recaled
to fit into this range.
And they also admit that a percentage might make more sense.
But at that time, they choose to define it this way.
| ACCEPT
| Changed to use cv_timedwait_sig(), thus 200000 is removed. And
| WAIT_SCAN_MAX is re-defined to be maximum total scan wait time
| as below.
| /*
| * maximum scan wait time in second.
| * Time spent on scaning one channel is usually 100~200ms. The maximum
| * number of channels defined in wifi_ioctl.h is 99 (MAX_CHANNEL_NUM).
| * As a result the maximum total scan time is defined to be
| * (200ms * 100 = 20s)
| */
| #define WAIT_SCAN_MAX 20
| Actually the maximum channel number 99 is bigger than number of
| standard 802.11 channels. And since this value is big enough, I'd
| prefer to keep it staticly defined.
OK. Then maybe it should be defined as something like
#define WAIT_SCAN_MAX (200 * MAX_CHANNEL_NUM)
OK. I'll change it.
| ACCEPT & EXPLAIN
| If current state is RUN, the code just returns for a known bug.
| 6212098 Ath driver can not scan out the new network name when
| it is already connect with a wlan
| Added comments and codes as below:
| /* Return when current state is RUN for CR6212098 */
I guess it is better to put in the problem in a comment
instead of using the CR number.
OK. Replaced this comment with below:
/*
* Do not scan when current state is RUN. The reason is
* when connected, STA is on the same channel as AP. But
* to do scan, STA have to switch to each available channel,
* send probe request and wait certian time for probe
* response/beacon. Then when the STA switches to a channel
* different than AP's, as a result it cannot send/receive
* data packets to/from the connected WLAN. This eventually
* will cause data loss.
*/
| EXPLAIN
| The state is changed back to INIT only when original state is
| also INIT. The reason is that at the end of SCAN stage, if an
| AP is selected, the station will consequently connect to that
| AP. Then it looks unreasonable that for a disconnected device,
| a SCAN command causes it connected. So the state is changed back
| to INIT.
Could you please put the above as a comment in the code?
OK. Above explain is added as comment.
Thanks,
Judy
_______________________________________________
networking-discuss mailing list
[email protected]