aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/mesh.c5
-rw-r--r--net/mac80211/util.c4
2 files changed, 2 insertions, 7 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();
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,
2450 2450
2451 if (ieee80211_vif_is_mesh(&sdata->vif)) { 2451 if (ieee80211_vif_is_mesh(&sdata->vif)) {
2452 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; 2452 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
2453 __le16 pre_value;
2454 2453
2455 skb_put(skb, 8); 2454 skb_put(skb, 8);
2456 *pos++ = WLAN_EID_CHAN_SWITCH_PARAM; /* EID */ 2455 *pos++ = WLAN_EID_CHAN_SWITCH_PARAM; /* EID */
@@ -2466,8 +2465,7 @@ int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata,
2466 ifmsh->pre_value = 1; 2465 ifmsh->pre_value = 1;
2467 else 2466 else
2468 ifmsh->pre_value++; 2467 ifmsh->pre_value++;
2469 pre_value = cpu_to_le16(ifmsh->pre_value); 2468 put_unaligned_le16(ifmsh->pre_value, pos);/* Precedence Value */
2470 memcpy(pos, &pre_value, 2); /* Precedence Value */
2471 pos += 2; 2469 pos += 2;
2472 ifmsh->chsw_init = true; 2470 ifmsh->chsw_init = true;
2473 } 2471 }