aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-06-06 16:25:36 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-06 16:25:36 -0400
commit2b22b1b1e169c6591aa125525223f70e40ed4acf (patch)
tree2a112e848cc227e722f7650fff4ca5c610acacae
parent85fadea9ce4b278b959886748b2798a383667c10 (diff)
parentc11114717a66455de9fbc3ea69ae00d1aace3c14 (diff)
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c11
-rw-r--r--drivers/net/wireless/ath/ath5k/reset.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-2000.c74
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rxon.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c19
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h13
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c24
-rw-r--r--drivers/net/wireless/libertas/if_sdio.c21
-rw-r--r--drivers/ssb/driver_pcicore.c10
-rw-r--r--net/mac80211/iface.c4
14 files changed, 68 insertions, 130 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 22047628ccfa..b6c5d3715b96 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -72,6 +72,11 @@ static int modparam_all_channels;
72module_param_named(all_channels, modparam_all_channels, bool, S_IRUGO); 72module_param_named(all_channels, modparam_all_channels, bool, S_IRUGO);
73MODULE_PARM_DESC(all_channels, "Expose all channels the device can use."); 73MODULE_PARM_DESC(all_channels, "Expose all channels the device can use.");
74 74
75static int modparam_fastchanswitch;
76module_param_named(fastchanswitch, modparam_fastchanswitch, bool, S_IRUGO);
77MODULE_PARM_DESC(fastchanswitch, "Enable fast channel switching for AR2413/AR5413 radios.");
78
79
75/* Module info */ 80/* Module info */
76MODULE_AUTHOR("Jiri Slaby"); 81MODULE_AUTHOR("Jiri Slaby");
77MODULE_AUTHOR("Nick Kossifidis"); 82MODULE_AUTHOR("Nick Kossifidis");
@@ -2686,6 +2691,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
2686 struct ath5k_hw *ah = sc->ah; 2691 struct ath5k_hw *ah = sc->ah;
2687 struct ath_common *common = ath5k_hw_common(ah); 2692 struct ath_common *common = ath5k_hw_common(ah);
2688 int ret, ani_mode; 2693 int ret, ani_mode;
2694 bool fast;
2689 2695
2690 ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n"); 2696 ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n");
2691 2697
@@ -2705,7 +2711,10 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
2705 ath5k_drain_tx_buffs(sc); 2711 ath5k_drain_tx_buffs(sc);
2706 if (chan) 2712 if (chan)
2707 sc->curchan = chan; 2713 sc->curchan = chan;
2708 ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, chan != NULL, 2714
2715 fast = ((chan != NULL) && modparam_fastchanswitch) ? 1 : 0;
2716
2717 ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, fast,
2709 skip_pcu); 2718 skip_pcu);
2710 if (ret) { 2719 if (ret) {
2711 ATH5K_ERR(sc, "can't reset hardware (%d)\n", ret); 2720 ATH5K_ERR(sc, "can't reset hardware (%d)\n", ret);
diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c
index 3510de2cf622..126a4eab35f3 100644
--- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/drivers/net/wireless/ath/ath5k/reset.c
@@ -1124,8 +1124,11 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
1124 /* Non fatal, can happen eg. 1124 /* Non fatal, can happen eg.
1125 * on mode change */ 1125 * on mode change */
1126 ret = 0; 1126 ret = 0;
1127 } else 1127 } else {
1128 ATH5K_DBG(ah->ah_sc, ATH5K_DEBUG_RESET,
1129 "fast chan change successful\n");
1128 return 0; 1130 return 0;
1131 }
1129 } 1132 }
1130 1133
1131 /* 1134 /*
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index 86feec86d130..2282279cffc4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -177,79 +177,6 @@ static int iwl2000_hw_set_hw_params(struct iwl_priv *priv)
177 return 0; 177 return 0;
178} 178}
179 179
180static int iwl2030_hw_channel_switch(struct iwl_priv *priv,
181 struct ieee80211_channel_switch *ch_switch)
182{
183 /*
184 * MULTI-FIXME
185 * See iwl_mac_channel_switch.
186 */
187 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
188 struct iwl6000_channel_switch_cmd cmd;
189 const struct iwl_channel_info *ch_info;
190 u32 switch_time_in_usec, ucode_switch_time;
191 u16 ch;
192 u32 tsf_low;
193 u8 switch_count;
194 u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval);
195 struct ieee80211_vif *vif = ctx->vif;
196 struct iwl_host_cmd hcmd = {
197 .id = REPLY_CHANNEL_SWITCH,
198 .len = { sizeof(cmd), },
199 .flags = CMD_SYNC,
200 .data = { &cmd, },
201 };
202
203 cmd.band = priv->band == IEEE80211_BAND_2GHZ;
204 ch = ch_switch->channel->hw_value;
205 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
206 ctx->active.channel, ch);
207 cmd.channel = cpu_to_le16(ch);
208 cmd.rxon_flags = ctx->staging.flags;
209 cmd.rxon_filter_flags = ctx->staging.filter_flags;
210 switch_count = ch_switch->count;
211 tsf_low = ch_switch->timestamp & 0x0ffffffff;
212 /*
213 * calculate the ucode channel switch time
214 * adding TSF as one of the factor for when to switch
215 */
216 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
217 if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
218 beacon_interval)) {
219 switch_count -= (priv->ucode_beacon_time -
220 tsf_low) / beacon_interval;
221 } else
222 switch_count = 0;
223 }
224 if (switch_count <= 1)
225 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
226 else {
227 switch_time_in_usec =
228 vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
229 ucode_switch_time = iwl_usecs_to_beacons(priv,
230 switch_time_in_usec,
231 beacon_interval);
232 cmd.switch_time = iwl_add_beacon_time(priv,
233 priv->ucode_beacon_time,
234 ucode_switch_time,
235 beacon_interval);
236 }
237 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
238 cmd.switch_time);
239 ch_info = iwl_get_channel_info(priv, priv->band, ch);
240 if (ch_info)
241 cmd.expect_beacon = is_channel_radar(ch_info);
242 else {
243 IWL_ERR(priv, "invalid channel switch from %u to %u\n",
244 ctx->active.channel, ch);
245 return -EFAULT;
246 }
247 priv->switch_rxon.channel = cmd.channel;
248 priv->switch_rxon.switch_in_progress = true;
249
250 return iwl_send_cmd_sync(priv, &hcmd);
251}
252
253static struct iwl_lib_ops iwl2000_lib = { 180static struct iwl_lib_ops iwl2000_lib = {
254 .set_hw_params = iwl2000_hw_set_hw_params, 181 .set_hw_params = iwl2000_hw_set_hw_params,
255 .rx_handler_setup = iwlagn_rx_handler_setup, 182 .rx_handler_setup = iwlagn_rx_handler_setup,
@@ -258,7 +185,6 @@ static struct iwl_lib_ops iwl2000_lib = {
258 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, 185 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
259 .send_tx_power = iwlagn_send_tx_power, 186 .send_tx_power = iwlagn_send_tx_power,
260 .update_chain_flags = iwl_update_chain_flags, 187 .update_chain_flags = iwl_update_chain_flags,
261 .set_channel_switch = iwl2030_hw_channel_switch,
262 .apm_ops = { 188 .apm_ops = {
263 .init = iwl_apm_init, 189 .init = iwl_apm_init,
264 .config = iwl2000_nic_config, 190 .config = iwl2000_nic_config,
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index a70b8cfafda1..5b721c56aee9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -331,8 +331,6 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv,
331 ctx->active.channel, ch); 331 ctx->active.channel, ch);
332 return -EFAULT; 332 return -EFAULT;
333 } 333 }
334 priv->switch_rxon.channel = cmd.channel;
335 priv->switch_rxon.switch_in_progress = true;
336 334
337 return iwl_send_cmd_sync(priv, &hcmd); 335 return iwl_send_cmd_sync(priv, &hcmd);
338} 336}
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index fda6fe08cf91..fbe565c816e3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -270,8 +270,6 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
270 ctx->active.channel, ch); 270 ctx->active.channel, ch);
271 return -EFAULT; 271 return -EFAULT;
272 } 272 }
273 priv->switch_rxon.channel = cmd.channel;
274 priv->switch_rxon.switch_in_progress = true;
275 273
276 return iwl_send_cmd_sync(priv, &hcmd); 274 return iwl_send_cmd_sync(priv, &hcmd);
277} 275}
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index a95ad84c5377..2532c7db3aff 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -342,10 +342,10 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
342 * receive commit_rxon request 342 * receive commit_rxon request
343 * abort any previous channel switch if still in process 343 * abort any previous channel switch if still in process
344 */ 344 */
345 if (priv->switch_rxon.switch_in_progress && 345 if (test_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status) &&
346 (priv->switch_rxon.channel != ctx->staging.channel)) { 346 (priv->switch_channel != ctx->staging.channel)) {
347 IWL_DEBUG_11H(priv, "abort channel switch on %d\n", 347 IWL_DEBUG_11H(priv, "abort channel switch on %d\n",
348 le16_to_cpu(priv->switch_rxon.channel)); 348 le16_to_cpu(priv->switch_channel));
349 iwl_chswitch_done(priv, false); 349 iwl_chswitch_done(priv, false);
350 } 350 }
351 351
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index a662adcb2adb..8e1942ebd9a0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2843,16 +2843,13 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw,
2843 goto out; 2843 goto out;
2844 2844
2845 if (test_bit(STATUS_EXIT_PENDING, &priv->status) || 2845 if (test_bit(STATUS_EXIT_PENDING, &priv->status) ||
2846 test_bit(STATUS_SCANNING, &priv->status)) 2846 test_bit(STATUS_SCANNING, &priv->status) ||
2847 test_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status))
2847 goto out; 2848 goto out;
2848 2849
2849 if (!iwl_is_associated_ctx(ctx)) 2850 if (!iwl_is_associated_ctx(ctx))
2850 goto out; 2851 goto out;
2851 2852
2852 /* channel switch in progress */
2853 if (priv->switch_rxon.switch_in_progress == true)
2854 goto out;
2855
2856 if (priv->cfg->ops->lib->set_channel_switch) { 2853 if (priv->cfg->ops->lib->set_channel_switch) {
2857 2854
2858 ch = channel->hw_value; 2855 ch = channel->hw_value;
@@ -2901,15 +2898,19 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw,
2901 * at this point, staging_rxon has the 2898 * at this point, staging_rxon has the
2902 * configuration for channel switch 2899 * configuration for channel switch
2903 */ 2900 */
2901 set_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status);
2902 priv->switch_channel = cpu_to_le16(ch);
2904 if (priv->cfg->ops->lib->set_channel_switch(priv, 2903 if (priv->cfg->ops->lib->set_channel_switch(priv,
2905 ch_switch)) 2904 ch_switch)) {
2906 priv->switch_rxon.switch_in_progress = false; 2905 clear_bit(STATUS_CHANNEL_SWITCH_PENDING,
2906 &priv->status);
2907 priv->switch_channel = 0;
2908 ieee80211_chswitch_done(ctx->vif, false);
2909 }
2907 } 2910 }
2908 } 2911 }
2909out: 2912out:
2910 mutex_unlock(&priv->mutex); 2913 mutex_unlock(&priv->mutex);
2911 if (!priv->switch_rxon.switch_in_progress)
2912 ieee80211_chswitch_done(ctx->vif, false);
2913 IWL_DEBUG_MAC80211(priv, "leave\n"); 2914 IWL_DEBUG_MAC80211(priv, "leave\n");
2914} 2915}
2915 2916
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 4653deada05b..213c80c6a668 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -843,12 +843,8 @@ void iwl_chswitch_done(struct iwl_priv *priv, bool is_success)
843 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 843 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
844 return; 844 return;
845 845
846 if (priv->switch_rxon.switch_in_progress) { 846 if (test_and_clear_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status))
847 ieee80211_chswitch_done(ctx->vif, is_success); 847 ieee80211_chswitch_done(ctx->vif, is_success);
848 mutex_lock(&priv->mutex);
849 priv->switch_rxon.switch_in_progress = false;
850 mutex_unlock(&priv->mutex);
851 }
852} 848}
853 849
854#ifdef CONFIG_IWLWIFI_DEBUG 850#ifdef CONFIG_IWLWIFI_DEBUG
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 3bb76f6ea410..a54d416ec345 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -560,6 +560,7 @@ void iwlcore_free_geos(struct iwl_priv *priv);
560#define STATUS_POWER_PMI 16 560#define STATUS_POWER_PMI 16
561#define STATUS_FW_ERROR 17 561#define STATUS_FW_ERROR 17
562#define STATUS_DEVICE_ENABLED 18 562#define STATUS_DEVICE_ENABLED 18
563#define STATUS_CHANNEL_SWITCH_PENDING 19
563 564
564 565
565static inline int iwl_is_ready(struct iwl_priv *priv) 566static inline int iwl_is_ready(struct iwl_priv *priv)
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 22a6e3ec7094..c8de236c141b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -982,17 +982,6 @@ struct traffic_stats {
982}; 982};
983 983
984/* 984/*
985 * iwl_switch_rxon: "channel switch" structure
986 *
987 * @ switch_in_progress: channel switch in progress
988 * @ channel: new channel
989 */
990struct iwl_switch_rxon {
991 bool switch_in_progress;
992 __le16 channel;
993};
994
995/*
996 * schedule the timer to wake up every UCODE_TRACE_PERIOD milliseconds 985 * schedule the timer to wake up every UCODE_TRACE_PERIOD milliseconds
997 * to perform continuous uCode event logging operation if enabled 986 * to perform continuous uCode event logging operation if enabled
998 */ 987 */
@@ -1287,7 +1276,7 @@ struct iwl_priv {
1287 1276
1288 struct iwl_rxon_context contexts[NUM_IWL_RXON_CTX]; 1277 struct iwl_rxon_context contexts[NUM_IWL_RXON_CTX];
1289 1278
1290 struct iwl_switch_rxon switch_rxon; 1279 __le16 switch_channel;
1291 1280
1292 struct { 1281 struct {
1293 u32 error_event_table; 1282 u32 error_event_table;
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index 0053e9ea9021..b774517aa9fa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -250,19 +250,19 @@ static void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
250 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; 250 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
251 struct iwl_rxon_cmd *rxon = (void *)&ctx->active; 251 struct iwl_rxon_cmd *rxon = (void *)&ctx->active;
252 252
253 if (priv->switch_rxon.switch_in_progress) { 253 if (!test_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status))
254 if (!le32_to_cpu(csa->status) && 254 return;
255 (csa->channel == priv->switch_rxon.channel)) { 255
256 rxon->channel = csa->channel; 256 if (!le32_to_cpu(csa->status) && csa->channel == priv->switch_channel) {
257 ctx->staging.channel = csa->channel; 257 rxon->channel = csa->channel;
258 IWL_DEBUG_11H(priv, "CSA notif: channel %d\n", 258 ctx->staging.channel = csa->channel;
259 le16_to_cpu(csa->channel)); 259 IWL_DEBUG_11H(priv, "CSA notif: channel %d\n",
260 iwl_chswitch_done(priv, true);
261 } else {
262 IWL_ERR(priv, "CSA notif (fail) : channel %d\n",
263 le16_to_cpu(csa->channel)); 260 le16_to_cpu(csa->channel));
264 iwl_chswitch_done(priv, false); 261 iwl_chswitch_done(priv, true);
265 } 262 } else {
263 IWL_ERR(priv, "CSA notif (fail) : channel %d\n",
264 le16_to_cpu(csa->channel));
265 iwl_chswitch_done(priv, false);
266 } 266 }
267} 267}
268 268
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index a7b5cb0c2753..224e9853c480 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -907,7 +907,7 @@ static void if_sdio_interrupt(struct sdio_func *func)
907 card = sdio_get_drvdata(func); 907 card = sdio_get_drvdata(func);
908 908
909 cause = sdio_readb(card->func, IF_SDIO_H_INT_STATUS, &ret); 909 cause = sdio_readb(card->func, IF_SDIO_H_INT_STATUS, &ret);
910 if (ret) 910 if (ret || !cause)
911 goto out; 911 goto out;
912 912
913 lbs_deb_sdio("interrupt: 0x%X\n", (unsigned)cause); 913 lbs_deb_sdio("interrupt: 0x%X\n", (unsigned)cause);
@@ -1008,10 +1008,6 @@ static int if_sdio_probe(struct sdio_func *func,
1008 if (ret) 1008 if (ret)
1009 goto release; 1009 goto release;
1010 1010
1011 ret = sdio_claim_irq(func, if_sdio_interrupt);
1012 if (ret)
1013 goto disable;
1014
1015 /* For 1-bit transfers to the 8686 model, we need to enable the 1011 /* For 1-bit transfers to the 8686 model, we need to enable the
1016 * interrupt flag in the CCCR register. Set the MMC_QUIRK_LENIENT_FN0 1012 * interrupt flag in the CCCR register. Set the MMC_QUIRK_LENIENT_FN0
1017 * bit to allow access to non-vendor registers. */ 1013 * bit to allow access to non-vendor registers. */
@@ -1083,6 +1079,21 @@ static int if_sdio_probe(struct sdio_func *func,
1083 card->rx_unit = 0; 1079 card->rx_unit = 0;
1084 1080
1085 /* 1081 /*
1082 * Set up the interrupt handler late.
1083 *
1084 * If we set it up earlier, the (buggy) hardware generates a spurious
1085 * interrupt, even before the interrupt has been enabled, with
1086 * CCCR_INTx = 0.
1087 *
1088 * We register the interrupt handler late so that we can handle any
1089 * spurious interrupts, and also to avoid generation of that known
1090 * spurious interrupt in the first place.
1091 */
1092 ret = sdio_claim_irq(func, if_sdio_interrupt);
1093 if (ret)
1094 goto disable;
1095
1096 /*
1086 * Enable interrupts now that everything is set up 1097 * Enable interrupts now that everything is set up
1087 */ 1098 */
1088 sdio_writeb(func, 0x0f, IF_SDIO_H_INT_MASK, &ret); 1099 sdio_writeb(func, 0x0f, IF_SDIO_H_INT_MASK, &ret);
diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c
index 82feb348c8bb..2a20dabec76d 100644
--- a/drivers/ssb/driver_pcicore.c
+++ b/drivers/ssb/driver_pcicore.c
@@ -539,10 +539,12 @@ void ssb_pcicore_init(struct ssb_pcicore *pc)
539 if (!pc->hostmode) 539 if (!pc->hostmode)
540 ssb_pcicore_init_clientmode(pc); 540 ssb_pcicore_init_clientmode(pc);
541 541
542 /* Additional always once-executed workarounds */ 542 /* Additional PCIe always once-executed workarounds */
543 ssb_pcicore_serdes_workaround(pc); 543 if (dev->id.coreid == SSB_DEV_PCIE) {
544 /* TODO: ASPM */ 544 ssb_pcicore_serdes_workaround(pc);
545 /* TODO: Clock Request Update */ 545 /* TODO: ASPM */
546 /* TODO: Clock Request Update */
547 }
546} 548}
547 549
548static u32 ssb_pcie_read(struct ssb_pcicore *pc, u32 address) 550static u32 ssb_pcie_read(struct ssb_pcicore *pc, u32 address)
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 49d4f869e0bc..dee30aea9ab3 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1145,6 +1145,10 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
1145 + IEEE80211_ENCRYPT_HEADROOM; 1145 + IEEE80211_ENCRYPT_HEADROOM;
1146 ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM; 1146 ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM;
1147 1147
1148 ret = dev_alloc_name(ndev, ndev->name);
1149 if (ret < 0)
1150 goto fail;
1151
1148 ieee80211_assign_perm_addr(local, ndev, type); 1152 ieee80211_assign_perm_addr(local, ndev, type);
1149 memcpy(ndev->dev_addr, ndev->perm_addr, ETH_ALEN); 1153 memcpy(ndev->dev_addr, ndev->perm_addr, ETH_ALEN);
1150 SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy)); 1154 SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));