aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-08-21 16:00:21 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-08-21 16:00:21 -0400
commit01e17dacd47101ad7d33152bbfbbd4394352d2e6 (patch)
treed94706b87fcad04d08a46a9b3555396d21ab41ec /drivers/net/wireless/iwlegacy
parent22c5649eef0fc37532e20c14d2656b28ca708a69 (diff)
parentdcf33963c48e1959c83fda84e336dbb000eefa3f (diff)
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Conflicts: drivers/net/wireless/mac80211_hwsim.c
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
3 files changed, 29 insertions, 17 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,