aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorShahar S Matityahu <shahar.s.matityahu@intel.com>2018-06-12 08:40:42 -0400
committerLuca Coelho <luciano.coelho@intel.com>2018-10-06 03:25:52 -0400
commitd3f4b6debcc04b601d23b0f9a93f10cb97f68068 (patch)
treea9cee72970727fcb41726fba3fefadf21b9c8be2 /drivers/net/wireless
parenta19f015dea6053f9c5a55bc42da90bc5b28c4272 (diff)
iwlwifi: runtime: add send host command op to firmware runtime op struct
Add send host command op to firmware runtime op struct to allow sending host commands to the op mode from the fw runtime context. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/runtime.h1
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/ops.c13
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/runtime.h b/drivers/net/wireless/intel/iwlwifi/fw/runtime.h
index ac6db5e2b3d0..6b95d0e75889 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/runtime.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/runtime.h
@@ -71,6 +71,7 @@ struct iwl_fw_runtime_ops {
71 int (*dump_start)(void *ctx); 71 int (*dump_start)(void *ctx);
72 void (*dump_end)(void *ctx); 72 void (*dump_end)(void *ctx);
73 bool (*fw_running)(void *ctx); 73 bool (*fw_running)(void *ctx);
74 int (*send_hcmd)(void *ctx, struct iwl_host_cmd *host_cmd);
74}; 75};
75 76
76#define MAX_NUM_LMAC 2 77#define MAX_NUM_LMAC 2
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index c388e0e758e7..3acf512bad47 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -565,10 +565,23 @@ static bool iwl_mvm_fwrt_fw_running(void *ctx)
565 return iwl_mvm_firmware_running(ctx); 565 return iwl_mvm_firmware_running(ctx);
566} 566}
567 567
568static int iwl_mvm_fwrt_send_hcmd(void *ctx, struct iwl_host_cmd *host_cmd)
569{
570 struct iwl_mvm *mvm = (struct iwl_mvm *)ctx;
571 int ret;
572
573 mutex_lock(&mvm->mutex);
574 ret = iwl_mvm_send_cmd(mvm, host_cmd);
575 mutex_unlock(&mvm->mutex);
576
577 return ret;
578}
579
568static const struct iwl_fw_runtime_ops iwl_mvm_fwrt_ops = { 580static const struct iwl_fw_runtime_ops iwl_mvm_fwrt_ops = {
569 .dump_start = iwl_mvm_fwrt_dump_start, 581 .dump_start = iwl_mvm_fwrt_dump_start,
570 .dump_end = iwl_mvm_fwrt_dump_end, 582 .dump_end = iwl_mvm_fwrt_dump_end,
571 .fw_running = iwl_mvm_fwrt_fw_running, 583 .fw_running = iwl_mvm_fwrt_fw_running,
584 .send_hcmd = iwl_mvm_fwrt_send_hcmd,
572}; 585};
573 586
574static struct iwl_op_mode * 587static struct iwl_op_mode *