Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d755cbc2 authored by Kalle Valo's avatar Kalle Valo
Browse files

Merge tag 'iwlwifi-for-kalle-2017-07-21' of...

Merge tag 'iwlwifi-for-kalle-2017-07-21' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes

Some iwlwifi fixes for 4.13:

* A few NULL pointer dereferences in the recovery flow;
* A small but important fix for IBSS;
* A one-liner fix for tracing, which was including too much data;
* Some of these are bugzilla bug fixes;
parents 271612d7 bf8b286f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1189,11 +1189,11 @@ void iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb)
				next_reclaimed;
				next_reclaimed;
			IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n",
			IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n",
						  next_reclaimed);
						  next_reclaimed);
			iwlagn_check_ratid_empty(priv, sta_id, tid);
		}
		}


		iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs);
		iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs);


		iwlagn_check_ratid_empty(priv, sta_id, tid);
		freed = 0;
		freed = 0;


		/* process frames */
		/* process frames */
+2 −2
Original line number Original line Diff line number Diff line
@@ -55,8 +55,8 @@ static inline bool iwl_trace_data(struct sk_buff *skb)
	/* also account for the RFC 1042 header, of course */
	/* also account for the RFC 1042 header, of course */
	offs += 6;
	offs += 6;


	return skb->len > offs + 2 &&
	return skb->len <= offs + 2 ||
	       *(__be16 *)(skb->data + offs) == cpu_to_be16(ETH_P_PAE);
		*(__be16 *)(skb->data + offs) != cpu_to_be16(ETH_P_PAE);
}
}


static inline size_t iwl_rx_trace_len(const struct iwl_trans *trans,
static inline size_t iwl_rx_trace_len(const struct iwl_trans *trans,
+7 −1
Original line number Original line Diff line number Diff line
@@ -1084,7 +1084,13 @@ int __iwl_mvm_mac_start(struct iwl_mvm *mvm)


	lockdep_assert_held(&mvm->mutex);
	lockdep_assert_held(&mvm->mutex);


	if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) {
	if (test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status)) {
		/*
		 * Now convert the HW_RESTART_REQUESTED flag to IN_HW_RESTART
		 * so later code will - from now on - see that we're doing it.
		 */
		set_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status);
		clear_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status);
		/* Clean up some internal and mac80211 state on restart */
		/* Clean up some internal and mac80211 state on restart */
		iwl_mvm_restart_cleanup(mvm);
		iwl_mvm_restart_cleanup(mvm);
	} else {
	} else {
+2 −0
Original line number Original line Diff line number Diff line
@@ -1090,6 +1090,7 @@ struct iwl_mvm {
 * @IWL_MVM_STATUS_HW_RFKILL: HW RF-kill is asserted
 * @IWL_MVM_STATUS_HW_RFKILL: HW RF-kill is asserted
 * @IWL_MVM_STATUS_HW_CTKILL: CT-kill is active
 * @IWL_MVM_STATUS_HW_CTKILL: CT-kill is active
 * @IWL_MVM_STATUS_ROC_RUNNING: remain-on-channel is running
 * @IWL_MVM_STATUS_ROC_RUNNING: remain-on-channel is running
 * @IWL_MVM_STATUS_HW_RESTART_REQUESTED: HW restart was requested
 * @IWL_MVM_STATUS_IN_HW_RESTART: HW restart is active
 * @IWL_MVM_STATUS_IN_HW_RESTART: HW restart is active
 * @IWL_MVM_STATUS_IN_D0I3: NIC is in D0i3
 * @IWL_MVM_STATUS_IN_D0I3: NIC is in D0i3
 * @IWL_MVM_STATUS_ROC_AUX_RUNNING: AUX remain-on-channel is running
 * @IWL_MVM_STATUS_ROC_AUX_RUNNING: AUX remain-on-channel is running
@@ -1101,6 +1102,7 @@ enum iwl_mvm_status {
	IWL_MVM_STATUS_HW_RFKILL,
	IWL_MVM_STATUS_HW_RFKILL,
	IWL_MVM_STATUS_HW_CTKILL,
	IWL_MVM_STATUS_HW_CTKILL,
	IWL_MVM_STATUS_ROC_RUNNING,
	IWL_MVM_STATUS_ROC_RUNNING,
	IWL_MVM_STATUS_HW_RESTART_REQUESTED,
	IWL_MVM_STATUS_IN_HW_RESTART,
	IWL_MVM_STATUS_IN_HW_RESTART,
	IWL_MVM_STATUS_IN_D0I3,
	IWL_MVM_STATUS_IN_D0I3,
	IWL_MVM_STATUS_ROC_AUX_RUNNING,
	IWL_MVM_STATUS_ROC_AUX_RUNNING,
+3 −3
Original line number Original line Diff line number Diff line
@@ -1236,8 +1236,7 @@ void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error)
	if (!mvm->fw_restart && fw_error) {
	if (!mvm->fw_restart && fw_error) {
		iwl_mvm_fw_dbg_collect_desc(mvm, &iwl_mvm_dump_desc_assert,
		iwl_mvm_fw_dbg_collect_desc(mvm, &iwl_mvm_dump_desc_assert,
					NULL);
					NULL);
	} else if (test_and_set_bit(IWL_MVM_STATUS_IN_HW_RESTART,
	} else if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) {
				    &mvm->status)) {
		struct iwl_mvm_reprobe *reprobe;
		struct iwl_mvm_reprobe *reprobe;


		IWL_ERR(mvm,
		IWL_ERR(mvm,
@@ -1268,6 +1267,7 @@ void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error)


		if (fw_error && mvm->fw_restart > 0)
		if (fw_error && mvm->fw_restart > 0)
			mvm->fw_restart--;
			mvm->fw_restart--;
		set_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status);
		ieee80211_restart_hw(mvm->hw);
		ieee80211_restart_hw(mvm->hw);
	}
	}
}
}
Loading