diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2012-02-09 18:08:15 +0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2012-02-28 01:26:02 +0400 |
commit | d0f76d6869adad1f3757d102af47508be0642949 (patch) | |
tree | 01c2813ad16f9a425c60162f6664b7195f897214 /drivers/net/wireless/iwlwifi/iwl-drv.c | |
parent | 6459f9871a1218f7a2e6385d1ae6c91e91f9d251 (diff) | |
download | linux-d0f76d6869adad1f3757d102af47508be0642949.tar.xz |
iwlwifi: virtualize the op_mode
Define the op_mode as an interface with its ops. All the functions
of the op_mode are "private", but its ops is made public in
iwl-op-mode.h.
The drv object starts the op_mode by using the start function in the
public ops.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-drv.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-drv.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c index db430c7d27d7..8ff52568cf6e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/iwlwifi/iwl-drv.c @@ -65,6 +65,7 @@ #include "iwl-drv.h" #include "iwl-trans.h" #include "iwl-wifi.h" +#include "iwl-op-mode.h" int iwl_drv_start(struct iwl_shared *shrd, struct iwl_trans *trans, struct iwl_cfg *cfg) @@ -94,8 +95,9 @@ int iwl_drv_start(struct iwl_shared *shrd, void iwl_drv_stop(struct iwl_shared *shrd) { - iwl_op_mode_dvm_stop(shrd->priv); + /* op_mode can be NULL if its start failed */ + if (shrd->nic->op_mode) + iwl_op_mode_stop(shrd->nic->op_mode); kfree(shrd->nic); } - |