summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mvm.h
diff options
context:
space:
mode:
authorIlan Peer2013-03-21 09:23:52 +0100
committerJohannes Berg2013-05-13 18:15:18 +0200
commitfe0f2de30cc3417794517afe45f57e851b3188ae (patch)
treeedea6958b2345e6fdc681cf9a867c72980d7fa78 /drivers/net/wireless/iwlwifi/mvm/mvm.h
parentiwlwifi: pcie: prefer to load the firmware in one shot (diff)
downloadkernel-qcow2-linux-fe0f2de30cc3417794517afe45f57e851b3188ae.tar.gz
kernel-qcow2-linux-fe0f2de30cc3417794517afe45f57e851b3188ae.tar.xz
kernel-qcow2-linux-fe0f2de30cc3417794517afe45f57e851b3188ae.zip
iwlwifi: mvm: Loosen the channel context/phy context coupling
In current implementation, the phy context is tightly coupled with the channel context. This complicates the possibility of using the same phy context for both netdev interfaces and the P2P Device interface. To loosen this coupling: 1. Manage all the phy contexts in the mvm op mode, and only save the phy context id in the chanctx memory. 2. Reference count the phy contexts and free them only when they are not longer used (both by mac80211 and P2P Device). Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mvm.h')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mvm.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h
index 4fc64d50dc50..3505fcafde66 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
@@ -109,6 +109,7 @@ extern struct iwl_mvm_mod_params iwlmvm_mod_params;
struct iwl_mvm_phy_ctxt {
u16 id;
u16 color;
+ u32 ref;
/*
* TODO: This should probably be removed. Currently here only for rate
@@ -318,7 +319,7 @@ struct iwl_mvm {
bool prevent_power_down_d3;
#endif
- struct iwl_mvm_phy_ctxt phy_ctxt_roc;
+ struct iwl_mvm_phy_ctxt phy_ctxts[NUM_PHY_CTX];
struct list_head time_event_list;
spinlock_t time_event_lock;
@@ -448,8 +449,10 @@ int iwl_mvm_phy_ctxt_add(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt,
int iwl_mvm_phy_ctxt_changed(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt,
struct cfg80211_chan_def *chandef,
u8 chains_static, u8 chains_dynamic);
-void iwl_mvm_phy_ctxt_remove(struct iwl_mvm *mvm,
- struct iwl_mvm_phy_ctxt *ctxt);
+void iwl_mvm_phy_ctxt_ref(struct iwl_mvm *mvm,
+ struct iwl_mvm_phy_ctxt *ctxt);
+void iwl_mvm_phy_ctxt_unref(struct iwl_mvm *mvm,
+ struct iwl_mvm_phy_ctxt *ctxt);
/* MAC (virtual interface) programming */
int iwl_mvm_mac_ctxt_init(struct iwl_mvm *mvm, struct ieee80211_vif *vif);