|
@@ -518,12 +518,6 @@ static int iwlcore_init_geos(struct iwl_priv *priv)
|
|
|
priv->bands[IEEE80211_BAND_2GHZ].n_channels,
|
|
|
priv->bands[IEEE80211_BAND_5GHZ].n_channels);
|
|
|
|
|
|
- if (priv->bands[IEEE80211_BAND_2GHZ].n_channels)
|
|
|
- priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
|
|
|
- &priv->bands[IEEE80211_BAND_2GHZ];
|
|
|
- if (priv->bands[IEEE80211_BAND_5GHZ].n_channels)
|
|
|
- priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
|
|
|
- &priv->bands[IEEE80211_BAND_5GHZ];
|
|
|
|
|
|
set_bit(STATUS_GEO_CONFIGURED, &priv->status);
|
|
|
|
|
@@ -533,13 +527,12 @@ static int iwlcore_init_geos(struct iwl_priv *priv)
|
|
|
/*
|
|
|
* iwlcore_free_geos - undo allocations in iwlcore_init_geos
|
|
|
*/
|
|
|
-void iwlcore_free_geos(struct iwl_priv *priv)
|
|
|
+static void iwlcore_free_geos(struct iwl_priv *priv)
|
|
|
{
|
|
|
kfree(priv->ieee_channels);
|
|
|
kfree(priv->ieee_rates);
|
|
|
clear_bit(STATUS_GEO_CONFIGURED, &priv->status);
|
|
|
}
|
|
|
-EXPORT_SYMBOL(iwlcore_free_geos);
|
|
|
|
|
|
#ifdef CONFIG_IWL4965_HT
|
|
|
static u8 is_single_rx_stream(struct iwl_priv *priv)
|
|
@@ -767,8 +760,9 @@ int iwl_set_rxon_channel(struct iwl_priv *priv,
|
|
|
}
|
|
|
EXPORT_SYMBOL(iwl_set_rxon_channel);
|
|
|
|
|
|
-static void iwlcore_init_hw(struct iwl_priv *priv)
|
|
|
+int iwl_setup_mac(struct iwl_priv *priv)
|
|
|
{
|
|
|
+ int ret;
|
|
|
struct ieee80211_hw *hw = priv->hw;
|
|
|
hw->rate_control_algorithm = "iwl-4965-rs";
|
|
|
|
|
@@ -782,9 +776,29 @@ static void iwlcore_init_hw(struct iwl_priv *priv)
|
|
|
/* Enhanced value; more queues, to support 11n aggregation */
|
|
|
hw->ampdu_queues = 12;
|
|
|
#endif /* CONFIG_IWL4965_HT */
|
|
|
+
|
|
|
+ hw->conf.beacon_int = 100;
|
|
|
+
|
|
|
+ if (priv->bands[IEEE80211_BAND_2GHZ].n_channels)
|
|
|
+ priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
|
|
|
+ &priv->bands[IEEE80211_BAND_2GHZ];
|
|
|
+ if (priv->bands[IEEE80211_BAND_5GHZ].n_channels)
|
|
|
+ priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
|
|
|
+ &priv->bands[IEEE80211_BAND_5GHZ];
|
|
|
+
|
|
|
+ ret = ieee80211_register_hw(priv->hw);
|
|
|
+ if (ret) {
|
|
|
+ IWL_ERROR("Failed to register hw (error %d)\n", ret);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ priv->mac80211_registered = 1;
|
|
|
+
|
|
|
+ return 0;
|
|
|
}
|
|
|
+EXPORT_SYMBOL(iwl_setup_mac);
|
|
|
+
|
|
|
|
|
|
-static int iwlcore_init_drv(struct iwl_priv *priv)
|
|
|
+int iwl_init_drv(struct iwl_priv *priv)
|
|
|
{
|
|
|
int ret;
|
|
|
int i;
|
|
@@ -821,6 +835,9 @@ static int iwlcore_init_drv(struct iwl_priv *priv)
|
|
|
/* Choose which receivers/antennas to use */
|
|
|
iwl_set_rxon_chain(priv);
|
|
|
|
|
|
+ if (priv->cfg->mod_params->enable_qos)
|
|
|
+ priv->qos_data.qos_enable = 1;
|
|
|
+
|
|
|
iwl_reset_qos(priv);
|
|
|
|
|
|
priv->qos_data.qos_active = 0;
|
|
@@ -845,34 +862,22 @@ static int iwlcore_init_drv(struct iwl_priv *priv)
|
|
|
goto err_free_channel_map;
|
|
|
}
|
|
|
|
|
|
- ret = ieee80211_register_hw(priv->hw);
|
|
|
- if (ret) {
|
|
|
- IWL_ERROR("Failed to register network device (error %d)\n",
|
|
|
- ret);
|
|
|
- goto err_free_geos;
|
|
|
- }
|
|
|
-
|
|
|
- priv->hw->conf.beacon_int = 100;
|
|
|
- priv->mac80211_registered = 1;
|
|
|
-
|
|
|
return 0;
|
|
|
|
|
|
-err_free_geos:
|
|
|
- iwlcore_free_geos(priv);
|
|
|
err_free_channel_map:
|
|
|
iwl_free_channel_map(priv);
|
|
|
err:
|
|
|
return ret;
|
|
|
}
|
|
|
+EXPORT_SYMBOL(iwl_init_drv);
|
|
|
+
|
|
|
|
|
|
-int iwl_setup(struct iwl_priv *priv)
|
|
|
+void iwl_uninit_drv(struct iwl_priv *priv)
|
|
|
{
|
|
|
- int ret = 0;
|
|
|
- iwlcore_init_hw(priv);
|
|
|
- ret = iwlcore_init_drv(priv);
|
|
|
- return ret;
|
|
|
+ iwlcore_free_geos(priv);
|
|
|
+ iwl_free_channel_map(priv);
|
|
|
}
|
|
|
-EXPORT_SYMBOL(iwl_setup);
|
|
|
+EXPORT_SYMBOL(iwl_uninit_drv);
|
|
|
|
|
|
/* Low level driver call this function to update iwlcore with
|
|
|
* driver status.
|