diff options
author | Chun-Yeow Yeoh <yeohchunyeow@gmail.com> | 2013-11-12 06:31:48 +0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-11-25 23:51:43 +0400 |
commit | ca91dc97b8a0ffd05721806654eaff2cf13ba5cb (patch) | |
tree | e1bde787c7f3d8afd553bf774eebb8e6ebf0d9b8 /net/mac80211/util.c | |
parent | 3751c4edc6275e345d5978b1cb92265945399f69 (diff) | |
download | linux-ca91dc97b8a0ffd05721806654eaff2cf13ba5cb.tar.xz |
mac80211: use put_unaligned_le16 for precedence value in mesh
use put_unaligned_le16 for precedence value in mesh
channel switch support
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 5dfa41abdf8b..bb92f8e0f84e 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -2450,7 +2450,6 @@ int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata, if (ieee80211_vif_is_mesh(&sdata->vif)) { struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; - __le16 pre_value; skb_put(skb, 8); *pos++ = WLAN_EID_CHAN_SWITCH_PARAM; /* EID */ @@ -2466,8 +2465,7 @@ int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata, ifmsh->pre_value = 1; else ifmsh->pre_value++; - pre_value = cpu_to_le16(ifmsh->pre_value); - memcpy(pos, &pre_value, 2); /* Precedence Value */ + put_unaligned_le16(ifmsh->pre_value, pos);/* Precedence Value */ pos += 2; ifmsh->chsw_init = true; } |