aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_plink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mesh_plink.c')
-rw-r--r--net/mac80211/mesh_plink.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index c47194d27149..b488e1859b18 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -431,14 +431,12 @@ __mesh_sta_info_alloc(struct ieee80211_sub_if_data *sdata, u8 *hw_addr)
431 return NULL; 431 return NULL;
432 432
433 sta->plink_state = NL80211_PLINK_LISTEN; 433 sta->plink_state = NL80211_PLINK_LISTEN;
434 sta->sta.wme = true;
434 435
435 sta_info_pre_move_state(sta, IEEE80211_STA_AUTH); 436 sta_info_pre_move_state(sta, IEEE80211_STA_AUTH);
436 sta_info_pre_move_state(sta, IEEE80211_STA_ASSOC); 437 sta_info_pre_move_state(sta, IEEE80211_STA_ASSOC);
437 sta_info_pre_move_state(sta, IEEE80211_STA_AUTHORIZED); 438 sta_info_pre_move_state(sta, IEEE80211_STA_AUTHORIZED);
438 439
439 set_sta_flag(sta, WLAN_STA_WME);
440 sta->sta.wme = true;
441
442 return sta; 440 return sta;
443} 441}
444 442
@@ -1004,7 +1002,6 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata,
1004 enum ieee80211_self_protected_actioncode ftype; 1002 enum ieee80211_self_protected_actioncode ftype;
1005 u32 changed = 0; 1003 u32 changed = 0;
1006 u8 ie_len = elems->peering_len; 1004 u8 ie_len = elems->peering_len;
1007 __le16 _plid, _llid;
1008 u16 plid, llid = 0; 1005 u16 plid, llid = 0;
1009 1006
1010 if (!elems->peering) { 1007 if (!elems->peering) {
@@ -1039,13 +1036,10 @@ mesh_process_plink_frame(struct ieee80211_sub_if_data *sdata,
1039 /* Note the lines below are correct, the llid in the frame is the plid 1036 /* Note the lines below are correct, the llid in the frame is the plid
1040 * from the point of view of this host. 1037 * from the point of view of this host.
1041 */ 1038 */
1042 memcpy(&_plid, PLINK_GET_LLID(elems->peering), sizeof(__le16)); 1039 plid = get_unaligned_le16(PLINK_GET_LLID(elems->peering));
1043 plid = le16_to_cpu(_plid);
1044 if (ftype == WLAN_SP_MESH_PEERING_CONFIRM || 1040 if (ftype == WLAN_SP_MESH_PEERING_CONFIRM ||
1045 (ftype == WLAN_SP_MESH_PEERING_CLOSE && ie_len == 8)) { 1041 (ftype == WLAN_SP_MESH_PEERING_CLOSE && ie_len == 8))
1046 memcpy(&_llid, PLINK_GET_PLID(elems->peering), sizeof(__le16)); 1042 llid = get_unaligned_le16(PLINK_GET_PLID(elems->peering));
1047 llid = le16_to_cpu(_llid);
1048 }
1049 1043
1050 /* WARNING: Only for sta pointer, is dropped & re-acquired */ 1044 /* WARNING: Only for sta pointer, is dropped & re-acquired */
1051 rcu_read_lock(); 1045 rcu_read_lock();