diff options
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index 66957ac12ca4..95b2ec1517e5 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c | |||
@@ -459,7 +459,6 @@ iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb, | |||
459 | struct ieee80211_sta *sta, u8 sta_id) | 459 | struct ieee80211_sta *sta, u8 sta_id) |
460 | { | 460 | { |
461 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | 461 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
462 | struct ieee80211_tx_info *skb_info = IEEE80211_SKB_CB(skb); | ||
463 | struct iwl_device_cmd *dev_cmd; | 462 | struct iwl_device_cmd *dev_cmd; |
464 | struct iwl_tx_cmd *tx_cmd; | 463 | struct iwl_tx_cmd *tx_cmd; |
465 | 464 | ||
@@ -479,12 +478,18 @@ iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb, | |||
479 | 478 | ||
480 | iwl_mvm_set_tx_cmd_rate(mvm, tx_cmd, info, sta, hdr->frame_control); | 479 | iwl_mvm_set_tx_cmd_rate(mvm, tx_cmd, info, sta, hdr->frame_control); |
481 | 480 | ||
481 | return dev_cmd; | ||
482 | } | ||
483 | |||
484 | static void iwl_mvm_skb_prepare_status(struct sk_buff *skb, | ||
485 | struct iwl_device_cmd *cmd) | ||
486 | { | ||
487 | struct ieee80211_tx_info *skb_info = IEEE80211_SKB_CB(skb); | ||
488 | |||
482 | memset(&skb_info->status, 0, sizeof(skb_info->status)); | 489 | memset(&skb_info->status, 0, sizeof(skb_info->status)); |
483 | memset(skb_info->driver_data, 0, sizeof(skb_info->driver_data)); | 490 | memset(skb_info->driver_data, 0, sizeof(skb_info->driver_data)); |
484 | 491 | ||
485 | skb_info->driver_data[1] = dev_cmd; | 492 | skb_info->driver_data[1] = cmd; |
486 | |||
487 | return dev_cmd; | ||
488 | } | 493 | } |
489 | 494 | ||
490 | static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm, | 495 | static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm, |
@@ -598,6 +603,9 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb) | |||
598 | if (!dev_cmd) | 603 | if (!dev_cmd) |
599 | return -1; | 604 | return -1; |
600 | 605 | ||
606 | /* From now on, we cannot access info->control */ | ||
607 | iwl_mvm_skb_prepare_status(skb, dev_cmd); | ||
608 | |||
601 | tx_cmd = (struct iwl_tx_cmd *)dev_cmd->payload; | 609 | tx_cmd = (struct iwl_tx_cmd *)dev_cmd->payload; |
602 | 610 | ||
603 | /* Copy MAC header from skb into command buffer */ | 611 | /* Copy MAC header from skb into command buffer */ |
@@ -908,7 +916,6 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb, | |||
908 | goto drop; | 916 | goto drop; |
909 | 917 | ||
910 | tx_cmd = (struct iwl_tx_cmd *)dev_cmd->payload; | 918 | tx_cmd = (struct iwl_tx_cmd *)dev_cmd->payload; |
911 | /* From now on, we cannot access info->control */ | ||
912 | 919 | ||
913 | /* | 920 | /* |
914 | * we handle that entirely ourselves -- for uAPSD the firmware | 921 | * we handle that entirely ourselves -- for uAPSD the firmware |
@@ -1015,6 +1022,9 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb, | |||
1015 | IWL_DEBUG_TX(mvm, "TX to [%d|%d] Q:%d - seq: 0x%x\n", mvmsta->sta_id, | 1022 | IWL_DEBUG_TX(mvm, "TX to [%d|%d] Q:%d - seq: 0x%x\n", mvmsta->sta_id, |
1016 | tid, txq_id, IEEE80211_SEQ_TO_SN(seq_number)); | 1023 | tid, txq_id, IEEE80211_SEQ_TO_SN(seq_number)); |
1017 | 1024 | ||
1025 | /* From now on, we cannot access info->control */ | ||
1026 | iwl_mvm_skb_prepare_status(skb, dev_cmd); | ||
1027 | |||
1018 | if (iwl_trans_tx(mvm->trans, skb, dev_cmd, txq_id)) | 1028 | if (iwl_trans_tx(mvm->trans, skb, dev_cmd, txq_id)) |
1019 | goto drop_unlock_sta; | 1029 | goto drop_unlock_sta; |
1020 | 1030 | ||