@@ -7177,6 +7177,7 @@ ieee80211_send_neg_ttlm_res(struct ieee80211_sub_if_data *sdata,
7177
7177
int hdr_len = offsetofend (struct ieee80211_mgmt , u .action .u .ttlm_res );
7178
7178
int ttlm_max_len = 2 + 1 + sizeof (struct ieee80211_ttlm_elem ) + 1 +
7179
7179
2 * 2 * IEEE80211_TTLM_NUM_TIDS ;
7180
+ u16 status_code ;
7180
7181
7181
7182
skb = dev_alloc_skb (local -> tx_headroom + hdr_len + ttlm_max_len );
7182
7183
if (!skb )
@@ -7199,19 +7200,18 @@ ieee80211_send_neg_ttlm_res(struct ieee80211_sub_if_data *sdata,
7199
7200
WARN_ON (1 );
7200
7201
fallthrough ;
7201
7202
case NEG_TTLM_RES_REJECT :
7202
- mgmt -> u .action .u .ttlm_res .status_code =
7203
- WLAN_STATUS_DENIED_TID_TO_LINK_MAPPING ;
7203
+ status_code = WLAN_STATUS_DENIED_TID_TO_LINK_MAPPING ;
7204
7204
break ;
7205
7205
case NEG_TTLM_RES_ACCEPT :
7206
- mgmt -> u . action . u . ttlm_res . status_code = WLAN_STATUS_SUCCESS ;
7206
+ status_code = WLAN_STATUS_SUCCESS ;
7207
7207
break ;
7208
7208
case NEG_TTLM_RES_SUGGEST_PREFERRED :
7209
- mgmt -> u .action .u .ttlm_res .status_code =
7210
- WLAN_STATUS_PREF_TID_TO_LINK_MAPPING_SUGGESTED ;
7209
+ status_code = WLAN_STATUS_PREF_TID_TO_LINK_MAPPING_SUGGESTED ;
7211
7210
ieee80211_neg_ttlm_add_suggested_map (skb , neg_ttlm );
7212
7211
break ;
7213
7212
}
7214
7213
7214
+ mgmt -> u .action .u .ttlm_res .status_code = cpu_to_le16 (status_code );
7215
7215
ieee80211_tx_skb (sdata , skb );
7216
7216
}
7217
7217
@@ -7377,7 +7377,7 @@ void ieee80211_process_neg_ttlm_res(struct ieee80211_sub_if_data *sdata,
7377
7377
* This can be better implemented in the future, to handle request
7378
7378
* rejections.
7379
7379
*/
7380
- if (mgmt -> u .action .u .ttlm_res .status_code != WLAN_STATUS_SUCCESS )
7380
+ if (le16_to_cpu ( mgmt -> u .action .u .ttlm_res .status_code ) != WLAN_STATUS_SUCCESS )
7381
7381
__ieee80211_disconnect (sdata );
7382
7382
}
7383
7383
0 commit comments