]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
authorJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Jun 2010 19:13:46 +0000 (15:13 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Jun 2010 19:13:46 +0000 (15:13 -0400)
Conflicts:
drivers/net/wireless/iwlwifi/iwl-core.h

13 files changed:
1  2 
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath5k/phy.c
drivers/net/wireless/iwlwifi/iwl-3945.c
drivers/net/wireless/iwlwifi/iwl-agn-lib.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/p54/p54usb.c
net/mac80211/agg-tx.c
net/mac80211/driver-ops.h
net/mac80211/mlme.c
net/mac80211/rx.c

index 0aabfab2770ff43241ae4f39815211d63604d5f4,648972df369d849fa8d2e6a1ba836953787aef63..9d37c1a43a9d2adc84d981d5043359bcb69cddf3
@@@ -705,13 -705,14 +704,13 @@@ ath5k_pci_remove(struct pci_dev *pdev
        pci_iounmap(pdev, sc->iobase);
        pci_release_region(pdev, 0);
        pci_disable_device(pdev);
 -      ieee80211_free_hw(hw);
 +      ieee80211_free_hw(sc->hw);
  }
  
- #ifdef CONFIG_PM
+ #ifdef CONFIG_PM_SLEEP
  static int ath5k_pci_suspend(struct device *dev)
  {
 -      struct ieee80211_hw *hw = pci_get_drvdata(to_pci_dev(dev));
 -      struct ath5k_softc *sc = hw->priv;
 +      struct ath5k_softc *sc = pci_get_drvdata(to_pci_dev(dev));
  
        ath5k_led_off(sc);
        return 0;
index 2b3f7a7aded935b13835ce78c96a7dd3d96c9f6b,492cbb15720d2076667681a8860a7ed866a2df5f..34ba576d274714b499de5be9fb475c2b1c2290b8
@@@ -1793,8 -1814,17 +1793,15 @@@ ath5k_hw_set_antenna_mode(struct ath5k_
        u8 def_ant, tx_ant, ee_mode;
        u32 sta_id1 = 0;
  
+       /* if channel is not initialized yet we can't set the antennas
+        * so just store the mode. it will be set on the next reset */
+       if (channel == NULL) {
+               ah->ah_ant_mode = ant_mode;
+               return;
+       }
        def_ant = ah->ah_def_ant;
  
 -      ATH5K_TRACE(ah->ah_sc);
 -
        switch (channel->hw_value & CHANNEL_MODES) {
        case CHANNEL_A:
        case CHANNEL_T:
index ac5fade28c8de74a56066650698933e3c62b33fd,7726e67044c08b91a36d41759b2dfd22c19ae263..69e17d782883389361d30c9133bb8498f6e89129
@@@ -3333,233 -3419,6 +3490,98 @@@ static int iwlagn_mac_sta_add(struct ie
        return 0;
  }
  
- /*****************************************************************************
-  *
-  * sysfs attributes
-  *
-  *****************************************************************************/
- #ifdef CONFIG_IWLWIFI_DEBUG
- /*
-  * The following adds a new attribute to the sysfs representation
-  * of this device driver (i.e. a new file in /sys/class/net/wlan0/device/)
-  * used for controlling the debug level.
-  *
-  * See the level definitions in iwl for details.
-  *
-  * The debug_level being managed using sysfs below is a per device debug
-  * level that is used instead of the global debug level if it (the per
-  * device debug level) is set.
-  */
- static ssize_t show_debug_level(struct device *d,
-                               struct device_attribute *attr, char *buf)
- {
-       struct iwl_priv *priv = dev_get_drvdata(d);
-       return sprintf(buf, "0x%08X\n", iwl_get_debug_level(priv));
- }
- static ssize_t store_debug_level(struct device *d,
-                               struct device_attribute *attr,
-                                const char *buf, size_t count)
- {
-       struct iwl_priv *priv = dev_get_drvdata(d);
-       unsigned long val;
-       int ret;
-       ret = strict_strtoul(buf, 0, &val);
-       if (ret)
-               IWL_ERR(priv, "%s is not in hex or decimal form.\n", buf);
-       else {
-               priv->debug_level = val;
-               if (iwl_alloc_traffic_mem(priv))
-                       IWL_ERR(priv,
-                               "Not enough memory to generate traffic log\n");
-       }
-       return strnlen(buf, count);
- }
- static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO,
-                       show_debug_level, store_debug_level);
- #endif /* CONFIG_IWLWIFI_DEBUG */
- static ssize_t show_temperature(struct device *d,
-                               struct device_attribute *attr, char *buf)
- {
-       struct iwl_priv *priv = dev_get_drvdata(d);
-       if (!iwl_is_alive(priv))
-               return -EAGAIN;
-       return sprintf(buf, "%d\n", priv->temperature);
- }
- static DEVICE_ATTR(temperature, S_IRUGO, show_temperature, NULL);
- static ssize_t show_tx_power(struct device *d,
-                            struct device_attribute *attr, char *buf)
- {
-       struct iwl_priv *priv = dev_get_drvdata(d);
-       if (!iwl_is_ready_rf(priv))
-               return sprintf(buf, "off\n");
-       else
-               return sprintf(buf, "%d\n", priv->tx_power_user_lmt);
- }
- static ssize_t store_tx_power(struct device *d,
-                             struct device_attribute *attr,
-                             const char *buf, size_t count)
- {
-       struct iwl_priv *priv = dev_get_drvdata(d);
-       unsigned long val;
-       int ret;
-       ret = strict_strtoul(buf, 10, &val);
-       if (ret)
-               IWL_INFO(priv, "%s is not in decimal form.\n", buf);
-       else {
-               ret = iwl_set_tx_power(priv, val, false);
-               if (ret)
-                       IWL_ERR(priv, "failed setting tx power (0x%d).\n",
-                               ret);
-               else
-                       ret = count;
-       }
-       return ret;
- }
- static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power);
- static ssize_t show_rts_ht_protection(struct device *d,
-                            struct device_attribute *attr, char *buf)
- {
-       struct iwl_priv *priv = dev_get_drvdata(d);
-       return sprintf(buf, "%s\n",
-               priv->cfg->use_rts_for_ht ? "RTS/CTS" : "CTS-to-self");
- }
- static ssize_t store_rts_ht_protection(struct device *d,
-                             struct device_attribute *attr,
-                             const char *buf, size_t count)
- {
-       struct iwl_priv *priv = dev_get_drvdata(d);
-       unsigned long val;
-       int ret;
-       ret = strict_strtoul(buf, 10, &val);
-       if (ret)
-               IWL_INFO(priv, "Input is not in decimal form.\n");
-       else {
-               if (!iwl_is_associated(priv))
-                       priv->cfg->use_rts_for_ht = val ? true : false;
-               else
-                       IWL_ERR(priv, "Sta associated with AP - "
-                               "Change protection mechanism is not allowed\n");
-               ret = count;
-       }
-       return ret;
- }
- static DEVICE_ATTR(rts_ht_protection, S_IWUSR | S_IRUGO,
-                       show_rts_ht_protection, store_rts_ht_protection);
 +static void iwl_mac_channel_switch(struct ieee80211_hw *hw,
 +                                 struct ieee80211_channel_switch *ch_switch)
 +{
 +      struct iwl_priv *priv = hw->priv;
 +      const struct iwl_channel_info *ch_info;
 +      struct ieee80211_conf *conf = &hw->conf;
 +      struct iwl_ht_config *ht_conf = &priv->current_ht_config;
 +      u16 ch;
 +      unsigned long flags = 0;
 +
 +      IWL_DEBUG_MAC80211(priv, "enter\n");
 +
 +      if (iwl_is_rfkill(priv))
 +              goto out_exit;
 +
 +      if (test_bit(STATUS_EXIT_PENDING, &priv->status) ||
 +          test_bit(STATUS_SCANNING, &priv->status))
 +              goto out_exit;
 +
 +      if (!iwl_is_associated(priv))
 +              goto out_exit;
 +
 +      /* channel switch in progress */
 +      if (priv->switch_rxon.switch_in_progress == true)
 +              goto out_exit;
 +
 +      mutex_lock(&priv->mutex);
 +      if (priv->cfg->ops->lib->set_channel_switch) {
 +
 +              ch = ieee80211_frequency_to_channel(
 +                      ch_switch->channel->center_freq);
 +              if (le16_to_cpu(priv->active_rxon.channel) != ch) {
 +                      ch_info = iwl_get_channel_info(priv,
 +                                                     conf->channel->band,
 +                                                     ch);
 +                      if (!is_channel_valid(ch_info)) {
 +                              IWL_DEBUG_MAC80211(priv, "invalid channel\n");
 +                              goto out;
 +                      }
 +                      spin_lock_irqsave(&priv->lock, flags);
 +
 +                      priv->current_ht_config.smps = conf->smps_mode;
 +
 +                      /* Configure HT40 channels */
 +                      ht_conf->is_ht = conf_is_ht(conf);
 +                      if (ht_conf->is_ht) {
 +                              if (conf_is_ht40_minus(conf)) {
 +                                      ht_conf->extension_chan_offset =
 +                                              IEEE80211_HT_PARAM_CHA_SEC_BELOW;
 +                                      ht_conf->is_40mhz = true;
 +                              } else if (conf_is_ht40_plus(conf)) {
 +                                      ht_conf->extension_chan_offset =
 +                                              IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
 +                                      ht_conf->is_40mhz = true;
 +                              } else {
 +                                      ht_conf->extension_chan_offset =
 +                                              IEEE80211_HT_PARAM_CHA_SEC_NONE;
 +                                      ht_conf->is_40mhz = false;
 +                              }
 +                      } else
 +                              ht_conf->is_40mhz = false;
 +
 +                      /* if we are switching from ht to 2.4 clear flags
 +                       * from any ht related info since 2.4 does not
 +                       * support ht */
 +                      if ((le16_to_cpu(priv->staging_rxon.channel) != ch))
 +                              priv->staging_rxon.flags = 0;
 +
 +                      iwl_set_rxon_channel(priv, conf->channel);
 +                      iwl_set_rxon_ht(priv, ht_conf);
 +                      iwl_set_flags_for_band(priv, conf->channel->band,
 +                                             priv->vif);
 +                      spin_unlock_irqrestore(&priv->lock, flags);
 +
 +                      iwl_set_rate(priv);
 +                      /*
 +                       * at this point, staging_rxon has the
 +                       * configuration for channel switch
 +                       */
 +                      if (priv->cfg->ops->lib->set_channel_switch(priv,
 +                                                                  ch_switch))
 +                              priv->switch_rxon.switch_in_progress = false;
 +              }
 +      }
 +out:
 +      mutex_unlock(&priv->mutex);
 +out_exit:
 +      if (!priv->switch_rxon.switch_in_progress)
 +              ieee80211_chswitch_done(priv->vif, false);
 +      IWL_DEBUG_MAC80211(priv, "leave\n");
 +}
 +
  /*****************************************************************************
   *
   * driver setup and teardown
index 87dd5731e515d40333fdcd93179219333b95a1ce,31775bd9c36170faa839da119456fd4cf747a385..76288c56a7d7b3d055f2433a3eaf3c0a4909c8ce
@@@ -347,9 -343,8 +347,11 @@@ int iwl_check_rxon_cmd(struct iwl_priv 
  int iwl_full_rxon_required(struct iwl_priv *priv);
  void iwl_set_rxon_chain(struct iwl_priv *priv);
  int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch);
 +void iwl_set_flags_for_band(struct iwl_priv *priv,
 +                          enum ieee80211_band band,
 +                          struct ieee80211_vif *vif);
+ u8 iwl_get_single_channel_number(struct iwl_priv *priv,
+                                 enum ieee80211_band band);
  void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf);
  u8 iwl_is_ht40_tx_allowed(struct iwl_priv *priv,
                         struct ieee80211_sta_ht_cap *sta_ht_inf);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge