Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ath9k_common: get rid of an unnecessary variable

There's no need to truncate curchan->hw_value to u8

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Felix Fietkau and committed by
John W. Linville
f40c4608 c8aa5ab7

+1 -3
+1 -3
drivers/net/wireless/ath/ath9k/common.c
··· 98 98 { 99 99 struct ieee80211_channel *curchan = chandef->chan; 100 100 struct ath9k_channel *channel; 101 - u8 chan_idx; 102 101 103 - chan_idx = curchan->hw_value; 104 - channel = &ah->channels[chan_idx]; 102 + channel = &ah->channels[curchan->hw_value]; 105 103 ath9k_cmn_update_ichannel(channel, chandef); 106 104 107 105 return channel;