Rafael J. Wysocki wrote:
> On Thursday, 8 February 2007 18:31, Larry Finger wrote:
>> There is a bug in SoftMAC that initializes data rates for all devices to 11
>> Mbs. Now that many of
>> the devices will actually run at higher rates, this patch fixes that bug.
>>
>> As not all chips will run at speeds above 11 Mbs, I will not be sending this
>> patch upstream to
>> Linville, but I wanted it available for the users. As you see, I'm setting a
>> rate of 24 Mbs. If your
>> card works at 36, please change that line.
>
> Hm, may I suggest the appended patch instead? ;-)
>
> Rafael
>
>
> Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
> ---
> net/ieee80211/softmac/ieee80211softmac_module.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> Index: linux-2.6.20/net/ieee80211/softmac/ieee80211softmac_module.c
> ===================================================================
> --- linux-2.6.20.orig/net/ieee80211/softmac/ieee80211softmac_module.c
> +++ linux-2.6.20/net/ieee80211/softmac/ieee80211softmac_module.c
> @@ -270,12 +270,13 @@ void ieee80211softmac_init_bss(struct ie
> can manually change it if they really need to, but 11M is
> more reliable. Note similar logic in
> ieee80211softmac_wx_set_rate() */
> - if (ieee->modulation & IEEE80211_CCK_MODULATION) {
> + if (ieee->modulation & IEEE80211_OFDM_MODULATION) {
> + txrates->user_rate = IEEE80211_OFDM_RATE_24MB;
> + } else if (ieee->modulation & IEEE80211_CCK_MODULATION) {
> txrates->user_rate = IEEE80211_CCK_RATE_11MB;
> - } else if (ieee->modulation & IEEE80211_OFDM_MODULATION) {
> - txrates->user_rate = IEEE80211_OFDM_RATE_54MB;
> - } else
> + } else {
> assert(0);
> + }
>
> txrates->default_rate = IEEE80211_CCK_RATE_1MB;
> change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT;
Your patch fixes the stupid mistake I had in the first version and is fine;
however, after I looked
at the code a bit more, I decided to remove the assert(0). It is only there to
make sure that the
driver set up ieee->modulation correctly. As it is unlikely that there will be
any new drivers using
SoftMAC, that statement can go.
Larry
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev