Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
authorJohn W. Linville <linville@tuxdriver.com>
Mon, 10 Jun 2013 18:51:17 +0000 (14:51 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 10 Jun 2013 18:51:17 +0000 (14:51 -0400)
1  2 
drivers/net/wireless/iwlwifi/mvm/mac80211.c

@@@ -84,15 -84,6 +84,15 @@@ static const struct ieee80211_iface_lim
                .types = BIT(NL80211_IFTYPE_STATION) |
                        BIT(NL80211_IFTYPE_AP),
        },
 +      {
 +              .max = 1,
 +              .types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
 +                      BIT(NL80211_IFTYPE_P2P_GO),
 +      },
 +      {
 +              .max = 1,
 +              .types = BIT(NL80211_IFTYPE_P2P_DEVICE),
 +      },
  };
  
  static const struct ieee80211_iface_combination iwl_mvm_iface_combinations[] = {
@@@ -173,10 -164,7 +173,10 @@@ int iwl_mvm_mac_setup_register(struct i
        hw->chanctx_data_size = sizeof(u16);
  
        hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
 -              BIT(NL80211_IFTYPE_AP);
 +              BIT(NL80211_IFTYPE_P2P_CLIENT) |
 +              BIT(NL80211_IFTYPE_AP) |
 +              BIT(NL80211_IFTYPE_P2P_GO) |
 +              BIT(NL80211_IFTYPE_P2P_DEVICE);
  
        hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY |
                            WIPHY_FLAG_DISABLE_BEACON_HINTS |
@@@ -609,21 -597,11 +609,11 @@@ static int iwl_mvm_mac_add_interface(st
        mvmvif->phy_ctxt = NULL;
        iwl_mvm_mac_ctxt_remove(mvm, vif);
   out_release:
-       /*
-        * TODO: remove this temporary code.
-        * Currently MVM FW supports power management only on single MAC.
-        * Check if only one additional interface remains after releasing
-        * current one. Update power mode on the remaining interface.
-        */
        if (vif->type != NL80211_IFTYPE_P2P_DEVICE)
                mvm->vif_count--;
-       IWL_DEBUG_MAC80211(mvm, "Currently %d interfaces active\n",
-                          mvm->vif_count);
-       if (mvm->vif_count == 1) {
-               ieee80211_iterate_active_interfaces(
-                                       mvm->hw, IEEE80211_IFACE_ITER_NORMAL,
-                                       iwl_mvm_power_update_iterator, mvm);
-       }
+       ieee80211_iterate_active_interfaces(
+               mvm->hw, IEEE80211_IFACE_ITER_NORMAL,
+               iwl_mvm_power_update_iterator, mvm);
        iwl_mvm_mac_ctxt_release(mvm, vif);
   out_unlock:
        mutex_unlock(&mvm->mutex);
@@@ -785,6 -763,9 +775,9 @@@ static void iwl_mvm_bss_info_changed_st
                        if (ret)
                                IWL_ERR(mvm, "failed to update quotas\n");
                }
+               ret = iwl_mvm_power_update_mode(mvm, vif);
+               if (ret)
+                       IWL_ERR(mvm, "failed to update power mode\n");
        } else if (changes & BSS_CHANGED_DTIM_PERIOD) {
                /*
                 * We received a beacon _after_ association so
                iwl_mvm_remove_time_event(mvm, mvmvif,
                                          &mvmvif->time_event_data);
        } else if (changes & BSS_CHANGED_PS) {
-               /*
-                * TODO: remove this temporary code.
-                * Currently MVM FW supports power management only on single
-                * MAC. Avoid power mode update if more than one interface
-                * is active.
-                */
-               IWL_DEBUG_MAC80211(mvm, "Currently %d interfaces active\n",
-                                  mvm->vif_count);
-               if (mvm->vif_count == 1) {
-                       ret = iwl_mvm_power_update_mode(mvm, vif);
-                       if (ret)
-                               IWL_ERR(mvm, "failed to update power mode\n");
-               }
+               ret = iwl_mvm_power_update_mode(mvm, vif);
+               if (ret)
+                       IWL_ERR(mvm, "failed to update power mode\n");
        }
  }