@@ -7675,6 +7675,7 @@ ieee80211_send_neg_ttlm_res(struct ieee80211_sub_if_data *sdata,
7675
7675
int hdr_len = offsetofend (struct ieee80211_mgmt , u .action .u .ttlm_res );
7676
7676
int ttlm_max_len = 2 + 1 + sizeof (struct ieee80211_ttlm_elem ) + 1 +
7677
7677
2 * 2 * IEEE80211_TTLM_NUM_TIDS ;
7678
+ u16 status_code ;
7678
7679
7679
7680
skb = dev_alloc_skb (local -> tx_headroom + hdr_len + ttlm_max_len );
7680
7681
if (!skb )
@@ -7697,19 +7698,18 @@ ieee80211_send_neg_ttlm_res(struct ieee80211_sub_if_data *sdata,
7697
7698
WARN_ON (1 );
7698
7699
fallthrough ;
7699
7700
case NEG_TTLM_RES_REJECT :
7700
- mgmt -> u .action .u .ttlm_res .status_code =
7701
- WLAN_STATUS_DENIED_TID_TO_LINK_MAPPING ;
7701
+ status_code = WLAN_STATUS_DENIED_TID_TO_LINK_MAPPING ;
7702
7702
break ;
7703
7703
case NEG_TTLM_RES_ACCEPT :
7704
- mgmt -> u . action . u . ttlm_res . status_code = WLAN_STATUS_SUCCESS ;
7704
+ status_code = WLAN_STATUS_SUCCESS ;
7705
7705
break ;
7706
7706
case NEG_TTLM_RES_SUGGEST_PREFERRED :
7707
- mgmt -> u .action .u .ttlm_res .status_code =
7708
- WLAN_STATUS_PREF_TID_TO_LINK_MAPPING_SUGGESTED ;
7707
+ status_code = WLAN_STATUS_PREF_TID_TO_LINK_MAPPING_SUGGESTED ;
7709
7708
ieee80211_neg_ttlm_add_suggested_map (skb , neg_ttlm );
7710
7709
break ;
7711
7710
}
7712
7711
7712
+ mgmt -> u .action .u .ttlm_res .status_code = cpu_to_le16 (status_code );
7713
7713
ieee80211_tx_skb (sdata , skb );
7714
7714
}
7715
7715
@@ -7875,7 +7875,7 @@ void ieee80211_process_neg_ttlm_res(struct ieee80211_sub_if_data *sdata,
7875
7875
* This can be better implemented in the future, to handle request
7876
7876
* rejections.
7877
7877
*/
7878
- if (mgmt -> u .action .u .ttlm_res .status_code != WLAN_STATUS_SUCCESS )
7878
+ if (le16_to_cpu ( mgmt -> u .action .u .ttlm_res .status_code ) != WLAN_STATUS_SUCCESS )
7879
7879
__ieee80211_disconnect (sdata );
7880
7880
}
7881
7881
0 commit comments