aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-02-03 07:43:34 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-03 07:43:34 -0500
commita80f509f4a4f41ea8693733124470ad63a12664a (patch)
treeb32c1412837a0041800b1dfdc0abd65685b0bc71
parent246f19d194ec99ee8992106e129a133142dc6a10 (diff)
parent04a9e451fdbbfb84d6b87042b991f729f1c14249 (diff)
Merge branch 'fixes' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
-rw-r--r--drivers/net/wireless/ath5k/base.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c23
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-helpers.h3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c10
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c10
-rw-r--r--include/linux/ieee80211.h6
-rw-r--r--net/mac80211/Kconfig12
-rw-r--r--net/mac80211/ieee80211.c14
-rw-r--r--net/mac80211/rc80211_pid_algo.c2
-rw-r--r--net/mac80211/rc80211_simple.c2
-rw-r--r--net/mac80211/rx.c7
12 files changed, 69 insertions, 33 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index d6599d219193..ddc87149fe31 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -153,7 +153,7 @@ static int ath5k_pci_resume(struct pci_dev *pdev);
153#define ath5k_pci_resume NULL 153#define ath5k_pci_resume NULL
154#endif /* CONFIG_PM */ 154#endif /* CONFIG_PM */
155 155
156static struct pci_driver ath5k_pci_drv_id = { 156static struct pci_driver ath5k_pci_driver = {
157 .name = "ath5k_pci", 157 .name = "ath5k_pci",
158 .id_table = ath5k_pci_id_table, 158 .id_table = ath5k_pci_id_table,
159 .probe = ath5k_pci_probe, 159 .probe = ath5k_pci_probe,
@@ -329,7 +329,7 @@ init_ath5k_pci(void)
329 329
330 ath5k_debug_init(); 330 ath5k_debug_init();
331 331
332 ret = pci_register_driver(&ath5k_pci_drv_id); 332 ret = pci_register_driver(&ath5k_pci_driver);
333 if (ret) { 333 if (ret) {
334 printk(KERN_ERR "ath5k_pci: can't register pci driver\n"); 334 printk(KERN_ERR "ath5k_pci: can't register pci driver\n");
335 return ret; 335 return ret;
@@ -341,7 +341,7 @@ init_ath5k_pci(void)
341static void __exit 341static void __exit
342exit_ath5k_pci(void) 342exit_ath5k_pci(void)
343{ 343{
344 pci_unregister_driver(&ath5k_pci_drv_id); 344 pci_unregister_driver(&ath5k_pci_driver);
345 345
346 ath5k_debug_finish(); 346 ath5k_debug_finish();
347} 347}
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 4fdeb5323248..8d4d91d35fd2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -238,9 +238,10 @@ void iwl3945_hw_rx_statistics(struct iwl3945_priv *priv, struct iwl3945_rx_mem_b
238 priv->last_statistics_time = jiffies; 238 priv->last_statistics_time = jiffies;
239} 239}
240 240
241void iwl3945_add_radiotap(struct iwl3945_priv *priv, struct sk_buff *skb, 241static void iwl3945_add_radiotap(struct iwl3945_priv *priv,
242 struct iwl3945_rx_frame_hdr *rx_hdr, 242 struct sk_buff *skb,
243 struct ieee80211_rx_status *stats) 243 struct iwl3945_rx_frame_hdr *rx_hdr,
244 struct ieee80211_rx_status *stats)
244{ 245{
245 /* First cache any information we need before we overwrite 246 /* First cache any information we need before we overwrite
246 * the information provided in the skb from the hardware */ 247 * the information provided in the skb from the hardware */
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 569347ff377b..d727de8b96fe 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -4658,17 +4658,30 @@ void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index,
4658 struct ieee80211_ht_info *sta_ht_inf) 4658 struct ieee80211_ht_info *sta_ht_inf)
4659{ 4659{
4660 __le32 sta_flags; 4660 __le32 sta_flags;
4661 u8 mimo_ps_mode;
4661 4662
4662 if (!sta_ht_inf || !sta_ht_inf->ht_supported) 4663 if (!sta_ht_inf || !sta_ht_inf->ht_supported)
4663 goto done; 4664 goto done;
4664 4665
4666 mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_MIMO_PS) >> 2;
4667
4665 sta_flags = priv->stations[index].sta.station_flags; 4668 sta_flags = priv->stations[index].sta.station_flags;
4666 4669
4667 if (((sta_ht_inf->cap & IEEE80211_HT_CAP_MIMO_PS >> 2)) 4670 sta_flags &= ~(STA_FLG_RTS_MIMO_PROT_MSK | STA_FLG_MIMO_DIS_MSK);
4668 == IWL_MIMO_PS_DYNAMIC) 4671
4672 switch (mimo_ps_mode) {
4673 case WLAN_HT_CAP_MIMO_PS_STATIC:
4674 sta_flags |= STA_FLG_MIMO_DIS_MSK;
4675 break;
4676 case WLAN_HT_CAP_MIMO_PS_DYNAMIC:
4669 sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK; 4677 sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK;
4670 else 4678 break;
4671 sta_flags &= ~STA_FLG_RTS_MIMO_PROT_MSK; 4679 case WLAN_HT_CAP_MIMO_PS_DISABLED:
4680 break;
4681 default:
4682 IWL_WARNING("Invalid MIMO PS mode %d", mimo_ps_mode);
4683 break;
4684 }
4672 4685
4673 sta_flags |= cpu_to_le32( 4686 sta_flags |= cpu_to_le32(
4674 (u32)sta_ht_inf->ampdu_factor << STA_FLG_MAX_AGG_SIZE_POS); 4687 (u32)sta_ht_inf->ampdu_factor << STA_FLG_MAX_AGG_SIZE_POS);
@@ -4679,7 +4692,7 @@ void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index,
4679 if (iwl4965_is_fat_tx_allowed(priv, sta_ht_inf)) 4692 if (iwl4965_is_fat_tx_allowed(priv, sta_ht_inf))
4680 sta_flags |= STA_FLG_FAT_EN_MSK; 4693 sta_flags |= STA_FLG_FAT_EN_MSK;
4681 else 4694 else
4682 sta_flags &= (~STA_FLG_FAT_EN_MSK); 4695 sta_flags &= ~STA_FLG_FAT_EN_MSK;
4683 4696
4684 priv->stations[index].sta.station_flags = sta_flags; 4697 priv->stations[index].sta.station_flags = sta_flags;
4685 done: 4698 done:
diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h b/drivers/net/wireless/iwlwifi/iwl-helpers.h
index cb009f4c401f..8993cca81b40 100644
--- a/drivers/net/wireless/iwlwifi/iwl-helpers.h
+++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h
@@ -147,9 +147,6 @@ static inline struct ieee80211_conf *ieee80211_get_hw_conf(
147 147
148#define QOS_CONTROL_LEN 2 148#define QOS_CONTROL_LEN 2
149 149
150#define IEEE80211_STYPE_BACK_REQ 0x0080
151#define IEEE80211_STYPE_BACK 0x0090
152
153 150
154static inline int ieee80211_is_management(u16 fc) 151static inline int ieee80211_is_management(u16 fc)
155{ 152{
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 33239f197984..f55c75712b55 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -6330,6 +6330,11 @@ static int __iwl3945_up(struct iwl3945_priv *priv)
6330 return -ENODEV; 6330 return -ENODEV;
6331 } 6331 }
6332 6332
6333 if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) {
6334 IWL_ERROR("ucode not available for device bringup\n");
6335 return -EIO;
6336 }
6337
6333 /* If platform's RF_KILL switch is NOT set to KILL */ 6338 /* If platform's RF_KILL switch is NOT set to KILL */
6334 if (iwl3945_read32(priv, CSR_GP_CNTRL) & 6339 if (iwl3945_read32(priv, CSR_GP_CNTRL) &
6335 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) 6340 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
@@ -6342,11 +6347,6 @@ static int __iwl3945_up(struct iwl3945_priv *priv)
6342 } 6347 }
6343 } 6348 }
6344 6349
6345 if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) {
6346 IWL_ERROR("ucode not available for device bringup\n");
6347 return -EIO;
6348 }
6349
6350 iwl3945_write32(priv, CSR_INT, 0xFFFFFFFF); 6350 iwl3945_write32(priv, CSR_INT, 0xFFFFFFFF);
6351 6351
6352 rc = iwl3945_hw_nic_init(priv); 6352 rc = iwl3945_hw_nic_init(priv);
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index bf3a60c037aa..f423241b9567 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -6755,6 +6755,11 @@ static int __iwl4965_up(struct iwl4965_priv *priv)
6755 return -ENODEV; 6755 return -ENODEV;
6756 } 6756 }
6757 6757
6758 if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) {
6759 IWL_ERROR("ucode not available for device bringup\n");
6760 return -EIO;
6761 }
6762
6758 /* If platform's RF_KILL switch is NOT set to KILL */ 6763 /* If platform's RF_KILL switch is NOT set to KILL */
6759 if (iwl4965_read32(priv, CSR_GP_CNTRL) & 6764 if (iwl4965_read32(priv, CSR_GP_CNTRL) &
6760 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) 6765 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
@@ -6767,11 +6772,6 @@ static int __iwl4965_up(struct iwl4965_priv *priv)
6767 } 6772 }
6768 } 6773 }
6769 6774
6770 if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) {
6771 IWL_ERROR("ucode not available for device bringup\n");
6772 return -EIO;
6773 }
6774
6775 iwl4965_write32(priv, CSR_INT, 0xFFFFFFFF); 6775 iwl4965_write32(priv, CSR_INT, 0xFFFFFFFF);
6776 6776
6777 rc = iwl4965_hw_nic_init(priv); 6777 rc = iwl4965_hw_nic_init(priv);
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 5de6d911cdf7..f577c8f1c66d 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -287,6 +287,12 @@ struct ieee80211_ht_addt_info {
287#define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004 287#define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004
288#define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010 288#define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010
289 289
290/* MIMO Power Save Modes */
291#define WLAN_HT_CAP_MIMO_PS_STATIC 0
292#define WLAN_HT_CAP_MIMO_PS_DYNAMIC 1
293#define WLAN_HT_CAP_MIMO_PS_INVALID 2
294#define WLAN_HT_CAP_MIMO_PS_DISABLED 3
295
290/* Authentication algorithms */ 296/* Authentication algorithms */
291#define WLAN_AUTH_OPEN 0 297#define WLAN_AUTH_OPEN 0
292#define WLAN_AUTH_SHARED_KEY 1 298#define WLAN_AUTH_SHARED_KEY 1
diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig
index 09c255002e56..e77592d050ce 100644
--- a/net/mac80211/Kconfig
+++ b/net/mac80211/Kconfig
@@ -98,6 +98,18 @@ config MAC80211_DEBUGFS
98 98
99 Say N unless you know you need this. 99 Say N unless you know you need this.
100 100
101config MAC80211_DEBUG_PACKET_ALIGNMENT
102 bool "Enable packet alignment debugging"
103 depends on MAC80211
104 help
105 This option is recommended for driver authors and strongly
106 discouraged for everybody else, it will trigger a warning
107 when a driver hands mac80211 a buffer that is aligned in
108 a way that will cause problems with the IP stack on some
109 architectures.
110
111 Say N unless you're writing a mac80211 based driver.
112
101config MAC80211_DEBUG 113config MAC80211_DEBUG
102 bool "Enable debugging output" 114 bool "Enable debugging output"
103 depends on MAC80211 115 depends on MAC80211
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 5dcc2d61551f..67b7c75c430d 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -1344,17 +1344,17 @@ static int __init ieee80211_init(void)
1344 1344
1345 ret = rc80211_simple_init(); 1345 ret = rc80211_simple_init();
1346 if (ret) 1346 if (ret)
1347 goto fail; 1347 goto out;
1348 1348
1349 ret = rc80211_pid_init(); 1349 ret = rc80211_pid_init();
1350 if (ret) 1350 if (ret)
1351 goto fail_simple; 1351 goto out_cleanup_simple;
1352 1352
1353 ret = ieee80211_wme_register(); 1353 ret = ieee80211_wme_register();
1354 if (ret) { 1354 if (ret) {
1355 printk(KERN_DEBUG "ieee80211_init: failed to " 1355 printk(KERN_DEBUG "ieee80211_init: failed to "
1356 "initialize WME (err=%d)\n", ret); 1356 "initialize WME (err=%d)\n", ret);
1357 goto fail_pid; 1357 goto out_cleanup_pid;
1358 } 1358 }
1359 1359
1360 ieee80211_debugfs_netdev_init(); 1360 ieee80211_debugfs_netdev_init();
@@ -1362,11 +1362,11 @@ static int __init ieee80211_init(void)
1362 1362
1363 return 0; 1363 return 0;
1364 1364
1365 fail_pid: 1365 out_cleanup_pid:
1366 rc80211_simple_exit();
1367 fail_simple:
1368 rc80211_pid_exit(); 1366 rc80211_pid_exit();
1369 fail: 1367 out_cleanup_simple:
1368 rc80211_simple_exit();
1369 out:
1370 return ret; 1370 return ret;
1371} 1371}
1372 1372
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c
index 554c4baed6fb..c339571632b2 100644
--- a/net/mac80211/rc80211_pid_algo.c
+++ b/net/mac80211/rc80211_pid_algo.c
@@ -538,7 +538,7 @@ int __init rc80211_pid_init(void)
538 return ieee80211_rate_control_register(&mac80211_rcpid); 538 return ieee80211_rate_control_register(&mac80211_rcpid);
539} 539}
540 540
541void __exit rc80211_pid_exit(void) 541void rc80211_pid_exit(void)
542{ 542{
543 ieee80211_rate_control_unregister(&mac80211_rcpid); 543 ieee80211_rate_control_unregister(&mac80211_rcpid);
544} 544}
diff --git a/net/mac80211/rc80211_simple.c b/net/mac80211/rc80211_simple.c
index 934676d687d6..9a78b116acff 100644
--- a/net/mac80211/rc80211_simple.c
+++ b/net/mac80211/rc80211_simple.c
@@ -389,7 +389,7 @@ int __init rc80211_simple_init(void)
389 return ieee80211_rate_control_register(&mac80211_rcsimple); 389 return ieee80211_rate_control_register(&mac80211_rcsimple);
390} 390}
391 391
392void __exit rc80211_simple_exit(void) 392void rc80211_simple_exit(void)
393{ 393{
394 ieee80211_rate_control_unregister(&mac80211_rcsimple); 394 ieee80211_rate_control_unregister(&mac80211_rcsimple);
395} 395}
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index d44c87269bcb..535407d07fa4 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -340,11 +340,15 @@ static u32 ieee80211_rx_load_stats(struct ieee80211_local *local,
340 return load; 340 return load;
341} 341}
342 342
343#ifdef CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT
343static ieee80211_txrx_result 344static ieee80211_txrx_result
344ieee80211_rx_h_verify_ip_alignment(struct ieee80211_txrx_data *rx) 345ieee80211_rx_h_verify_ip_alignment(struct ieee80211_txrx_data *rx)
345{ 346{
346 int hdrlen; 347 int hdrlen;
347 348
349 if (!WLAN_FC_DATA_PRESENT(rx->fc))
350 return TXRX_CONTINUE;
351
348 /* 352 /*
349 * Drivers are required to align the payload data in a way that 353 * Drivers are required to align the payload data in a way that
350 * guarantees that the contained IP header is aligned to a four- 354 * guarantees that the contained IP header is aligned to a four-
@@ -371,11 +375,14 @@ ieee80211_rx_h_verify_ip_alignment(struct ieee80211_txrx_data *rx)
371 375
372 return TXRX_CONTINUE; 376 return TXRX_CONTINUE;
373} 377}
378#endif
374 379
375ieee80211_rx_handler ieee80211_rx_pre_handlers[] = 380ieee80211_rx_handler ieee80211_rx_pre_handlers[] =
376{ 381{
377 ieee80211_rx_h_parse_qos, 382 ieee80211_rx_h_parse_qos,
383#ifdef CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT
378 ieee80211_rx_h_verify_ip_alignment, 384 ieee80211_rx_h_verify_ip_alignment,
385#endif
379 NULL 386 NULL
380}; 387};
381 388