Bug 645 - Bit rate didn't decrease when laptop moved away from AP
: Bit rate didn't decrease when laptop moved away from AP
Status: VERIFIED FIXED
: IPW2200
Wireless Tools
: 1.0.2
: HP/Compaq __UNSPECIFIED__
: P2 normal
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2005-04-21 01:21 by
Modified: 2005-10-09 12:00 (History)


Attachments
Force call to clear fixed rate (1.55 KB, patch)
2005-04-28 07:55, James Ketrenos
Details | Diff
dmesg.out.withpatch (15.15 KB, text/plain)
2005-04-29 20:17, Yan, Yechun
Details
dmesg.645.with patch.bitrate (18.62 KB, application/x-zip-compressed)
2005-05-12 21:47, Yan, Yechun
Details
Reorders the rate setting code to setup internal variables before calling the rate reset logic. (1.91 KB, patch)
2005-05-26 07:53, James Ketrenos
Details | Diff
load driver at a weak single place (27.18 KB, application/octet-stream)
2005-05-26 23:56, Yan, Yechun
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2005-04-21 01:21:54
"iwconfig eth1 rate 54M fixed"

Then moved away from the AP

"iwconfig"

We could see that the bit rate was still 54M but the link quality decreased.

Then

"iwconfig eth1 rate auto"
"iwconfig"

We saw that bit rate was still 54M or 0 but never any value between 0 and 54M 
appeared.
------- Comment #1 From 2005-04-21 14:54:21 -------
From bug scrub: For the bit rate to change to something other than the max 
rate, 300 packets of data have to be sent first. After that, for the bit rate 
to keep adjusting dynamically, the machine has to be sending/recieving data.

Can you retest while sending/recieving packets?
------- Comment #2 From 2005-04-21 23:33:03 -------
   I tried serval times and found that auto rate adjusting work fine before it 
was not set to be "xxM" or "fixed".
   But after `iwconfig ethX rate xxM` or `iwconfig ethX rate fixed` or 
`iwconfig ethX rate xxM fixed`, you can't ajust the rate to auto adpted by 
`iwconfig ethX rate auto`.
   For example (debug_level 0x43fff),BSS,no frag,no WEP
#(no action, just move laptop away after 1G data transfer start)
ipw2200: U ipw_wx_get_rate GET Rate -> 54000000
ipw2200: U ipw_wx_get_rate GET Rate -> 54000000
ipw2200: U ipw_wx_get_rate GET Rate -> 54000000
ipw2200: U ipw_wx_get_rate GET Rate -> 48000000
ipw2200: U ipw_wx_get_rate GET Rate -> 48000000
ipw2200: U ipw_wx_get_rate GET Rate -> 48000000
ipw2200: U ipw_wx_get_rate GET Rate -> 36000000
ipw2200: U ipw_wx_get_rate GET Rate -> 24000000
#iwconfig eth1 rate 2M fixed
ipw2200: U ipw_wx_set_rate Setting rate mask to 0x00000002 [fixed]
ipw2200: U ipw_wx_set_rate [re]association triggered due to rates change.
ipw2200: U ipw_compatible_rates Adding masked mandatory rate 82
ipw2200: U ipw_compatible_rates Adding masked mandatory rate 8B
ipw2200: U ipw_compatible_rates Adding masked mandatory rate 96
ipw2200: U ipw_compatible_rates Rate 0C masked : 0x00000002
ipw2200: U ipw_compatible_rates Rate 18 masked : 0x00000002
ipw2200: U ipw_compatible_rates Rate 30 masked : 0x00000002
ipw2200: U ipw_compatible_rates Rate 48 masked : 0x00000002
#iwconfig eth1 rate auto
ipw2200: U ipw_wx_set_rate Setting rate mask to 0x00000FFF [sub-rates]
ipw2200: U ipw_wx_set_rate [re]association triggered due to rates change.
ipw2200: U ipw_wx_get_rate GET Rate -> 2000000
ipw2200: U ipw_wx_get_rate GET Rate -> 2000000

The rate still keep in 2Mb even I move back laptop near AP. The datatransfer 
is still going on between these actions.
If remove the driver and load it again, the auto rate function will recover.
------- Comment #3 From 2005-04-28 07:46:55 -------
Request from scrub was made to provide the full dmesg output so we can see what
the drive is doing internally. debug_level=0x43fff.
------- Comment #4 From 2005-04-28 07:55:12 -------
Created an attachment (id=357) [details]
Force call to clear fixed rate

