Search Linux Wireless

Re: [PATCH] rtlwifi: rtl8192se: Fix wrong assignment

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

 



On 10/18/2013 08:05 PM, Joe Perches wrote:
On Fri, 2013-10-18 at 21:52 -0300, Felipe Pena wrote:
There is a typo in the struct member name on assignment when checking
rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40, the check uses pwrgroup_ht40
for bound limit and uses pwrgroup_ht20 when assigning instead.

Signed-off-by: Felipe Pena <felipensp@xxxxxxxxx>
---
  drivers/net/wireless/rtlwifi/rtl8192se/rf.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/rf.c b/drivers/net/wireless/rtlwifi/rtl8192se/rf.c
index 5061f1d..92d38ab 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/rf.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/rf.c
@@ -265,7 +265,7 @@ static void _rtl92s_get_txpower_writeval_byregulatory(struct ieee80211_hw *hw,
  				    rtlefuse->pwrgroup_ht40
  				    [RF90_PATH_A][chnl - 1]) {
  					pwrdiff_limit[i] =
-					  rtlefuse->pwrgroup_ht20
+					  rtlefuse->pwrgroup_ht40
  					  [RF90_PATH_A][chnl - 1];
  				}

Using min could help minimize typos

					pwrdiff_limit[i] = min(pwrdiff_limit[i],
							       rtlefuse->pwrgroup_ht40[RF90_PATH_A][chnl - 1]);

In the initial driver, that would have been true; however, at this point, I prefer the patch as submitted. There is less churning of the source.

Larry


--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux