iwlwifi: mvm: use iwl_mvm_vif_from_mac80211() consistently
authorJohannes Berg <johannes.berg@intel.com>
Tue, 23 Dec 2014 15:00:17 +0000 (16:00 +0100)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 28 Dec 2014 18:04:00 +0000 (20:04 +0200)
There are a few places not using it, use it at those places.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/coex.c
drivers/net/wireless/iwlwifi/mvm/coex_legacy.c
drivers/net/wireless/iwlwifi/mvm/sta.c

index a3bfda45d9e6a28bdd44e2000498456988ef6558..d2fd48c31d3d77ad0eb4d5f6aebc7bd733dda7f6 100644 (file)
@@ -989,7 +989,7 @@ int iwl_mvm_rx_bt_coex_notif(struct iwl_mvm *mvm,
 static void iwl_mvm_bt_rssi_iterator(void *_data, u8 *mac,
                                   struct ieee80211_vif *vif)
 {
-       struct iwl_mvm_vif *mvmvif = (void *)vif->drv_priv;
+       struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
        struct iwl_bt_iterator_data *data = _data;
        struct iwl_mvm *mvm = data->mvm;
 
@@ -1025,7 +1025,7 @@ static void iwl_mvm_bt_rssi_iterator(void *_data, u8 *mac,
 void iwl_mvm_bt_rssi_event(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                           enum ieee80211_rssi_event rssi_event)
 {
-       struct iwl_mvm_vif *mvmvif = (void *)vif->drv_priv;
+       struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
        struct iwl_bt_iterator_data data = {
                .mvm = mvm,
        };
index b3210cfbecc8e4f68254361efca6b815a05f12e6..973f2881dd1d17747345c1775dff786a9d924531 100644 (file)
@@ -1034,7 +1034,7 @@ int iwl_mvm_rx_bt_coex_notif_old(struct iwl_mvm *mvm,
 static void iwl_mvm_bt_rssi_iterator(void *_data, u8 *mac,
                                     struct ieee80211_vif *vif)
 {
-       struct iwl_mvm_vif *mvmvif = (void *)vif->drv_priv;
+       struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
        struct iwl_bt_iterator_data *data = _data;
        struct iwl_mvm *mvm = data->mvm;
 
@@ -1070,7 +1070,7 @@ static void iwl_mvm_bt_rssi_iterator(void *_data, u8 *mac,
 void iwl_mvm_bt_rssi_event_old(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                               enum ieee80211_rssi_event rssi_event)
 {
-       struct iwl_mvm_vif *mvmvif = (void *)vif->drv_priv;
+       struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
        struct iwl_bt_iterator_data data = {
                .mvm = mvm,
        };
index d86fe432e51f17ce0d4f7ce8897fffd3fbace3f6..9eaa96ec6bad5ed2a3007b0e11dc671dbb8aa99c 100644 (file)
@@ -1144,7 +1144,7 @@ static int iwl_mvm_set_fw_key_idx(struct iwl_mvm *mvm)
 static u8 iwl_mvm_get_key_sta_id(struct ieee80211_vif *vif,
                                 struct ieee80211_sta *sta)
 {
-       struct iwl_mvm_vif *mvmvif = (void *)vif->drv_priv;
+       struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
 
        if (sta) {
                struct iwl_mvm_sta *mvm_sta = (void *)sta->drv_priv;
@@ -1280,7 +1280,7 @@ static inline u8 *iwl_mvm_get_mac_addr(struct iwl_mvm *mvm,
                                       struct ieee80211_vif *vif,
                                       struct ieee80211_sta *sta)
 {
-       struct iwl_mvm_vif *mvmvif = (void *)vif->drv_priv;
+       struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
 
        if (sta)
                return sta->addr;