@@ -7412,6 +7412,7 @@ ieee80211_send_neg_ttlm_res(struct ieee80211_sub_if_data *sdata,
7412
7412
int hdr_len = offsetofend (struct ieee80211_mgmt , u .action .u .ttlm_res );
7413
7413
int ttlm_max_len = 2 + 1 + sizeof (struct ieee80211_ttlm_elem ) + 1 +
7414
7414
2 * 2 * IEEE80211_TTLM_NUM_TIDS ;
7415
+ u16 status_code ;
7415
7416
7416
7417
skb = dev_alloc_skb (local -> tx_headroom + hdr_len + ttlm_max_len );
7417
7418
if (!skb )
@@ -7434,19 +7435,18 @@ ieee80211_send_neg_ttlm_res(struct ieee80211_sub_if_data *sdata,
7434
7435
WARN_ON (1 );
7435
7436
fallthrough ;
7436
7437
case NEG_TTLM_RES_REJECT :
7437
- mgmt -> u .action .u .ttlm_res .status_code =
7438
- WLAN_STATUS_DENIED_TID_TO_LINK_MAPPING ;
7438
+ status_code = WLAN_STATUS_DENIED_TID_TO_LINK_MAPPING ;
7439
7439
break ;
7440
7440
case NEG_TTLM_RES_ACCEPT :
7441
- mgmt -> u . action . u . ttlm_res . status_code = WLAN_STATUS_SUCCESS ;
7441
+ status_code = WLAN_STATUS_SUCCESS ;
7442
7442
break ;
7443
7443
case NEG_TTLM_RES_SUGGEST_PREFERRED :
7444
- mgmt -> u .action .u .ttlm_res .status_code =
7445
- WLAN_STATUS_PREF_TID_TO_LINK_MAPPING_SUGGESTED ;
7444
+ status_code = WLAN_STATUS_PREF_TID_TO_LINK_MAPPING_SUGGESTED ;
7446
7445
ieee80211_neg_ttlm_add_suggested_map (skb , neg_ttlm );
7447
7446
break ;
7448
7447
}
7449
7448
7449
+ mgmt -> u .action .u .ttlm_res .status_code = cpu_to_le16 (status_code );
7450
7450
ieee80211_tx_skb (sdata , skb );
7451
7451
}
7452
7452
@@ -7612,7 +7612,7 @@ void ieee80211_process_neg_ttlm_res(struct ieee80211_sub_if_data *sdata,
7612
7612
* This can be better implemented in the future, to handle request
7613
7613
* rejections.
7614
7614
*/
7615
- if (mgmt -> u .action .u .ttlm_res .status_code != WLAN_STATUS_SUCCESS )
7615
+ if (le16_to_cpu ( mgmt -> u .action .u .ttlm_res .status_code ) != WLAN_STATUS_SUCCESS )
7616
7616
__ieee80211_disconnect (sdata );
7617
7617
}
7618
7618
0 commit comments