Search Linux Wireless

Re: [ath5k-devel] [PATCH 5/5] ath5k: Update reset code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/2/3 Bob Copeland <me@xxxxxxxxxxxxxxx>:
> On Sat, 31 Jan 2009 04:31:47 +0200, Nick Kossifidis wrote
>>  int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
>>       struct ieee80211_channel *channel, bool change_channel)
>
> Here's another thing I just noticed:
>
>>  {
>> +     u32 s_seq[10], s_ant, s_led[3], staid1_flags, tsf_up, tsf_lo;
>
> s_seq is now an array (we used to initialize s_seq to 0)
>
> [...]
>> +             if (change_channel) {
>> +                     /*
>> +                      * Save frame sequence count
>> +                      * For revs. after Oahu, only save
>> +                      * seq num for DCU 0 (Global seq num)
>> +                      */
>> +                     if (ah->ah_mac_srev < AR5K_SREV_AR5211) {
>> +
>> +                             for (i = 0; i < 10; i++)
>> +                                     s_seq[i] = ath5k_hw_reg_read(ah,
>> +                                             AR5K_QUEUE_DCU_SEQNUM(i));
>> +
>> +                     } else {
>> +                             s_seq[0] = ath5k_hw_reg_read(ah,
>> +                                             AR5K_QUEUE_DCU_SEQNUM(0));
>> +                     }
>
> We only save the DCU sequence values if changing a channel
>
> [...]
>
>>       if (ah->ah_version != AR5K_AR5210) {
>> -             ath5k_hw_reg_write(ah, s_seq, AR5K_QUEUE_DFS_SEQNUM(0));
>> +
>> +             if (ah->ah_mac_srev < AR5K_SREV_AR5211) {
>> +                     for (i = 0; i < 10; i++)
>> +                             ath5k_hw_reg_write(ah, s_seq[i],
>> +                                     AR5K_QUEUE_DCU_SEQNUM(i));
>> +             } else {
>> +                     ath5k_hw_reg_write(ah, s_seq[0],
>> +                             AR5K_QUEUE_DCU_SEQNUM(0));
>> +             }
>
> But always write it.  The old code did this too, the only difference
> was we explicitly initialized the s_seq[0] to 0.  Since it's an array,
> gcc won't warn about it but s_seq[] probably has random crap in it.
>

Nice catch ;-)

Another difference i remembered is that we now don't set the TPC
register to 3f (until we fix the whole tx power stuff). I'll try to
reproduce this with my ar2425 as it turns it also has problems.


-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux