aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 16:38:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 16:38:27 -0400
commitaecdc33e111b2c447b622e287c6003726daa1426 (patch)
tree3e7657eae4b785e1a1fb5dfb225dbae0b2f0cfc6 /drivers/net/wireless/iwlegacy
parenta20acf99f75e49271381d65db097c9763060a1e8 (diff)
parenta3a6cab5ea10cca64d036851fe0d932448f2fe4f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David Miller: 1) GRE now works over ipv6, from Dmitry Kozlov. 2) Make SCTP more network namespace aware, from Eric Biederman. 3) TEAM driver now works with non-ethernet devices, from Jiri Pirko. 4) Make openvswitch network namespace aware, from Pravin B Shelar. 5) IPV6 NAT implementation, from Patrick McHardy. 6) Server side support for TCP Fast Open, from Jerry Chu and others. 7) Packet BPF filter supports MOD and XOR, from Eric Dumazet and Daniel Borkmann. 8) Increate the loopback default MTU to 64K, from Eric Dumazet. 9) Use a per-task rather than per-socket page fragment allocator for outgoing networking traffic. This benefits processes that have very many mostly idle sockets, which is quite common. From Eric Dumazet. 10) Use up to 32K for page fragment allocations, with fallbacks to smaller sizes when higher order page allocations fail. Benefits are a) less segments for driver to process b) less calls to page allocator c) less waste of space. From Eric Dumazet. 11) Allow GRO to be used on GRE tunnels, from Eric Dumazet. 12) VXLAN device driver, one way to handle VLAN issues such as the limitation of 4096 VLAN IDs yet still have some level of isolation. From Stephen Hemminger. 13) As usual there is a large boatload of driver changes, with the scale perhaps tilted towards the wireless side this time around. Fix up various fairly trivial conflicts, mostly caused by the user namespace changes. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1012 commits) hyperv: Add buffer for extended info after the RNDIS response message. hyperv: Report actual status in receive completion packet hyperv: Remove extra allocated space for recv_pkt_list elements hyperv: Fix page buffer handling in rndis_filter_send_request() hyperv: Fix the missing return value in rndis_filter_set_packet_filter() hyperv: Fix the max_xfer_size in RNDIS initialization vxlan: put UDP socket in correct namespace vxlan: Depend on CONFIG_INET sfc: Fix the reported priorities of different filter types sfc: Remove EFX_FILTER_FLAG_RX_OVERRIDE_IP sfc: Fix loopback self-test with separate_tx_channels=1 sfc: Fix MCDI structure field lookup sfc: Add parentheses around use of bitfield macro arguments sfc: Fix null function pointer in efx_sriov_channel_type vxlan: virtual extensible lan igmp: export symbol ip_mc_leave_group netlink: add attributes to fdb interface tg3: unconditionally select HWMON support when tg3 is enabled. Revert "net: ti cpsw ethernet: allow reading phy interface mode from DT" gre: fix sparse warning ...
Diffstat (limited to 'drivers/net/wireless/iwlegacy')
-rw-r--r--drivers/net/wireless/iwlegacy/3945-mac.c12
-rw-r--r--drivers/net/wireless/iwlegacy/4965-mac.c26
-rw-r--r--drivers/net/wireless/iwlegacy/4965.h8
-rw-r--r--drivers/net/wireless/iwlegacy/common.c19
-rw-r--r--drivers/net/wireless/iwlegacy/common.h2
5 files changed, 34 insertions, 33 deletions
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index faec40467208..e252acb9c862 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -460,7 +460,9 @@ il3945_build_tx_cmd_basic(struct il_priv *il, struct il_device_cmd *cmd,
460 * start C_TX command process 460 * start C_TX command process
461 */ 461 */
462static int 462static int
463il3945_tx_skb(struct il_priv *il, struct sk_buff *skb) 463il3945_tx_skb(struct il_priv *il,
464 struct ieee80211_sta *sta,
465 struct sk_buff *skb)
464{ 466{
465 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 467 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
466 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 468 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -512,7 +514,7 @@ il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
512 hdr_len = ieee80211_hdrlen(fc); 514 hdr_len = ieee80211_hdrlen(fc);
513 515
514 /* Find idx into station table for destination station */ 516 /* Find idx into station table for destination station */
515 sta_id = il_sta_id_or_broadcast(il, info->control.sta); 517 sta_id = il_sta_id_or_broadcast(il, sta);
516 if (sta_id == IL_INVALID_STATION) { 518 if (sta_id == IL_INVALID_STATION) {
517 D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1); 519 D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1);
518 goto drop; 520 goto drop;
@@ -2859,7 +2861,9 @@ il3945_mac_stop(struct ieee80211_hw *hw)
2859} 2861}
2860 2862
2861static void 2863static void
2862il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 2864il3945_mac_tx(struct ieee80211_hw *hw,
2865 struct ieee80211_tx_control *control,
2866 struct sk_buff *skb)
2863{ 2867{
2864 struct il_priv *il = hw->priv; 2868 struct il_priv *il = hw->priv;
2865 2869
@@ -2868,7 +2872,7 @@ il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
2868 D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, 2872 D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
2869 ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); 2873 ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
2870 2874
2871 if (il3945_tx_skb(il, skb)) 2875 if (il3945_tx_skb(il, control->sta, skb))
2872 dev_kfree_skb_any(skb); 2876 dev_kfree_skb_any(skb);
2873 2877
2874 D_MAC80211("leave\n"); 2878 D_MAC80211("leave\n");
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 34f61a0581a2..eac4dc8bc879 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -1526,8 +1526,11 @@ il4965_tx_cmd_build_basic(struct il_priv *il, struct sk_buff *skb,
1526} 1526}
1527 1527
1528static void 1528static void
1529il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd, 1529il4965_tx_cmd_build_rate(struct il_priv *il,
1530 struct ieee80211_tx_info *info, __le16 fc) 1530 struct il_tx_cmd *tx_cmd,
1531 struct ieee80211_tx_info *info,
1532 struct ieee80211_sta *sta,
1533 __le16 fc)
1531{ 1534{
1532 const u8 rts_retry_limit = 60; 1535 const u8 rts_retry_limit = 60;
1533 u32 rate_flags; 1536 u32 rate_flags;
@@ -1561,9 +1564,7 @@ il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd,
1561 rate_idx = info->control.rates[0].idx; 1564 rate_idx = info->control.rates[0].idx;
1562 if ((info->control.rates[0].flags & IEEE80211_TX_RC_MCS) || rate_idx < 0 1565 if ((info->control.rates[0].flags & IEEE80211_TX_RC_MCS) || rate_idx < 0
1563 || rate_idx > RATE_COUNT_LEGACY) 1566 || rate_idx > RATE_COUNT_LEGACY)
1564 rate_idx = 1567 rate_idx = rate_lowest_index(&il->bands[info->band], sta);
1565 rate_lowest_index(&il->bands[info->band],
1566 info->control.sta);
1567 /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ 1568 /* For 5 GHZ band, remap mac80211 rate indices into driver indices */
1568 if (info->band == IEEE80211_BAND_5GHZ) 1569 if (info->band == IEEE80211_BAND_5GHZ)
1569 rate_idx += IL_FIRST_OFDM_RATE; 1570 rate_idx += IL_FIRST_OFDM_RATE;
@@ -1630,11 +1631,12 @@ il4965_tx_cmd_build_hwcrypto(struct il_priv *il, struct ieee80211_tx_info *info,
1630 * start C_TX command process 1631 * start C_TX command process
1631 */ 1632 */
1632int 1633int
1633il4965_tx_skb(struct il_priv *il, struct sk_buff *skb) 1634il4965_tx_skb(struct il_priv *il,
1635 struct ieee80211_sta *sta,
1636 struct sk_buff *skb)
1634{ 1637{
1635 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 1638 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
1636 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 1639 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
1637 struct ieee80211_sta *sta = info->control.sta;
1638 struct il_station_priv *sta_priv = NULL; 1640 struct il_station_priv *sta_priv = NULL;
1639 struct il_tx_queue *txq; 1641 struct il_tx_queue *txq;
1640 struct il_queue *q; 1642 struct il_queue *q;
@@ -1680,7 +1682,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
1680 sta_id = il->hw_params.bcast_id; 1682 sta_id = il->hw_params.bcast_id;
1681 else { 1683 else {
1682 /* Find idx into station table for destination station */ 1684 /* Find idx into station table for destination station */
1683 sta_id = il_sta_id_or_broadcast(il, info->control.sta); 1685 sta_id = il_sta_id_or_broadcast(il, sta);
1684 1686
1685 if (sta_id == IL_INVALID_STATION) { 1687 if (sta_id == IL_INVALID_STATION) {
1686 D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1); 1688 D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1);
@@ -1786,7 +1788,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
1786 /* TODO need this for burst mode later on */ 1788 /* TODO need this for burst mode later on */
1787 il4965_tx_cmd_build_basic(il, skb, tx_cmd, info, hdr, sta_id); 1789 il4965_tx_cmd_build_basic(il, skb, tx_cmd, info, hdr, sta_id);
1788 1790
1789 il4965_tx_cmd_build_rate(il, tx_cmd, info, fc); 1791 il4965_tx_cmd_build_rate(il, tx_cmd, info, sta, fc);
1790 1792
1791 il_update_stats(il, true, fc, len); 1793 il_update_stats(il, true, fc, len);
1792 /* 1794 /*
@@ -5828,7 +5830,9 @@ il4965_mac_stop(struct ieee80211_hw *hw)
5828} 5830}
5829 5831
5830void 5832void
5831il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 5833il4965_mac_tx(struct ieee80211_hw *hw,
5834 struct ieee80211_tx_control *control,
5835 struct sk_buff *skb)
5832{ 5836{
5833 struct il_priv *il = hw->priv; 5837 struct il_priv *il = hw->priv;
5834 5838
@@ -5837,7 +5841,7 @@ il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
5837 D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, 5841 D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
5838 ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); 5842 ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
5839 5843
5840 if (il4965_tx_skb(il, skb)) 5844 if (il4965_tx_skb(il, control->sta, skb))
5841 dev_kfree_skb_any(skb); 5845 dev_kfree_skb_any(skb);
5842 5846
5843 D_MACDUMP("leave\n"); 5847 D_MACDUMP("leave\n");
diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h
index 1db677689cfe..2d092f328547 100644
--- a/drivers/net/wireless/iwlegacy/4965.h
+++ b/drivers/net/wireless/iwlegacy/4965.h
@@ -78,7 +78,9 @@ int il4965_hw_txq_attach_buf_to_tfd(struct il_priv *il, struct il_tx_queue *txq,
78int il4965_hw_tx_queue_init(struct il_priv *il, struct il_tx_queue *txq); 78int il4965_hw_tx_queue_init(struct il_priv *il, struct il_tx_queue *txq);
79void il4965_hwrate_to_tx_control(struct il_priv *il, u32 rate_n_flags, 79void il4965_hwrate_to_tx_control(struct il_priv *il, u32 rate_n_flags,
80 struct ieee80211_tx_info *info); 80 struct ieee80211_tx_info *info);
81int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb); 81int il4965_tx_skb(struct il_priv *il,
82 struct ieee80211_sta *sta,
83 struct sk_buff *skb);
82int il4965_tx_agg_start(struct il_priv *il, struct ieee80211_vif *vif, 84int il4965_tx_agg_start(struct il_priv *il, struct ieee80211_vif *vif,
83 struct ieee80211_sta *sta, u16 tid, u16 * ssn); 85 struct ieee80211_sta *sta, u16 tid, u16 * ssn);
84int il4965_tx_agg_stop(struct il_priv *il, struct ieee80211_vif *vif, 86int il4965_tx_agg_stop(struct il_priv *il, struct ieee80211_vif *vif,
@@ -163,7 +165,9 @@ void il4965_eeprom_release_semaphore(struct il_priv *il);
163int il4965_eeprom_check_version(struct il_priv *il); 165int il4965_eeprom_check_version(struct il_priv *il);
164 166
165/* mac80211 handlers (for 4965) */ 167/* mac80211 handlers (for 4965) */
166void il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb); 168void il4965_mac_tx(struct ieee80211_hw *hw,
169 struct ieee80211_tx_control *control,
170 struct sk_buff *skb);
167int il4965_mac_start(struct ieee80211_hw *hw); 171int il4965_mac_start(struct ieee80211_hw *hw);
168void il4965_mac_stop(struct ieee80211_hw *hw); 172void il4965_mac_stop(struct ieee80211_hw *hw);
169void il4965_configure_filter(struct ieee80211_hw *hw, 173void il4965_configure_filter(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
index 0370403fd0bd..318ed3c9fe74 100644
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -1586,9 +1586,9 @@ il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame,
1586 return 0; 1586 return 0;
1587 1587
1588 frame->frame_control = cpu_to_le16(IEEE80211_STYPE_PROBE_REQ); 1588 frame->frame_control = cpu_to_le16(IEEE80211_STYPE_PROBE_REQ);
1589 memcpy(frame->da, il_bcast_addr, ETH_ALEN); 1589 eth_broadcast_addr(frame->da);
1590 memcpy(frame->sa, ta, ETH_ALEN); 1590 memcpy(frame->sa, ta, ETH_ALEN);
1591 memcpy(frame->bssid, il_bcast_addr, ETH_ALEN); 1591 eth_broadcast_addr(frame->bssid);
1592 frame->seq_ctrl = 0; 1592 frame->seq_ctrl = 0;
1593 1593
1594 len += 24; 1594 len += 24;
@@ -4860,7 +4860,7 @@ EXPORT_SYMBOL(il_add_beacon_time);
4860 4860
4861#ifdef CONFIG_PM 4861#ifdef CONFIG_PM
4862 4862
4863int 4863static int
4864il_pci_suspend(struct device *device) 4864il_pci_suspend(struct device *device)
4865{ 4865{
4866 struct pci_dev *pdev = to_pci_dev(device); 4866 struct pci_dev *pdev = to_pci_dev(device);
@@ -4877,9 +4877,8 @@ il_pci_suspend(struct device *device)
4877 4877
4878 return 0; 4878 return 0;
4879} 4879}
4880EXPORT_SYMBOL(il_pci_suspend);
4881 4880
4882int 4881static int
4883il_pci_resume(struct device *device) 4882il_pci_resume(struct device *device)
4884{ 4883{
4885 struct pci_dev *pdev = to_pci_dev(device); 4884 struct pci_dev *pdev = to_pci_dev(device);
@@ -4906,16 +4905,8 @@ il_pci_resume(struct device *device)
4906 4905
4907 return 0; 4906 return 0;
4908} 4907}
4909EXPORT_SYMBOL(il_pci_resume);
4910 4908
4911const struct dev_pm_ops il_pm_ops = { 4909SIMPLE_DEV_PM_OPS(il_pm_ops, il_pci_suspend, il_pci_resume);
4912 .suspend = il_pci_suspend,
4913 .resume = il_pci_resume,
4914 .freeze = il_pci_suspend,
4915 .thaw = il_pci_resume,
4916 .poweroff = il_pci_suspend,
4917 .restore = il_pci_resume,
4918};
4919EXPORT_SYMBOL(il_pm_ops); 4910EXPORT_SYMBOL(il_pm_ops);
4920 4911
4921#endif /* CONFIG_PM */ 4912#endif /* CONFIG_PM */
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index 724682669060..b4bb813362bd 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -1843,8 +1843,6 @@ __le32 il_add_beacon_time(struct il_priv *il, u32 base, u32 addon,
1843 u32 beacon_interval); 1843 u32 beacon_interval);
1844 1844
1845#ifdef CONFIG_PM 1845#ifdef CONFIG_PM
1846int il_pci_suspend(struct device *device);
1847int il_pci_resume(struct device *device);
1848extern const struct dev_pm_ops il_pm_ops; 1846extern const struct dev_pm_ops il_pm_ops;
1849 1847
1850#define IL_LEGACY_PM_OPS (&il_pm_ops) 1848#define IL_LEGACY_PM_OPS (&il_pm_ops)