#306: madwifi-ng + chipset 5211 not setting txpower, but madwifi-old/r1417 works
fine(Can't set txpower by iwconfig command)
------------------------------------+---------------------------------------
      Reporter:  [EMAIL PROTECTED]  |       Owner:  dyqith  
          Type:  defect             |      Status:  assigned
      Priority:  major              |   Milestone:          
     Component:  madwifi: other     |     Version:  trunk   
    Resolution:                     |    Keywords:  txpower 
Patch_attached:  0                  |  
------------------------------------+---------------------------------------
Comment (by [EMAIL PROTECTED]):

 Hi All,
       I think there is a bug in ath_update_txpow() function.
       The way in which the maximum txpower of chip is calculated is wrong.

 /********* original code *******************/
         u_int32_t maxtxpowlimit = 9999;
         u_int32_t clamped_txpow = 0;

         /*
          * Find the maxtxpow of the card and regulatory constraints
          */
         (void)ath_hal_getmaxtxpow(ah, &txpowlimit);
         ath_hal_settxpowlimit(ah, maxtxpowlimit);
         (void)ath_hal_getmaxtxpow(ah, &maxtxpowlimit);
         ic->ic_txpowlimit = maxtxpowlimit;
         ath_hal_settxpowlimit(ah, txpowlimit);
 /********************************************/

 In the above lines of code, a very high value of 9999 is set to
 txpowlimit using ath_hal_settxpowlimit()function.
 The logic is that the hal will put in a sane value instead of 9999.
 but while reading back the values --> ath_hal_getmaxtxpow() is used.

 For .11b mode the hal is returning a very low value for
 ath_hal_getmaxtxpow().

 Replacing ath_hal_getmaxtxpow() with ath_hal_gettxpowlimit() is working
 fine
 for me with ar5312A soc.

 Regards,
 Vinay

-- 
Ticket URL: <http://madwifi.org/ticket/306>
MadWifi <http://madwifi.org/>
Multiband Atheros Driver for Wireless Fidelity
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Madwifi-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/madwifi-tickets

Reply via email to