diff options
author | Chun-Yeow Yeoh <yeohchunyeow@gmail.com> | 2013-11-11 21:31:48 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-11-25 14:51:43 -0500 |
commit | ca91dc97b8a0ffd05721806654eaff2cf13ba5cb (patch) | |
tree | e1bde787c7f3d8afd553bf774eebb8e6ebf0d9b8 /net/mac80211/mesh.c | |
parent | 3751c4edc6275e345d5978b1cb92265945399f69 (diff) |
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/mesh.c')
-rw-r--r-- | net/mac80211/mesh.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 896fe3bd599e..e0538b920834 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -674,8 +674,6 @@ ieee80211_mesh_build_beacon(struct ieee80211_if_mesh *ifmsh) | |||
674 | rcu_read_lock(); | 674 | rcu_read_lock(); |
675 | csa = rcu_dereference(ifmsh->csa); | 675 | csa = rcu_dereference(ifmsh->csa); |
676 | if (csa) { | 676 | if (csa) { |
677 | __le16 pre_value; | ||
678 | |||
679 | pos = skb_put(skb, 13); | 677 | pos = skb_put(skb, 13); |
680 | memset(pos, 0, 13); | 678 | memset(pos, 0, 13); |
681 | *pos++ = WLAN_EID_CHANNEL_SWITCH; | 679 | *pos++ = WLAN_EID_CHANNEL_SWITCH; |
@@ -697,8 +695,7 @@ ieee80211_mesh_build_beacon(struct ieee80211_if_mesh *ifmsh) | |||
697 | WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT : 0x00; | 695 | WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT : 0x00; |
698 | put_unaligned_le16(WLAN_REASON_MESH_CHAN, pos); | 696 | put_unaligned_le16(WLAN_REASON_MESH_CHAN, pos); |
699 | pos += 2; | 697 | pos += 2; |
700 | pre_value = cpu_to_le16(ifmsh->pre_value); | 698 | put_unaligned_le16(ifmsh->pre_value, pos); |
701 | memcpy(pos, &pre_value, 2); | ||
702 | pos += 2; | 699 | pos += 2; |
703 | } | 700 | } |
704 | rcu_read_unlock(); | 701 | rcu_read_unlock(); |