summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-07-12 13:40:02 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-07-15 11:43:21 +0200
commit64f4b93afaf18f471724268bbb2d43262a9e0334 (patch)
tree396d6181744580bfb16675f09480e66bdcb561e2 /net
parentb048c98447fde83de9f9a2b0974aa1ffd931d012 (diff)
downloadlinux-64f4b93afaf18f471724268bbb2d43262a9e0334.tar.bz2
wifi: mac80211: mlme: clean up supported channels element code
Clean up the code building the supported channels element a little bit by using a local variable instead of the long line. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mlme.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 3cb1f091f17e..b55d10464b7d 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1078,8 +1078,9 @@ static int ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
*pos++ = WLAN_EID_SUPPORTED_CHANNELS;
*pos++ = 2 * sband->n_channels;
for (i = 0; i < sband->n_channels; i++) {
- *pos++ = ieee80211_frequency_to_channel(
- sband->channels[i].center_freq);
+ int cf = sband->channels[i].center_freq;
+
+ *pos++ = ieee80211_frequency_to_channel(cf);
*pos++ = 1; /* one channel in the subband*/
}
}