wifi: ath9k: use u32 for txgain indexes
Since both 'ar9550_hw_get_modes_txgain_index()' and 'ar9561_hw_get_modes_txgain_index()' never returns negative values, prefer 'u32' over 'int' and adjust 'ar9003_hw_process_ini()' accordingly. Suggested-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230823182401.196270-2-dmantipov@yandex.ru
This commit is contained in:
parent
e6a1107bf5
commit
352281e4a0
|
@ -766,10 +766,10 @@ static void ar9003_hw_prog_ini(struct ath_hw *ah,
|
|||
}
|
||||
}
|
||||
|
||||
static int ar9550_hw_get_modes_txgain_index(struct ath_hw *ah,
|
||||
static u32 ar9550_hw_get_modes_txgain_index(struct ath_hw *ah,
|
||||
struct ath9k_channel *chan)
|
||||
{
|
||||
int ret;
|
||||
u32 ret;
|
||||
|
||||
if (IS_CHAN_2GHZ(chan)) {
|
||||
if (IS_CHAN_HT40(chan))
|
||||
|
@ -791,7 +791,7 @@ static int ar9550_hw_get_modes_txgain_index(struct ath_hw *ah,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int ar9561_hw_get_modes_txgain_index(struct ath_hw *ah,
|
||||
static u32 ar9561_hw_get_modes_txgain_index(struct ath_hw *ah,
|
||||
struct ath9k_channel *chan)
|
||||
{
|
||||
if (IS_CHAN_2GHZ(chan)) {
|
||||
|
@ -916,7 +916,7 @@ static int ar9003_hw_process_ini(struct ath_hw *ah,
|
|||
* TXGAIN initvals.
|
||||
*/
|
||||
if (AR_SREV_9550(ah) || AR_SREV_9531(ah) || AR_SREV_9561(ah)) {
|
||||
int modes_txgain_index = 1;
|
||||
u32 modes_txgain_index = 1;
|
||||
|
||||
if (AR_SREV_9550(ah))
|
||||
modes_txgain_index = ar9550_hw_get_modes_txgain_index(ah, chan);
|
||||
|
|
Loading…
Reference in New Issue