Please try the attached patch and if you still see the current behavior,
provide the full debug log at level 0x43fff
------- Comment #5 From 2005-04-29 20:17:56 -------
Created an attachment (id=362) [details]
dmesg.out.withpatch

Step:
1. Connect AP(BSS, no wep, no frag), transfer a file between 2 Laptop,
debug=0x43fff, driver with James' patch on ipw2200-1.0.3
2. iwconfig eth1 rate 2M fixed; iwconfig
3. iwconfig eth1 rate auto.
4. iwconfig;iwconfig....
after step 3, 'iwconfig' show the bitrate recover to 54M shortly, and then back
to 2M again (Laptop have been moved close to AP.)
dmesg in attachment

Another problem is that it looks as if the rate adjusting only happen when
datatransfer occur. If no data transfer between ap and laptop, rate didn't
adjust at all.
------- Comment #6 From 2005-05-12 08:36:18 -------
From scrub:
we need the part of the log that shows the rate being reconfigured
------- Comment #7 From 2005-05-12 21:47:56 -------
Created an attachment (id=380) [details]
dmesg.645.with patch.bitrate

Steps:
1. load driver, transfer file with another laptop
2. move laptop away from ap, iwconfig shows bitrate decrease normally.
3. iwconfig eth1 rate 24M fixed
4. iwconfig eth1 rate auto
5. iwconfig eth1 rate 54M auto
6. move away or move back; stop or start file transfer; the bitrate keeps on
24Mb/s and doesn't change anymore
dmesg in attachment is zip format
the first 4xxx lines without "<" start is recorded before step 3
the last 4xxx lines with "<" start is recorded from step3~step6
------- Comment #8 From 2005-05-26 07:53:19 -------
Created an attachment (id=408) [details]
Reorders the rate setting code to setup internal variables before calling the
rate reset logic.

Please try the attached patch and let us know if it improves the situation.

Thanks,
James
------- Comment #9 From 2005-05-26 07:55:42 -------
From scrub:

logics_sbux	ok; i see one problem w/ the current codee
logics_sbux	we're calling the code to reset the rate before we setup the priv
variable that stores the rate
logics_sbux	i'll attach a quick patch that attempts to fix that
------- Comment #10 From 2005-05-26 07:57:35 -------
Please try above patch.
------- Comment #11 From 2005-05-26 22:52:08 -------
The "rate fixed" problem is resolved with by latest patch. Rate will adjust
while file transfering.

But still another problem exist:

If there is no datatransfer or few transfer(such as ping) between the mobile and
ap(or other laptop), the rate keep 54Mb/s and never adjust until no single.

I try move the laptop away, where Link Qulity lower than 50. And unload, load
driver, the rate always keep in 54Mb/s and never change.
It looks as if bitrate wont adjust its rate automatically under these situation.
------- Comment #12 From 2005-05-26 23:56:38 -------
Created an attachment (id=409) [details]
load driver at a weak single place

load driver at a weak single place , bitrate keep at 54Mb 
------- Comment #13 From 2005-06-02 08:13:43 -------
Patch merged for 1.0.4; but marked as fixed.  Comment #11 is a dup of bug #375.
------- Comment #14 From 2005-06-02 08:28:24 -------
Updated the target -> 1.0.5 and set version back to 1.0.3... 
------- Comment #15 From 2005-07-20 14:07:40 -------
Marking bug as verified. The following scenarios seem to work correctly in 
1.0.6:

Scenario 1:
Associate with AP while close to AP.
Start a huge file transfer that takes as long as this test.
Move away from AP, bitrate will decrease.
Move closer to AP, bitrate will increase.

Scenario 2:
unload, reload driver.
Associate with AP while close to AP.
Start a huge file transfer that takes as long as this test.
iwconfig eth1 rate auto
Move away from AP, bitrate will decrease.
Move closer to AP, bitrate will increase.

Scenario 3:
unload, reload driver.
Associate with AP
iwconfig eth1 rate 24M fixed
iwconfig eth1 rate auto
moved away from AP, bitrate decreased.