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

Commit 36eed56a authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Johannes Berg
Browse files

iwlwifi: mvm: beautify code in rx_handlers



Make the code more readable, and while at it also
add a missing "break" to avoid checking handlers
that cannot be used.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 7a453973
Loading
Loading
Loading
Loading
+22 −19
Original line number Diff line number Diff line
@@ -536,8 +536,11 @@ static int iwl_mvm_rx_dispatch(struct iwl_op_mode *op_mode,

	for (i = 0; i < ARRAY_SIZE(iwl_mvm_rx_handlers); i++) {
		const struct iwl_rx_handlers *rx_h = &iwl_mvm_rx_handlers[i];
		if (rx_h->cmd_id == pkt->hdr.cmd) {
		struct iwl_async_handler_entry *entry;

		if (rx_h->cmd_id != pkt->hdr.cmd)
			continue;

		if (!rx_h->async)
			return rx_h->fn(mvm, rxb, cmd);

@@ -554,7 +557,7 @@ static int iwl_mvm_rx_dispatch(struct iwl_op_mode *op_mode,
		list_add_tail(&entry->list, &mvm->async_handlers_list);
		spin_unlock(&mvm->async_handlers_lock);
		schedule_work(&mvm->async_handlers_wk);
		}
		break;
	}

	return 0;