提交 f40c4608 编写于 作者: F Felix Fietkau 提交者: John W. Linville

ath9k_common: get rid of an unnecessary variable

There's no need to truncate curchan->hw_value to u8
Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 c8aa5ab7
...@@ -98,10 +98,8 @@ struct ath9k_channel *ath9k_cmn_get_channel(struct ieee80211_hw *hw, ...@@ -98,10 +98,8 @@ struct ath9k_channel *ath9k_cmn_get_channel(struct ieee80211_hw *hw,
{ {
struct ieee80211_channel *curchan = chandef->chan; struct ieee80211_channel *curchan = chandef->chan;
struct ath9k_channel *channel; struct ath9k_channel *channel;
u8 chan_idx;
chan_idx = curchan->hw_value; channel = &ah->channels[curchan->hw_value];
channel = &ah->channels[chan_idx];
ath9k_cmn_update_ichannel(channel, chandef); ath9k_cmn_update_ichannel(channel, chandef);
return channel; return channel;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册