diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-06-29 12:07:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-29 12:07:37 -0400 |
commit | 42fb0b0278e6b9a44bee8adec051de5f43e10b2b (patch) | |
tree | f53513819d11445385346cf75be05054dae3438d /drivers/net/wireless/ath | |
parent | 34202e28fe7fc8551313f9a035a8857db83de757 (diff) | |
parent | c9015b24b262bc7ea56cfd5d78983a73fb5ebd7d (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 31 | ||||
-rw-r--r-- | drivers/net/wireless/ath/key.c | 4 |
8 files changed, 46 insertions, 23 deletions
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h index c54b7d37bff1..420d69b2674c 100644 --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h | |||
@@ -143,6 +143,7 @@ struct ath_common { | |||
143 | u32 keymax; | 143 | u32 keymax; |
144 | DECLARE_BITMAP(keymap, ATH_KEYMAX); | 144 | DECLARE_BITMAP(keymap, ATH_KEYMAX); |
145 | DECLARE_BITMAP(tkip_keymap, ATH_KEYMAX); | 145 | DECLARE_BITMAP(tkip_keymap, ATH_KEYMAX); |
146 | DECLARE_BITMAP(ccmp_keymap, ATH_KEYMAX); | ||
146 | enum ath_crypt_caps crypt_caps; | 147 | enum ath_crypt_caps crypt_caps; |
147 | 148 | ||
148 | unsigned int clockrate; | 149 | unsigned int clockrate; |
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index fbaa30930076..44ad6fe0278f 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -1045,11 +1045,11 @@ ath5k_drain_tx_buffs(struct ath5k_hw *ah) | |||
1045 | 1045 | ||
1046 | ath5k_txbuf_free_skb(ah, bf); | 1046 | ath5k_txbuf_free_skb(ah, bf); |
1047 | 1047 | ||
1048 | spin_lock_bh(&ah->txbuflock); | 1048 | spin_lock(&ah->txbuflock); |
1049 | list_move_tail(&bf->list, &ah->txbuf); | 1049 | list_move_tail(&bf->list, &ah->txbuf); |
1050 | ah->txbuf_len++; | 1050 | ah->txbuf_len++; |
1051 | txq->txq_len--; | 1051 | txq->txq_len--; |
1052 | spin_unlock_bh(&ah->txbuflock); | 1052 | spin_unlock(&ah->txbuflock); |
1053 | } | 1053 | } |
1054 | txq->link = NULL; | 1054 | txq->link = NULL; |
1055 | txq->txq_poll_mark = false; | 1055 | txq->txq_poll_mark = false; |
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 4473278efc5e..fe39eb4c42a1 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -214,6 +214,7 @@ struct ath_frame_info { | |||
214 | enum ath9k_key_type keytype; | 214 | enum ath9k_key_type keytype; |
215 | u8 keyix; | 215 | u8 keyix; |
216 | u8 retries; | 216 | u8 retries; |
217 | u8 rtscts_rate; | ||
217 | }; | 218 | }; |
218 | 219 | ||
219 | struct ath_buf_state { | 220 | struct ath_buf_state { |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index fc8cd8284108..374c32ed905a 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -1486,6 +1486,7 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw, | |||
1486 | priv->num_sta_assoc_vif++ : priv->num_sta_assoc_vif--; | 1486 | priv->num_sta_assoc_vif++ : priv->num_sta_assoc_vif--; |
1487 | 1487 | ||
1488 | if (priv->ah->opmode == NL80211_IFTYPE_STATION) { | 1488 | if (priv->ah->opmode == NL80211_IFTYPE_STATION) { |
1489 | ath9k_htc_choose_set_bssid(priv); | ||
1489 | if (bss_conf->assoc && (priv->num_sta_assoc_vif == 1)) | 1490 | if (bss_conf->assoc && (priv->num_sta_assoc_vif == 1)) |
1490 | ath9k_htc_start_ani(priv); | 1491 | ath9k_htc_start_ani(priv); |
1491 | else if (priv->num_sta_assoc_vif == 0) | 1492 | else if (priv->num_sta_assoc_vif == 0) |
@@ -1493,13 +1494,11 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw, | |||
1493 | } | 1494 | } |
1494 | } | 1495 | } |
1495 | 1496 | ||
1496 | if (changed & BSS_CHANGED_BSSID) { | 1497 | if (changed & BSS_CHANGED_IBSS) { |
1497 | if (priv->ah->opmode == NL80211_IFTYPE_ADHOC) { | 1498 | if (priv->ah->opmode == NL80211_IFTYPE_ADHOC) { |
1498 | common->curaid = bss_conf->aid; | 1499 | common->curaid = bss_conf->aid; |
1499 | memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); | 1500 | memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); |
1500 | ath9k_htc_set_bssid(priv); | 1501 | ath9k_htc_set_bssid(priv); |
1501 | } else if (priv->ah->opmode == NL80211_IFTYPE_STATION) { | ||
1502 | ath9k_htc_choose_set_bssid(priv); | ||
1503 | } | 1502 | } |
1504 | } | 1503 | } |
1505 | 1504 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 784baee5db84..ebfb2a3c645c 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -614,7 +614,7 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
614 | 614 | ||
615 | if (NR_CPUS > 1 && ah->config.serialize_regmode == SER_REG_MODE_AUTO) { | 615 | if (NR_CPUS > 1 && ah->config.serialize_regmode == SER_REG_MODE_AUTO) { |
616 | if (ah->hw_version.macVersion == AR_SREV_VERSION_5416_PCI || | 616 | if (ah->hw_version.macVersion == AR_SREV_VERSION_5416_PCI || |
617 | ((AR_SREV_9160(ah) || AR_SREV_9280(ah)) && | 617 | ((AR_SREV_9160(ah) || AR_SREV_9280(ah) || AR_SREV_9287(ah)) && |
618 | !ah->is_pciexpress)) { | 618 | !ah->is_pciexpress)) { |
619 | ah->config.serialize_regmode = | 619 | ah->config.serialize_regmode = |
620 | SER_REG_MODE_ON; | 620 | SER_REG_MODE_ON; |
@@ -773,13 +773,25 @@ static void ath9k_hw_init_qos(struct ath_hw *ah) | |||
773 | 773 | ||
774 | u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah) | 774 | u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah) |
775 | { | 775 | { |
776 | struct ath_common *common = ath9k_hw_common(ah); | ||
777 | int i = 0; | ||
778 | |||
776 | REG_CLR_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); | 779 | REG_CLR_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); |
777 | udelay(100); | 780 | udelay(100); |
778 | REG_SET_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); | 781 | REG_SET_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); |
779 | 782 | ||
780 | while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) | 783 | while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) { |
784 | |||
781 | udelay(100); | 785 | udelay(100); |
782 | 786 | ||
787 | if (WARN_ON_ONCE(i >= 100)) { | ||
788 | ath_err(common, "PLL4 meaurement not done\n"); | ||
789 | break; | ||
790 | } | ||
791 | |||
792 | i++; | ||
793 | } | ||
794 | |||
783 | return (REG_READ(ah, PLL3) & SQSUM_DVC_MASK) >> 3; | 795 | return (REG_READ(ah, PLL3) & SQSUM_DVC_MASK) >> 3; |
784 | } | 796 | } |
785 | EXPORT_SYMBOL(ar9003_get_pll_sqsum_dvc); | 797 | EXPORT_SYMBOL(ar9003_get_pll_sqsum_dvc); |
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index fbdcc80437fe..6a7dd26f2a13 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -658,9 +658,9 @@ static bool ath_edma_get_buffers(struct ath_softc *sc, | |||
658 | __skb_unlink(skb, &rx_edma->rx_fifo); | 658 | __skb_unlink(skb, &rx_edma->rx_fifo); |
659 | list_add_tail(&bf->list, &sc->rx.rxbuf); | 659 | list_add_tail(&bf->list, &sc->rx.rxbuf); |
660 | ath_rx_edma_buf_link(sc, qtype); | 660 | ath_rx_edma_buf_link(sc, qtype); |
661 | } else { | ||
662 | bf = NULL; | ||
663 | } | 661 | } |
662 | |||
663 | bf = NULL; | ||
664 | } | 664 | } |
665 | 665 | ||
666 | *dest = bf; | 666 | *dest = bf; |
@@ -785,7 +785,8 @@ static bool ath9k_rx_accept(struct ath_common *common, | |||
785 | * descriptor does contain a valid key index. This has been observed | 785 | * descriptor does contain a valid key index. This has been observed |
786 | * mostly with CCMP encryption. | 786 | * mostly with CCMP encryption. |
787 | */ | 787 | */ |
788 | if (rx_stats->rs_keyix == ATH9K_RXKEYIX_INVALID) | 788 | if (rx_stats->rs_keyix == ATH9K_RXKEYIX_INVALID || |
789 | !test_bit(rx_stats->rs_keyix, common->ccmp_keymap)) | ||
789 | rx_stats->rs_status &= ~ATH9K_RXERR_KEYMISS; | 790 | rx_stats->rs_status &= ~ATH9K_RXERR_KEYMISS; |
790 | 791 | ||
791 | if (!rx_stats->rs_datalen) { | 792 | if (!rx_stats->rs_datalen) { |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 2afc5e289df5..cafb4a09729a 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -938,6 +938,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, | |||
938 | struct ieee80211_tx_rate *rates; | 938 | struct ieee80211_tx_rate *rates; |
939 | const struct ieee80211_rate *rate; | 939 | const struct ieee80211_rate *rate; |
940 | struct ieee80211_hdr *hdr; | 940 | struct ieee80211_hdr *hdr; |
941 | struct ath_frame_info *fi = get_frame_info(bf->bf_mpdu); | ||
941 | int i; | 942 | int i; |
942 | u8 rix = 0; | 943 | u8 rix = 0; |
943 | 944 | ||
@@ -948,18 +949,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, | |||
948 | 949 | ||
949 | /* set dur_update_en for l-sig computation except for PS-Poll frames */ | 950 | /* set dur_update_en for l-sig computation except for PS-Poll frames */ |
950 | info->dur_update = !ieee80211_is_pspoll(hdr->frame_control); | 951 | info->dur_update = !ieee80211_is_pspoll(hdr->frame_control); |
951 | 952 | info->rtscts_rate = fi->rtscts_rate; | |
952 | /* | ||
953 | * We check if Short Preamble is needed for the CTS rate by | ||
954 | * checking the BSS's global flag. | ||
955 | * But for the rate series, IEEE80211_TX_RC_USE_SHORT_PREAMBLE is used. | ||
956 | */ | ||
957 | rate = ieee80211_get_rts_cts_rate(sc->hw, tx_info); | ||
958 | info->rtscts_rate = rate->hw_value; | ||
959 | |||
960 | if (tx_info->control.vif && | ||
961 | tx_info->control.vif->bss_conf.use_short_preamble) | ||
962 | info->rtscts_rate |= rate->hw_value_short; | ||
963 | 953 | ||
964 | for (i = 0; i < 4; i++) { | 954 | for (i = 0; i < 4; i++) { |
965 | bool is_40, is_sgi, is_sp; | 955 | bool is_40, is_sgi, is_sp; |
@@ -1001,13 +991,13 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, | |||
1001 | } | 991 | } |
1002 | 992 | ||
1003 | /* legacy rates */ | 993 | /* legacy rates */ |
994 | rate = &sc->sbands[tx_info->band].bitrates[rates[i].idx]; | ||
1004 | if ((tx_info->band == IEEE80211_BAND_2GHZ) && | 995 | if ((tx_info->band == IEEE80211_BAND_2GHZ) && |
1005 | !(rate->flags & IEEE80211_RATE_ERP_G)) | 996 | !(rate->flags & IEEE80211_RATE_ERP_G)) |
1006 | phy = WLAN_RC_PHY_CCK; | 997 | phy = WLAN_RC_PHY_CCK; |
1007 | else | 998 | else |
1008 | phy = WLAN_RC_PHY_OFDM; | 999 | phy = WLAN_RC_PHY_OFDM; |
1009 | 1000 | ||
1010 | rate = &sc->sbands[tx_info->band].bitrates[rates[i].idx]; | ||
1011 | info->rates[i].Rate = rate->hw_value; | 1001 | info->rates[i].Rate = rate->hw_value; |
1012 | if (rate->hw_value_short) { | 1002 | if (rate->hw_value_short) { |
1013 | if (rates[i].flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) | 1003 | if (rates[i].flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) |
@@ -1788,10 +1778,22 @@ static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1788 | struct ieee80211_sta *sta = tx_info->control.sta; | 1778 | struct ieee80211_sta *sta = tx_info->control.sta; |
1789 | struct ieee80211_key_conf *hw_key = tx_info->control.hw_key; | 1779 | struct ieee80211_key_conf *hw_key = tx_info->control.hw_key; |
1790 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | 1780 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
1781 | const struct ieee80211_rate *rate; | ||
1791 | struct ath_frame_info *fi = get_frame_info(skb); | 1782 | struct ath_frame_info *fi = get_frame_info(skb); |
1792 | struct ath_node *an = NULL; | 1783 | struct ath_node *an = NULL; |
1793 | enum ath9k_key_type keytype; | 1784 | enum ath9k_key_type keytype; |
1785 | bool short_preamble = false; | ||
1786 | |||
1787 | /* | ||
1788 | * We check if Short Preamble is needed for the CTS rate by | ||
1789 | * checking the BSS's global flag. | ||
1790 | * But for the rate series, IEEE80211_TX_RC_USE_SHORT_PREAMBLE is used. | ||
1791 | */ | ||
1792 | if (tx_info->control.vif && | ||
1793 | tx_info->control.vif->bss_conf.use_short_preamble) | ||
1794 | short_preamble = true; | ||
1794 | 1795 | ||
1796 | rate = ieee80211_get_rts_cts_rate(hw, tx_info); | ||
1795 | keytype = ath9k_cmn_get_hw_crypto_keytype(skb); | 1797 | keytype = ath9k_cmn_get_hw_crypto_keytype(skb); |
1796 | 1798 | ||
1797 | if (sta) | 1799 | if (sta) |
@@ -1806,6 +1808,9 @@ static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1806 | fi->keyix = ATH9K_TXKEYIX_INVALID; | 1808 | fi->keyix = ATH9K_TXKEYIX_INVALID; |
1807 | fi->keytype = keytype; | 1809 | fi->keytype = keytype; |
1808 | fi->framelen = framelen; | 1810 | fi->framelen = framelen; |
1811 | fi->rtscts_rate = rate->hw_value; | ||
1812 | if (short_preamble) | ||
1813 | fi->rtscts_rate |= rate->hw_value_short; | ||
1809 | } | 1814 | } |
1810 | 1815 | ||
1811 | u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate) | 1816 | u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate) |
diff --git a/drivers/net/wireless/ath/key.c b/drivers/net/wireless/ath/key.c index 0e81904956cf..5c54aa43ca2d 100644 --- a/drivers/net/wireless/ath/key.c +++ b/drivers/net/wireless/ath/key.c | |||
@@ -556,6 +556,9 @@ int ath_key_config(struct ath_common *common, | |||
556 | return -EIO; | 556 | return -EIO; |
557 | 557 | ||
558 | set_bit(idx, common->keymap); | 558 | set_bit(idx, common->keymap); |
559 | if (key->cipher == WLAN_CIPHER_SUITE_CCMP) | ||
560 | set_bit(idx, common->ccmp_keymap); | ||
561 | |||
559 | if (key->cipher == WLAN_CIPHER_SUITE_TKIP) { | 562 | if (key->cipher == WLAN_CIPHER_SUITE_TKIP) { |
560 | set_bit(idx + 64, common->keymap); | 563 | set_bit(idx + 64, common->keymap); |
561 | set_bit(idx, common->tkip_keymap); | 564 | set_bit(idx, common->tkip_keymap); |
@@ -582,6 +585,7 @@ void ath_key_delete(struct ath_common *common, struct ieee80211_key_conf *key) | |||
582 | return; | 585 | return; |
583 | 586 | ||
584 | clear_bit(key->hw_key_idx, common->keymap); | 587 | clear_bit(key->hw_key_idx, common->keymap); |
588 | clear_bit(key->hw_key_idx, common->ccmp_keymap); | ||
585 | if (key->cipher != WLAN_CIPHER_SUITE_TKIP) | 589 | if (key->cipher != WLAN_CIPHER_SUITE_TKIP) |
586 | return; | 590 | return; |
587 | 591 | ||