Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into for-davem

+68 -130
+10 -1
drivers/net/wireless/ath/ath5k/base.c
··· 72 72 module_param_named(all_channels, modparam_all_channels, bool, S_IRUGO); 73 73 MODULE_PARM_DESC(all_channels, "Expose all channels the device can use."); 74 74 75 + static int modparam_fastchanswitch; 76 + module_param_named(fastchanswitch, modparam_fastchanswitch, bool, S_IRUGO); 77 + MODULE_PARM_DESC(fastchanswitch, "Enable fast channel switching for AR2413/AR5413 radios."); 78 + 79 + 75 80 /* Module info */ 76 81 MODULE_AUTHOR("Jiri Slaby"); 77 82 MODULE_AUTHOR("Nick Kossifidis"); ··· 2691 2686 struct ath5k_hw *ah = sc->ah; 2692 2687 struct ath_common *common = ath5k_hw_common(ah); 2693 2688 int ret, ani_mode; 2689 + bool fast; 2694 2690 2695 2691 ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n"); 2696 2692 ··· 2711 2705 ath5k_drain_tx_buffs(sc); 2712 2706 if (chan) 2713 2707 sc->curchan = chan; 2714 - ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, chan != NULL, 2708 + 2709 + fast = ((chan != NULL) && modparam_fastchanswitch) ? 1 : 0; 2710 + 2711 + ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, fast, 2715 2712 skip_pcu); 2716 2713 if (ret) { 2717 2714 ATH5K_ERR(sc, "can't reset hardware (%d)\n", ret);
+4 -1
drivers/net/wireless/ath/ath5k/reset.c
··· 1124 1124 /* Non fatal, can happen eg. 1125 1125 * on mode change */ 1126 1126 ret = 0; 1127 - } else 1127 + } else { 1128 + ATH5K_DBG(ah->ah_sc, ATH5K_DEBUG_RESET, 1129 + "fast chan change successful\n"); 1128 1130 return 0; 1131 + } 1129 1132 } 1130 1133 1131 1134 /*
-74
drivers/net/wireless/iwlwifi/iwl-2000.c
··· 177 177 return 0; 178 178 } 179 179 180 - static 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 - 253 180 static struct iwl_lib_ops iwl2000_lib = { 254 181 .set_hw_params = iwl2000_hw_set_hw_params, 255 182 .rx_handler_setup = iwlagn_rx_handler_setup, ··· 185 258 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, 186 259 .send_tx_power = iwlagn_send_tx_power, 187 260 .update_chain_flags = iwl_update_chain_flags, 188 - .set_channel_switch = iwl2030_hw_channel_switch, 189 261 .apm_ops = { 190 262 .init = iwl_apm_init, 191 263 .config = iwl2000_nic_config,
-2
drivers/net/wireless/iwlwifi/iwl-5000.c
··· 331 331 ctx->active.channel, ch); 332 332 return -EFAULT; 333 333 } 334 - priv->switch_rxon.channel = cmd.channel; 335 - priv->switch_rxon.switch_in_progress = true; 336 334 337 335 return iwl_send_cmd_sync(priv, &hcmd); 338 336 }
-2
drivers/net/wireless/iwlwifi/iwl-6000.c
··· 270 270 ctx->active.channel, ch); 271 271 return -EFAULT; 272 272 } 273 - priv->switch_rxon.channel = cmd.channel; 274 - priv->switch_rxon.switch_in_progress = true; 275 273 276 274 return iwl_send_cmd_sync(priv, &hcmd); 277 275 }
+3 -3
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
··· 342 342 * receive commit_rxon request 343 343 * abort any previous channel switch if still in process 344 344 */ 345 - if (priv->switch_rxon.switch_in_progress && 346 - (priv->switch_rxon.channel != ctx->staging.channel)) { 345 + if (test_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status) && 346 + (priv->switch_channel != ctx->staging.channel)) { 347 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 349 iwl_chswitch_done(priv, false); 350 350 } 351 351
+10 -9
drivers/net/wireless/iwlwifi/iwl-agn.c
··· 2843 2843 goto out; 2844 2844 2845 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 2848 goto out; 2848 2849 2849 2850 if (!iwl_is_associated_ctx(ctx)) 2850 - goto out; 2851 - 2852 - /* channel switch in progress */ 2853 - if (priv->switch_rxon.switch_in_progress == true) 2854 2851 goto out; 2855 2852 2856 2853 if (priv->cfg->ops->lib->set_channel_switch) { ··· 2898 2901 * at this point, staging_rxon has the 2899 2902 * configuration for channel switch 2900 2903 */ 2904 + set_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status); 2905 + priv->switch_channel = cpu_to_le16(ch); 2901 2906 if (priv->cfg->ops->lib->set_channel_switch(priv, 2902 - ch_switch)) 2903 - priv->switch_rxon.switch_in_progress = false; 2907 + ch_switch)) { 2908 + clear_bit(STATUS_CHANNEL_SWITCH_PENDING, 2909 + &priv->status); 2910 + priv->switch_channel = 0; 2911 + ieee80211_chswitch_done(ctx->vif, false); 2912 + } 2904 2913 } 2905 2914 } 2906 2915 out: 2907 2916 mutex_unlock(&priv->mutex); 2908 - if (!priv->switch_rxon.switch_in_progress) 2909 - ieee80211_chswitch_done(ctx->vif, false); 2910 2917 IWL_DEBUG_MAC80211(priv, "leave\n"); 2911 2918 } 2912 2919
+1 -5
drivers/net/wireless/iwlwifi/iwl-core.c
··· 843 843 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 844 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 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 850 #ifdef CONFIG_IWLWIFI_DEBUG
+1
drivers/net/wireless/iwlwifi/iwl-core.h
··· 560 560 #define STATUS_POWER_PMI 16 561 561 #define STATUS_FW_ERROR 17 562 562 #define STATUS_DEVICE_ENABLED 18 563 + #define STATUS_CHANNEL_SWITCH_PENDING 19 563 564 564 565 565 566 static inline int iwl_is_ready(struct iwl_priv *priv)
+1 -12
drivers/net/wireless/iwlwifi/iwl-dev.h
··· 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 - */ 990 - struct iwl_switch_rxon { 991 - bool switch_in_progress; 992 - __le16 channel; 993 - }; 994 - 995 - /* 996 985 * schedule the timer to wake up every UCODE_TRACE_PERIOD milliseconds 997 986 * to perform continuous uCode event logging operation if enabled 998 987 */ ··· 1276 1287 1277 1288 struct iwl_rxon_context contexts[NUM_IWL_RXON_CTX]; 1278 1289 1279 - struct iwl_switch_rxon switch_rxon; 1290 + __le16 switch_channel; 1280 1291 1281 1292 struct { 1282 1293 u32 error_event_table;
+12 -12
drivers/net/wireless/iwlwifi/iwl-rx.c
··· 250 250 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; 251 251 struct iwl_rxon_cmd *rxon = (void *)&ctx->active; 252 252 253 - if (priv->switch_rxon.switch_in_progress) { 254 - if (!le32_to_cpu(csa->status) && 255 - (csa->channel == priv->switch_rxon.channel)) { 256 - rxon->channel = csa->channel; 257 - ctx->staging.channel = csa->channel; 258 - IWL_DEBUG_11H(priv, "CSA notif: channel %d\n", 253 + if (!test_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status)) 254 + return; 255 + 256 + if (!le32_to_cpu(csa->status) && csa->channel == priv->switch_channel) { 257 + rxon->channel = csa->channel; 258 + ctx->staging.channel = csa->channel; 259 + IWL_DEBUG_11H(priv, "CSA notif: channel %d\n", 259 260 le16_to_cpu(csa->channel)); 260 - iwl_chswitch_done(priv, true); 261 - } else { 262 - IWL_ERR(priv, "CSA notif (fail) : channel %d\n", 263 - le16_to_cpu(csa->channel)); 264 - iwl_chswitch_done(priv, false); 265 - } 261 + iwl_chswitch_done(priv, true); 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
+16 -5
drivers/net/wireless/libertas/if_sdio.c
··· 907 907 card = sdio_get_drvdata(func); 908 908 909 909 cause = sdio_readb(card->func, IF_SDIO_H_INT_STATUS, &ret); 910 - if (ret) 910 + if (ret || !cause) 911 911 goto out; 912 912 913 913 lbs_deb_sdio("interrupt: 0x%X\n", (unsigned)cause); ··· 1008 1008 if (ret) 1009 1009 goto release; 1010 1010 1011 - ret = sdio_claim_irq(func, if_sdio_interrupt); 1012 - if (ret) 1013 - goto disable; 1014 - 1015 1011 /* For 1-bit transfers to the 8686 model, we need to enable the 1016 1012 * interrupt flag in the CCCR register. Set the MMC_QUIRK_LENIENT_FN0 1017 1013 * bit to allow access to non-vendor registers. */ ··· 1077 1081 card->rx_unit = if_sdio_read_rx_unit(card); 1078 1082 else 1079 1083 card->rx_unit = 0; 1084 + 1085 + /* 1086 + * Set up the interrupt handler late. 1087 + * 1088 + * If we set it up earlier, the (buggy) hardware generates a spurious 1089 + * interrupt, even before the interrupt has been enabled, with 1090 + * CCCR_INTx = 0. 1091 + * 1092 + * We register the interrupt handler late so that we can handle any 1093 + * spurious interrupts, and also to avoid generation of that known 1094 + * spurious interrupt in the first place. 1095 + */ 1096 + ret = sdio_claim_irq(func, if_sdio_interrupt); 1097 + if (ret) 1098 + goto disable; 1080 1099 1081 1100 /* 1082 1101 * Enable interrupts now that everything is set up
+6 -4
drivers/ssb/driver_pcicore.c
··· 539 539 if (!pc->hostmode) 540 540 ssb_pcicore_init_clientmode(pc); 541 541 542 - /* Additional always once-executed workarounds */ 543 - ssb_pcicore_serdes_workaround(pc); 544 - /* TODO: ASPM */ 545 - /* TODO: Clock Request Update */ 542 + /* Additional PCIe always once-executed workarounds */ 543 + if (dev->id.coreid == SSB_DEV_PCIE) { 544 + ssb_pcicore_serdes_workaround(pc); 545 + /* TODO: ASPM */ 546 + /* TODO: Clock Request Update */ 547 + } 546 548 } 547 549 548 550 static u32 ssb_pcie_read(struct ssb_pcicore *pc, u32 address)
+4
net/mac80211/iface.c
··· 1145 1145 + IEEE80211_ENCRYPT_HEADROOM; 1146 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 1152 ieee80211_assign_perm_addr(local, ndev, type); 1149 1153 memcpy(ndev->dev_addr, ndev->perm_addr, ETH_ALEN); 1150 1154 SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));