diff options
108 files changed, 6014 insertions, 1642 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index aa835f7c97d8..2424699364fe 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -5053,7 +5053,7 @@ L: linux-wireless@vger.kernel.org | |||
| 5053 | W: http://linuxwireless.org/ | 5053 | W: http://linuxwireless.org/ |
| 5054 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git | 5054 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git |
| 5055 | S: Maintained | 5055 | S: Maintained |
| 5056 | F: drivers/net/wireless/rtl818x/rtl8180* | 5056 | F: drivers/net/wireless/rtl818x/rtl8180/ |
| 5057 | 5057 | ||
| 5058 | RTL8187 WIRELESS DRIVER | 5058 | RTL8187 WIRELESS DRIVER |
| 5059 | M: Herton Ronaldo Krzesinski <herton@mandriva.com.br> | 5059 | M: Herton Ronaldo Krzesinski <herton@mandriva.com.br> |
| @@ -5063,7 +5063,7 @@ L: linux-wireless@vger.kernel.org | |||
| 5063 | W: http://linuxwireless.org/ | 5063 | W: http://linuxwireless.org/ |
| 5064 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git | 5064 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git |
| 5065 | S: Maintained | 5065 | S: Maintained |
| 5066 | F: drivers/net/wireless/rtl818x/rtl8187* | 5066 | F: drivers/net/wireless/rtl818x/rtl8187/ |
| 5067 | 5067 | ||
| 5068 | RTL8192CE WIRELESS DRIVER | 5068 | RTL8192CE WIRELESS DRIVER |
| 5069 | M: Larry Finger <Larry.Finger@lwfinger.net> | 5069 | M: Larry Finger <Larry.Finger@lwfinger.net> |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index a36e7870b03e..57a79b0475f6 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
| @@ -4652,24 +4652,18 @@ static ssize_t proc_write( struct file *file, | |||
| 4652 | size_t len, | 4652 | size_t len, |
| 4653 | loff_t *offset ) | 4653 | loff_t *offset ) |
| 4654 | { | 4654 | { |
| 4655 | loff_t pos = *offset; | 4655 | ssize_t ret; |
| 4656 | struct proc_data *priv = file->private_data; | 4656 | struct proc_data *priv = file->private_data; |
| 4657 | 4657 | ||
| 4658 | if (!priv->wbuffer) | 4658 | if (!priv->wbuffer) |
| 4659 | return -EINVAL; | 4659 | return -EINVAL; |
| 4660 | 4660 | ||
| 4661 | if (pos < 0) | 4661 | ret = simple_write_to_buffer(priv->wbuffer, priv->maxwritelen, offset, |
| 4662 | return -EINVAL; | 4662 | buffer, len); |
| 4663 | if (pos >= priv->maxwritelen) | 4663 | if (ret > 0) |
| 4664 | return 0; | 4664 | priv->writelen = max_t(int, priv->writelen, *offset); |
| 4665 | if (len > priv->maxwritelen - pos) | 4665 | |
| 4666 | len = priv->maxwritelen - pos; | 4666 | return ret; |
| 4667 | if (copy_from_user(priv->wbuffer + pos, buffer, len)) | ||
| 4668 | return -EFAULT; | ||
| 4669 | if ( pos + len > priv->writelen ) | ||
| 4670 | priv->writelen = len + file->f_pos; | ||
| 4671 | *offset = pos + len; | ||
| 4672 | return len; | ||
| 4673 | } | 4667 | } |
| 4674 | 4668 | ||
| 4675 | static int proc_status_open(struct inode *inode, struct file *file) | 4669 | static int proc_status_open(struct inode *inode, struct file *file) |
diff --git a/drivers/net/wireless/ath/ath5k/Makefile b/drivers/net/wireless/ath/ath5k/Makefile index 67dd9fd0650e..f60b3899afc4 100644 --- a/drivers/net/wireless/ath/ath5k/Makefile +++ b/drivers/net/wireless/ath/ath5k/Makefile | |||
| @@ -14,6 +14,7 @@ ath5k-y += led.o | |||
| 14 | ath5k-y += rfkill.o | 14 | ath5k-y += rfkill.o |
| 15 | ath5k-y += ani.o | 15 | ath5k-y += ani.o |
| 16 | ath5k-y += sysfs.o | 16 | ath5k-y += sysfs.o |
| 17 | ath5k-y += mac80211-ops.o | ||
| 17 | ath5k-$(CONFIG_ATH5K_DEBUG) += debug.o | 18 | ath5k-$(CONFIG_ATH5K_DEBUG) += debug.o |
| 18 | ath5k-$(CONFIG_ATH5K_AHB) += ahb.o | 19 | ath5k-$(CONFIG_ATH5K_AHB) += ahb.o |
| 19 | ath5k-$(CONFIG_ATH5K_PCI) += pci.o | 20 | ath5k-$(CONFIG_ATH5K_PCI) += pci.o |
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h index d6e744088bc6..407e39c2b10b 100644 --- a/drivers/net/wireless/ath/ath5k/ath5k.h +++ b/drivers/net/wireless/ath/ath5k/ath5k.h | |||
| @@ -154,10 +154,6 @@ | |||
| 154 | udelay(1); \ | 154 | udelay(1); \ |
| 155 | } while (0) | 155 | } while (0) |
| 156 | 156 | ||
| 157 | /* Register dumps are done per operation mode */ | ||
| 158 | #define AR5K_INI_RFGAIN_5GHZ 0 | ||
| 159 | #define AR5K_INI_RFGAIN_2GHZ 1 | ||
| 160 | |||
| 161 | /* | 157 | /* |
| 162 | * Some tuneable values (these should be changeable by the user) | 158 | * Some tuneable values (these should be changeable by the user) |
| 163 | * TODO: Make use of them and add more options OR use debug/configfs | 159 | * TODO: Make use of them and add more options OR use debug/configfs |
| @@ -1107,12 +1103,14 @@ struct ath5k_hw { | |||
| 1107 | /* Values in 0.25dB units */ | 1103 | /* Values in 0.25dB units */ |
| 1108 | s16 txp_min_pwr; | 1104 | s16 txp_min_pwr; |
| 1109 | s16 txp_max_pwr; | 1105 | s16 txp_max_pwr; |
| 1106 | s16 txp_cur_pwr; | ||
| 1110 | /* Values in 0.5dB units */ | 1107 | /* Values in 0.5dB units */ |
| 1111 | s16 txp_offset; | 1108 | s16 txp_offset; |
| 1112 | s16 txp_ofdm; | 1109 | s16 txp_ofdm; |
| 1113 | s16 txp_cck_ofdm_gainf_delta; | 1110 | s16 txp_cck_ofdm_gainf_delta; |
| 1114 | /* Value in dB units */ | 1111 | /* Value in dB units */ |
| 1115 | s16 txp_cck_ofdm_pwr_delta; | 1112 | s16 txp_cck_ofdm_pwr_delta; |
| 1113 | bool txp_setup; | ||
| 1116 | } ah_txpower; | 1114 | } ah_txpower; |
| 1117 | 1115 | ||
| 1118 | struct { | 1116 | struct { |
| @@ -1320,7 +1318,7 @@ void ath5k_hw_set_antenna_switch(struct ath5k_hw *ah, u8 ee_mode); | |||
| 1320 | int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 txpower); | 1318 | int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 txpower); |
| 1321 | /* Init function */ | 1319 | /* Init function */ |
| 1322 | int ath5k_hw_phy_init(struct ath5k_hw *ah, struct ieee80211_channel *channel, | 1320 | int ath5k_hw_phy_init(struct ath5k_hw *ah, struct ieee80211_channel *channel, |
| 1323 | u8 mode, u8 ee_mode, u8 freq, bool fast); | 1321 | u8 mode, bool fast); |
| 1324 | 1322 | ||
| 1325 | /* | 1323 | /* |
| 1326 | * Functions used internaly | 1324 | * Functions used internaly |
diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c index 9dbc1fa81795..cdac5cff0177 100644 --- a/drivers/net/wireless/ath/ath5k/attach.c +++ b/drivers/net/wireless/ath/ath5k/attach.c | |||
| @@ -276,7 +276,7 @@ int ath5k_hw_init(struct ath5k_softc *sc) | |||
| 276 | /* | 276 | /* |
| 277 | * Write PCI-E power save settings | 277 | * Write PCI-E power save settings |
| 278 | */ | 278 | */ |
| 279 | if ((ah->ah_version == AR5K_AR5212) && pdev && (pdev->is_pcie)) { | 279 | if ((ah->ah_version == AR5K_AR5212) && pdev && (pci_is_pcie(pdev))) { |
| 280 | ath5k_hw_reg_write(ah, 0x9248fc00, AR5K_PCIE_SERDES); | 280 | ath5k_hw_reg_write(ah, 0x9248fc00, AR5K_PCIE_SERDES); |
| 281 | ath5k_hw_reg_write(ah, 0x24924924, AR5K_PCIE_SERDES); | 281 | ath5k_hw_reg_write(ah, 0x24924924, AR5K_PCIE_SERDES); |
| 282 | 282 | ||
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index e4ec40c63396..019a74d533a6 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
| @@ -61,8 +61,8 @@ | |||
| 61 | #include "debug.h" | 61 | #include "debug.h" |
| 62 | #include "ani.h" | 62 | #include "ani.h" |
| 63 | 63 | ||
| 64 | static int modparam_nohwcrypt; | 64 | int ath5k_modparam_nohwcrypt; |
| 65 | module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); | 65 | module_param_named(nohwcrypt, ath5k_modparam_nohwcrypt, bool, S_IRUGO); |
| 66 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); | 66 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); |
| 67 | 67 | ||
| 68 | static int modparam_all_channels; | 68 | static int modparam_all_channels; |
| @@ -79,9 +79,8 @@ MODULE_LICENSE("Dual BSD/GPL"); | |||
| 79 | static int ath5k_init(struct ieee80211_hw *hw); | 79 | static int ath5k_init(struct ieee80211_hw *hw); |
| 80 | static int ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan, | 80 | static int ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan, |
| 81 | bool skip_pcu); | 81 | bool skip_pcu); |
| 82 | static int ath5k_beacon_update(struct ieee80211_hw *hw, | 82 | int ath5k_beacon_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif); |
| 83 | struct ieee80211_vif *vif); | 83 | void ath5k_beacon_update_timers(struct ath5k_softc *sc, u64 bc_tsf); |
| 84 | static void ath5k_beacon_update_timers(struct ath5k_softc *sc, u64 bc_tsf); | ||
| 85 | 84 | ||
| 86 | /* Known SREVs */ | 85 | /* Known SREVs */ |
| 87 | static const struct ath5k_srev_name srev_names[] = { | 86 | static const struct ath5k_srev_name srev_names[] = { |
| @@ -177,38 +176,6 @@ static const struct ieee80211_rate ath5k_rates[] = { | |||
| 177 | /* XR missing */ | 176 | /* XR missing */ |
| 178 | }; | 177 | }; |
| 179 | 178 | ||
| 180 | static inline void ath5k_txbuf_free_skb(struct ath5k_softc *sc, | ||
| 181 | struct ath5k_buf *bf) | ||
| 182 | { | ||
| 183 | BUG_ON(!bf); | ||
| 184 | if (!bf->skb) | ||
| 185 | return; | ||
| 186 | dma_unmap_single(sc->dev, bf->skbaddr, bf->skb->len, | ||
| 187 | DMA_TO_DEVICE); | ||
| 188 | dev_kfree_skb_any(bf->skb); | ||
| 189 | bf->skb = NULL; | ||
| 190 | bf->skbaddr = 0; | ||
| 191 | bf->desc->ds_data = 0; | ||
| 192 | } | ||
| 193 | |||
| 194 | static inline void ath5k_rxbuf_free_skb(struct ath5k_softc *sc, | ||
| 195 | struct ath5k_buf *bf) | ||
| 196 | { | ||
| 197 | struct ath5k_hw *ah = sc->ah; | ||
| 198 | struct ath_common *common = ath5k_hw_common(ah); | ||
| 199 | |||
| 200 | BUG_ON(!bf); | ||
| 201 | if (!bf->skb) | ||
| 202 | return; | ||
| 203 | dma_unmap_single(sc->dev, bf->skbaddr, common->rx_bufsize, | ||
| 204 | DMA_FROM_DEVICE); | ||
| 205 | dev_kfree_skb_any(bf->skb); | ||
| 206 | bf->skb = NULL; | ||
| 207 | bf->skbaddr = 0; | ||
| 208 | bf->desc->ds_data = 0; | ||
| 209 | } | ||
| 210 | |||
| 211 | |||
| 212 | static inline u64 ath5k_extend_tsf(struct ath5k_hw *ah, u32 rstamp) | 179 | static inline u64 ath5k_extend_tsf(struct ath5k_hw *ah, u32 rstamp) |
| 213 | { | 180 | { |
| 214 | u64 tsf = ath5k_hw_get_tsf64(ah); | 181 | u64 tsf = ath5k_hw_get_tsf64(ah); |
| @@ -462,7 +429,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw) | |||
| 462 | * | 429 | * |
| 463 | * Called with sc->lock. | 430 | * Called with sc->lock. |
| 464 | */ | 431 | */ |
| 465 | static int | 432 | int |
| 466 | ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan) | 433 | ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan) |
| 467 | { | 434 | { |
| 468 | ATH5K_DBG(sc, ATH5K_DEBUG_RESET, | 435 | ATH5K_DBG(sc, ATH5K_DEBUG_RESET, |
| @@ -537,8 +504,9 @@ static void ath_vif_iter(void *data, u8 *mac, struct ieee80211_vif *vif) | |||
| 537 | iter_data->opmode = avf->opmode; | 504 | iter_data->opmode = avf->opmode; |
| 538 | } | 505 | } |
| 539 | 506 | ||
| 540 | static void ath5k_update_bssid_mask_and_opmode(struct ath5k_softc *sc, | 507 | void |
| 541 | struct ieee80211_vif *vif) | 508 | ath5k_update_bssid_mask_and_opmode(struct ath5k_softc *sc, |
| 509 | struct ieee80211_vif *vif) | ||
| 542 | { | 510 | { |
| 543 | struct ath_common *common = ath5k_hw_common(sc->ah); | 511 | struct ath_common *common = ath5k_hw_common(sc->ah); |
| 544 | struct ath_vif_iter_data iter_data; | 512 | struct ath_vif_iter_data iter_data; |
| @@ -577,7 +545,7 @@ static void ath5k_update_bssid_mask_and_opmode(struct ath5k_softc *sc, | |||
| 577 | ath5k_hw_set_bssid_mask(sc->ah, sc->bssidmask); | 545 | ath5k_hw_set_bssid_mask(sc->ah, sc->bssidmask); |
| 578 | } | 546 | } |
| 579 | 547 | ||
| 580 | static void | 548 | void |
| 581 | ath5k_mode_setup(struct ath5k_softc *sc, struct ieee80211_vif *vif) | 549 | ath5k_mode_setup(struct ath5k_softc *sc, struct ieee80211_vif *vif) |
| 582 | { | 550 | { |
| 583 | struct ath5k_hw *ah = sc->ah; | 551 | struct ath5k_hw *ah = sc->ah; |
| @@ -887,6 +855,37 @@ err: | |||
| 887 | return ret; | 855 | return ret; |
| 888 | } | 856 | } |
| 889 | 857 | ||
| 858 | void | ||
| 859 | ath5k_txbuf_free_skb(struct ath5k_softc *sc, struct ath5k_buf *bf) | ||
| 860 | { | ||
| 861 | BUG_ON(!bf); | ||
| 862 | if (!bf->skb) | ||
| 863 | return; | ||
| 864 | dma_unmap_single(sc->dev, bf->skbaddr, bf->skb->len, | ||
| 865 | DMA_TO_DEVICE); | ||
| 866 | dev_kfree_skb_any(bf->skb); | ||
| 867 | bf->skb = NULL; | ||
| 868 | bf->skbaddr = 0; | ||
| 869 | bf->desc->ds_data = 0; | ||
| 870 | } | ||
| 871 | |||
| 872 | void | ||
| 873 | ath5k_rxbuf_free_skb(struct ath5k_softc *sc, struct ath5k_buf *bf) | ||
| 874 | { | ||
| 875 | struct ath5k_hw *ah = sc->ah; | ||
| 876 | struct ath_common *common = ath5k_hw_common(ah); | ||
| 877 | |||
| 878 | BUG_ON(!bf); | ||
| 879 | if (!bf->skb) | ||
| 880 | return; | ||
| 881 | dma_unmap_single(sc->dev, bf->skbaddr, common->rx_bufsize, | ||
| 882 | DMA_FROM_DEVICE); | ||
| 883 | dev_kfree_skb_any(bf->skb); | ||
| 884 | bf->skb = NULL; | ||
| 885 | bf->skbaddr = 0; | ||
| 886 | bf->desc->ds_data = 0; | ||
| 887 | } | ||
| 888 | |||
| 890 | static void | 889 | static void |
| 891 | ath5k_desc_free(struct ath5k_softc *sc) | 890 | ath5k_desc_free(struct ath5k_softc *sc) |
| 892 | { | 891 | { |
| @@ -1534,8 +1533,9 @@ unlock: | |||
| 1534 | * TX Handling * | 1533 | * TX Handling * |
| 1535 | \*************/ | 1534 | \*************/ |
| 1536 | 1535 | ||
| 1537 | static int ath5k_tx_queue(struct ieee80211_hw *hw, struct sk_buff *skb, | 1536 | int |
| 1538 | struct ath5k_txq *txq) | 1537 | ath5k_tx_queue(struct ieee80211_hw *hw, struct sk_buff *skb, |
| 1538 | struct ath5k_txq *txq) | ||
| 1539 | { | 1539 | { |
| 1540 | struct ath5k_softc *sc = hw->priv; | 1540 | struct ath5k_softc *sc = hw->priv; |
| 1541 | struct ath5k_buf *bf; | 1541 | struct ath5k_buf *bf; |
| @@ -1801,7 +1801,7 @@ err_unmap: | |||
| 1801 | * | 1801 | * |
| 1802 | * Called with the beacon lock. | 1802 | * Called with the beacon lock. |
| 1803 | */ | 1803 | */ |
| 1804 | static int | 1804 | int |
| 1805 | ath5k_beacon_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | 1805 | ath5k_beacon_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif) |
| 1806 | { | 1806 | { |
| 1807 | int ret; | 1807 | int ret; |
| @@ -1947,7 +1947,7 @@ ath5k_beacon_send(struct ath5k_softc *sc) | |||
| 1947 | * when we otherwise know we have to update the timers, but we keep it in this | 1947 | * when we otherwise know we have to update the timers, but we keep it in this |
| 1948 | * function to have it all together in one place. | 1948 | * function to have it all together in one place. |
| 1949 | */ | 1949 | */ |
| 1950 | static void | 1950 | void |
| 1951 | ath5k_beacon_update_timers(struct ath5k_softc *sc, u64 bc_tsf) | 1951 | ath5k_beacon_update_timers(struct ath5k_softc *sc, u64 bc_tsf) |
| 1952 | { | 1952 | { |
| 1953 | struct ath5k_hw *ah = sc->ah; | 1953 | struct ath5k_hw *ah = sc->ah; |
| @@ -2049,7 +2049,7 @@ ath5k_beacon_update_timers(struct ath5k_softc *sc, u64 bc_tsf) | |||
| 2049 | * In IBSS mode we use a self-linked tx descriptor if possible. We enable SWBA | 2049 | * In IBSS mode we use a self-linked tx descriptor if possible. We enable SWBA |
| 2050 | * interrupts to detect TSF updates only. | 2050 | * interrupts to detect TSF updates only. |
| 2051 | */ | 2051 | */ |
| 2052 | static void | 2052 | void |
| 2053 | ath5k_beacon_config(struct ath5k_softc *sc) | 2053 | ath5k_beacon_config(struct ath5k_softc *sc) |
| 2054 | { | 2054 | { |
| 2055 | struct ath5k_hw *ah = sc->ah; | 2055 | struct ath5k_hw *ah = sc->ah; |
| @@ -2525,7 +2525,7 @@ ath5k_stop_locked(struct ath5k_softc *sc) | |||
| 2525 | return 0; | 2525 | return 0; |
| 2526 | } | 2526 | } |
| 2527 | 2527 | ||
| 2528 | static int | 2528 | int |
| 2529 | ath5k_init_hw(struct ath5k_softc *sc) | 2529 | ath5k_init_hw(struct ath5k_softc *sc) |
| 2530 | { | 2530 | { |
| 2531 | struct ath5k_hw *ah = sc->ah; | 2531 | struct ath5k_hw *ah = sc->ah; |
| @@ -2601,7 +2601,7 @@ static void stop_tasklets(struct ath5k_softc *sc) | |||
| 2601 | * if another thread does a system call and the thread doing the | 2601 | * if another thread does a system call and the thread doing the |
| 2602 | * stop is preempted). | 2602 | * stop is preempted). |
| 2603 | */ | 2603 | */ |
| 2604 | static int | 2604 | int |
| 2605 | ath5k_stop_hw(struct ath5k_softc *sc) | 2605 | ath5k_stop_hw(struct ath5k_softc *sc) |
| 2606 | { | 2606 | { |
| 2607 | int ret; | 2607 | int ret; |
| @@ -2703,11 +2703,11 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan, | |||
| 2703 | 2703 | ||
| 2704 | /* clear survey data and cycle counters */ | 2704 | /* clear survey data and cycle counters */ |
| 2705 | memset(&sc->survey, 0, sizeof(sc->survey)); | 2705 | memset(&sc->survey, 0, sizeof(sc->survey)); |
| 2706 | spin_lock(&common->cc_lock); | 2706 | spin_lock_bh(&common->cc_lock); |
| 2707 | ath_hw_cycle_counters_update(common); | 2707 | ath_hw_cycle_counters_update(common); |
| 2708 | memset(&common->cc_survey, 0, sizeof(common->cc_survey)); | 2708 | memset(&common->cc_survey, 0, sizeof(common->cc_survey)); |
| 2709 | memset(&common->cc_ani, 0, sizeof(common->cc_ani)); | 2709 | memset(&common->cc_ani, 0, sizeof(common->cc_ani)); |
| 2710 | spin_unlock(&common->cc_lock); | 2710 | spin_unlock_bh(&common->cc_lock); |
| 2711 | 2711 | ||
| 2712 | /* | 2712 | /* |
| 2713 | * Change channels and update the h/w rate map if we're switching; | 2713 | * Change channels and update the h/w rate map if we're switching; |
| @@ -2939,230 +2939,8 @@ ath5k_deinit_softc(struct ath5k_softc *sc) | |||
| 2939 | free_irq(sc->irq, sc); | 2939 | free_irq(sc->irq, sc); |
| 2940 | } | 2940 | } |
| 2941 | 2941 | ||
| 2942 | /********************\ | 2942 | bool |
| 2943 | * Mac80211 functions * | 2943 | ath_any_vif_assoc(struct ath5k_softc *sc) |
| 2944 | \********************/ | ||
| 2945 | |||
| 2946 | static int | ||
| 2947 | ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | ||
| 2948 | { | ||
| 2949 | struct ath5k_softc *sc = hw->priv; | ||
| 2950 | u16 qnum = skb_get_queue_mapping(skb); | ||
| 2951 | |||
| 2952 | if (WARN_ON(qnum >= sc->ah->ah_capabilities.cap_queues.q_tx_num)) { | ||
| 2953 | dev_kfree_skb_any(skb); | ||
| 2954 | return 0; | ||
| 2955 | } | ||
| 2956 | |||
| 2957 | return ath5k_tx_queue(hw, skb, &sc->txqs[qnum]); | ||
| 2958 | } | ||
| 2959 | |||
| 2960 | static int ath5k_start(struct ieee80211_hw *hw) | ||
| 2961 | { | ||
| 2962 | return ath5k_init_hw(hw->priv); | ||
| 2963 | } | ||
| 2964 | |||
| 2965 | static void ath5k_stop(struct ieee80211_hw *hw) | ||
| 2966 | { | ||
| 2967 | ath5k_stop_hw(hw->priv); | ||
| 2968 | } | ||
| 2969 | |||
| 2970 | static int ath5k_add_interface(struct ieee80211_hw *hw, | ||
| 2971 | struct ieee80211_vif *vif) | ||
| 2972 | { | ||
| 2973 | struct ath5k_softc *sc = hw->priv; | ||
| 2974 | int ret; | ||
| 2975 | struct ath5k_vif *avf = (void *)vif->drv_priv; | ||
| 2976 | |||
| 2977 | mutex_lock(&sc->lock); | ||
| 2978 | |||
| 2979 | if ((vif->type == NL80211_IFTYPE_AP || | ||
| 2980 | vif->type == NL80211_IFTYPE_ADHOC) | ||
| 2981 | && (sc->num_ap_vifs + sc->num_adhoc_vifs) >= ATH_BCBUF) { | ||
| 2982 | ret = -ELNRNG; | ||
| 2983 | goto end; | ||
| 2984 | } | ||
| 2985 | |||
| 2986 | /* Don't allow other interfaces if one ad-hoc is configured. | ||
| 2987 | * TODO: Fix the problems with ad-hoc and multiple other interfaces. | ||
| 2988 | * We would need to operate the HW in ad-hoc mode to allow TSF updates | ||
| 2989 | * for the IBSS, but this breaks with additional AP or STA interfaces | ||
| 2990 | * at the moment. */ | ||
| 2991 | if (sc->num_adhoc_vifs || | ||
| 2992 | (sc->nvifs && vif->type == NL80211_IFTYPE_ADHOC)) { | ||
| 2993 | ATH5K_ERR(sc, "Only one single ad-hoc interface is allowed.\n"); | ||
| 2994 | ret = -ELNRNG; | ||
| 2995 | goto end; | ||
| 2996 | } | ||
| 2997 | |||
| 2998 | switch (vif->type) { | ||
| 2999 | case NL80211_IFTYPE_AP: | ||
| 3000 | case NL80211_IFTYPE_STATION: | ||
| 3001 | case NL80211_IFTYPE_ADHOC: | ||
| 3002 | case NL80211_IFTYPE_MESH_POINT: | ||
| 3003 | avf->opmode = vif->type; | ||
| 3004 | break; | ||
| 3005 | default: | ||
| 3006 | ret = -EOPNOTSUPP; | ||
| 3007 | goto end; | ||
| 3008 | } | ||
| 3009 | |||
| 3010 | sc->nvifs++; | ||
| 3011 | ATH5K_DBG(sc, ATH5K_DEBUG_MODE, "add interface mode %d\n", avf->opmode); | ||
| 3012 | |||
| 3013 | /* Assign the vap/adhoc to a beacon xmit slot. */ | ||
| 3014 | if ((avf->opmode == NL80211_IFTYPE_AP) || | ||
| 3015 | (avf->opmode == NL80211_IFTYPE_ADHOC) || | ||
| 3016 | (avf->opmode == NL80211_IFTYPE_MESH_POINT)) { | ||
| 3017 | int slot; | ||
| 3018 | |||
| 3019 | WARN_ON(list_empty(&sc->bcbuf)); | ||
| 3020 | avf->bbuf = list_first_entry(&sc->bcbuf, struct ath5k_buf, | ||
| 3021 | list); | ||
| 3022 | list_del(&avf->bbuf->list); | ||
| 3023 | |||
| 3024 | avf->bslot = 0; | ||
| 3025 | for (slot = 0; slot < ATH_BCBUF; slot++) { | ||
| 3026 | if (!sc->bslot[slot]) { | ||
| 3027 | avf->bslot = slot; | ||
| 3028 | break; | ||
| 3029 | } | ||
| 3030 | } | ||
| 3031 | BUG_ON(sc->bslot[avf->bslot] != NULL); | ||
| 3032 | sc->bslot[avf->bslot] = vif; | ||
| 3033 | if (avf->opmode == NL80211_IFTYPE_AP) | ||
| 3034 | sc->num_ap_vifs++; | ||
| 3035 | else if (avf->opmode == NL80211_IFTYPE_ADHOC) | ||
| 3036 | sc->num_adhoc_vifs++; | ||
| 3037 | } | ||
| 3038 | |||
| 3039 | /* Any MAC address is fine, all others are included through the | ||
| 3040 | * filter. | ||
| 3041 | */ | ||
| 3042 | memcpy(&sc->lladdr, vif->addr, ETH_ALEN); | ||
| 3043 | ath5k_hw_set_lladdr(sc->ah, vif->addr); | ||
| 3044 | |||
| 3045 | memcpy(&avf->lladdr, vif->addr, ETH_ALEN); | ||
| 3046 | |||
| 3047 | ath5k_mode_setup(sc, vif); | ||
| 3048 | |||
| 3049 | ret = 0; | ||
| 3050 | end: | ||
| 3051 | mutex_unlock(&sc->lock); | ||
| 3052 | return ret; | ||
| 3053 | } | ||
| 3054 | |||
| 3055 | static void | ||
| 3056 | ath5k_remove_interface(struct ieee80211_hw *hw, | ||
| 3057 | struct ieee80211_vif *vif) | ||
| 3058 | { | ||
| 3059 | struct ath5k_softc *sc = hw->priv; | ||
| 3060 | struct ath5k_vif *avf = (void *)vif->drv_priv; | ||
| 3061 | unsigned int i; | ||
| 3062 | |||
| 3063 | mutex_lock(&sc->lock); | ||
| 3064 | sc->nvifs--; | ||
| 3065 | |||
| 3066 | if (avf->bbuf) { | ||
| 3067 | ath5k_txbuf_free_skb(sc, avf->bbuf); | ||
| 3068 | list_add_tail(&avf->bbuf->list, &sc->bcbuf); | ||
| 3069 | for (i = 0; i < ATH_BCBUF; i++) { | ||
| 3070 | if (sc->bslot[i] == vif) { | ||
| 3071 | sc->bslot[i] = NULL; | ||
| 3072 | break; | ||
| 3073 | } | ||
| 3074 | } | ||
| 3075 | avf->bbuf = NULL; | ||
| 3076 | } | ||
| 3077 | if (avf->opmode == NL80211_IFTYPE_AP) | ||
| 3078 | sc->num_ap_vifs--; | ||
| 3079 | else if (avf->opmode == NL80211_IFTYPE_ADHOC) | ||
| 3080 | sc->num_adhoc_vifs--; | ||
| 3081 | |||
| 3082 | ath5k_update_bssid_mask_and_opmode(sc, NULL); | ||
| 3083 | mutex_unlock(&sc->lock); | ||
| 3084 | } | ||
| 3085 | |||
| 3086 | /* | ||
| 3087 | * TODO: Phy disable/diversity etc | ||
| 3088 | */ | ||
| 3089 | static int | ||
| 3090 | ath5k_config(struct ieee80211_hw *hw, u32 changed) | ||
| 3091 | { | ||
| 3092 | struct ath5k_softc *sc = hw->priv; | ||
| 3093 | struct ath5k_hw *ah = sc->ah; | ||
| 3094 | struct ieee80211_conf *conf = &hw->conf; | ||
| 3095 | int ret = 0; | ||
| 3096 | |||
| 3097 | mutex_lock(&sc->lock); | ||
| 3098 | |||
| 3099 | if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { | ||
| 3100 | ret = ath5k_chan_set(sc, conf->channel); | ||
| 3101 | if (ret < 0) | ||
| 3102 | goto unlock; | ||
| 3103 | } | ||
| 3104 | |||
| 3105 | if ((changed & IEEE80211_CONF_CHANGE_POWER) && | ||
| 3106 | (sc->power_level != conf->power_level)) { | ||
| 3107 | sc->power_level = conf->power_level; | ||
| 3108 | |||
| 3109 | /* Half dB steps */ | ||
| 3110 | ath5k_hw_set_txpower_limit(ah, (conf->power_level * 2)); | ||
| 3111 | } | ||
| 3112 | |||
| 3113 | /* TODO: | ||
| 3114 | * 1) Move this on config_interface and handle each case | ||
| 3115 | * separately eg. when we have only one STA vif, use | ||
| 3116 | * AR5K_ANTMODE_SINGLE_AP | ||
| 3117 | * | ||
| 3118 | * 2) Allow the user to change antenna mode eg. when only | ||
| 3119 | * one antenna is present | ||
| 3120 | * | ||
| 3121 | * 3) Allow the user to set default/tx antenna when possible | ||
| 3122 | * | ||
| 3123 | * 4) Default mode should handle 90% of the cases, together | ||
| 3124 | * with fixed a/b and single AP modes we should be able to | ||
| 3125 | * handle 99%. Sectored modes are extreme cases and i still | ||
| 3126 | * haven't found a usage for them. If we decide to support them, | ||
| 3127 | * then we must allow the user to set how many tx antennas we | ||
| 3128 | * have available | ||
| 3129 | */ | ||
| 3130 | ath5k_hw_set_antenna_mode(ah, ah->ah_ant_mode); | ||
| 3131 | |||
| 3132 | unlock: | ||
| 3133 | mutex_unlock(&sc->lock); | ||
| 3134 | return ret; | ||
| 3135 | } | ||
| 3136 | |||
| 3137 | static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, | ||
| 3138 | struct netdev_hw_addr_list *mc_list) | ||
| 3139 | { | ||
| 3140 | u32 mfilt[2], val; | ||
| 3141 | u8 pos; | ||
| 3142 | struct netdev_hw_addr *ha; | ||
| 3143 | |||
| 3144 | mfilt[0] = 0; | ||
| 3145 | mfilt[1] = 1; | ||
| 3146 | |||
| 3147 | netdev_hw_addr_list_for_each(ha, mc_list) { | ||
| 3148 | /* calculate XOR of eight 6-bit values */ | ||
| 3149 | val = get_unaligned_le32(ha->addr + 0); | ||
| 3150 | pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; | ||
| 3151 | val = get_unaligned_le32(ha->addr + 3); | ||
| 3152 | pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; | ||
| 3153 | pos &= 0x3f; | ||
| 3154 | mfilt[pos / 32] |= (1 << (pos % 32)); | ||
| 3155 | /* XXX: we might be able to just do this instead, | ||
| 3156 | * but not sure, needs testing, if we do use this we'd | ||
| 3157 | * neet to inform below to not reset the mcast */ | ||
| 3158 | /* ath5k_hw_set_mcast_filterindex(ah, | ||
| 3159 | * ha->addr[5]); */ | ||
| 3160 | } | ||
| 3161 | |||
| 3162 | return ((u64)(mfilt[1]) << 32) | mfilt[0]; | ||
| 3163 | } | ||
| 3164 | |||
| 3165 | static bool ath_any_vif_assoc(struct ath5k_softc *sc) | ||
| 3166 | { | 2944 | { |
| 3167 | struct ath_vif_iter_data iter_data; | 2945 | struct ath_vif_iter_data iter_data; |
| 3168 | iter_data.hw_macaddr = NULL; | 2946 | iter_data.hw_macaddr = NULL; |
| @@ -3175,262 +2953,7 @@ static bool ath_any_vif_assoc(struct ath5k_softc *sc) | |||
| 3175 | return iter_data.any_assoc; | 2953 | return iter_data.any_assoc; |
| 3176 | } | 2954 | } |
| 3177 | 2955 | ||
| 3178 | #define SUPPORTED_FIF_FLAGS \ | 2956 | void |
| 3179 | FIF_PROMISC_IN_BSS | FIF_ALLMULTI | FIF_FCSFAIL | \ | ||
| 3180 | FIF_PLCPFAIL | FIF_CONTROL | FIF_OTHER_BSS | \ | ||
| 3181 | FIF_BCN_PRBRESP_PROMISC | ||
| 3182 | /* | ||
| 3183 | * o always accept unicast, broadcast, and multicast traffic | ||
| 3184 | * o multicast traffic for all BSSIDs will be enabled if mac80211 | ||
| 3185 | * says it should be | ||
| 3186 | * o maintain current state of phy ofdm or phy cck error reception. | ||
| 3187 | * If the hardware detects any of these type of errors then | ||
| 3188 | * ath5k_hw_get_rx_filter() will pass to us the respective | ||
| 3189 | * hardware filters to be able to receive these type of frames. | ||
| 3190 | * o probe request frames are accepted only when operating in | ||
| 3191 | * hostap, adhoc, or monitor modes | ||
| 3192 | * o enable promiscuous mode according to the interface state | ||
| 3193 | * o accept beacons: | ||
| 3194 | * - when operating in adhoc mode so the 802.11 layer creates | ||
| 3195 | * node table entries for peers, | ||
| 3196 | * - when operating in station mode for collecting rssi data when | ||
| 3197 | * the station is otherwise quiet, or | ||
| 3198 | * - when scanning | ||
| 3199 | */ | ||
| 3200 | static void ath5k_configure_filter(struct ieee80211_hw *hw, | ||
| 3201 | unsigned int changed_flags, | ||
| 3202 | unsigned int *new_flags, | ||
| 3203 | u64 multicast) | ||
| 3204 | { | ||
| 3205 | struct ath5k_softc *sc = hw->priv; | ||
| 3206 | struct ath5k_hw *ah = sc->ah; | ||
| 3207 | u32 mfilt[2], rfilt; | ||
| 3208 | |||
| 3209 | mutex_lock(&sc->lock); | ||
| 3210 | |||
| 3211 | mfilt[0] = multicast; | ||
| 3212 | mfilt[1] = multicast >> 32; | ||
| 3213 | |||
| 3214 | /* Only deal with supported flags */ | ||
| 3215 | changed_flags &= SUPPORTED_FIF_FLAGS; | ||
| 3216 | *new_flags &= SUPPORTED_FIF_FLAGS; | ||
| 3217 | |||
| 3218 | /* If HW detects any phy or radar errors, leave those filters on. | ||
| 3219 | * Also, always enable Unicast, Broadcasts and Multicast | ||
| 3220 | * XXX: move unicast, bssid broadcasts and multicast to mac80211 */ | ||
| 3221 | rfilt = (ath5k_hw_get_rx_filter(ah) & (AR5K_RX_FILTER_PHYERR)) | | ||
| 3222 | (AR5K_RX_FILTER_UCAST | AR5K_RX_FILTER_BCAST | | ||
| 3223 | AR5K_RX_FILTER_MCAST); | ||
| 3224 | |||
| 3225 | if (changed_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) { | ||
| 3226 | if (*new_flags & FIF_PROMISC_IN_BSS) { | ||
| 3227 | __set_bit(ATH_STAT_PROMISC, sc->status); | ||
| 3228 | } else { | ||
| 3229 | __clear_bit(ATH_STAT_PROMISC, sc->status); | ||
| 3230 | } | ||
| 3231 | } | ||
| 3232 | |||
| 3233 | if (test_bit(ATH_STAT_PROMISC, sc->status)) | ||
| 3234 | rfilt |= AR5K_RX_FILTER_PROM; | ||
| 3235 | |||
| 3236 | /* Note, AR5K_RX_FILTER_MCAST is already enabled */ | ||
| 3237 | if (*new_flags & FIF_ALLMULTI) { | ||
| 3238 | mfilt[0] = ~0; | ||
| 3239 | mfilt[1] = ~0; | ||
| 3240 | } | ||
| 3241 | |||
| 3242 | /* This is the best we can do */ | ||
| 3243 | if (*new_flags & (FIF_FCSFAIL | FIF_PLCPFAIL)) | ||
| 3244 | rfilt |= AR5K_RX_FILTER_PHYERR; | ||
| 3245 | |||
| 3246 | /* FIF_BCN_PRBRESP_PROMISC really means to enable beacons | ||
| 3247 | * and probes for any BSSID */ | ||
| 3248 | if ((*new_flags & FIF_BCN_PRBRESP_PROMISC) || (sc->nvifs > 1)) | ||
| 3249 | rfilt |= AR5K_RX_FILTER_BEACON; | ||
| 3250 | |||
| 3251 | /* FIF_CONTROL doc says that if FIF_PROMISC_IN_BSS is not | ||
| 3252 | * set we should only pass on control frames for this | ||
| 3253 | * station. This needs testing. I believe right now this | ||
| 3254 | * enables *all* control frames, which is OK.. but | ||
| 3255 | * but we should see if we can improve on granularity */ | ||
| 3256 | if (*new_flags & FIF_CONTROL) | ||
| 3257 | rfilt |= AR5K_RX_FILTER_CONTROL; | ||
| 3258 | |||
| 3259 | /* Additional settings per mode -- this is per ath5k */ | ||
| 3260 | |||
| 3261 | /* XXX move these to mac80211, and add a beacon IFF flag to mac80211 */ | ||
| 3262 | |||
| 3263 | switch (sc->opmode) { | ||
| 3264 | case NL80211_IFTYPE_MESH_POINT: | ||
| 3265 | rfilt |= AR5K_RX_FILTER_CONTROL | | ||
| 3266 | AR5K_RX_FILTER_BEACON | | ||
| 3267 | AR5K_RX_FILTER_PROBEREQ | | ||
| 3268 | AR5K_RX_FILTER_PROM; | ||
| 3269 | break; | ||
| 3270 | case NL80211_IFTYPE_AP: | ||
| 3271 | case NL80211_IFTYPE_ADHOC: | ||
| 3272 | rfilt |= AR5K_RX_FILTER_PROBEREQ | | ||
| 3273 | AR5K_RX_FILTER_BEACON; | ||
| 3274 | break; | ||
| 3275 | case NL80211_IFTYPE_STATION: | ||
| 3276 | if (sc->assoc) | ||
| 3277 | rfilt |= AR5K_RX_FILTER_BEACON; | ||
| 3278 | default: | ||
| 3279 | break; | ||
| 3280 | } | ||
| 3281 | |||
| 3282 | /* Set filters */ | ||
| 3283 | ath5k_hw_set_rx_filter(ah, rfilt); | ||
| 3284 | |||
| 3285 | /* Set multicast bits */ | ||
| 3286 | ath5k_hw_set_mcast_filter(ah, mfilt[0], mfilt[1]); | ||
| 3287 | /* Set the cached hw filter flags, this will later actually | ||
| 3288 | * be set in HW */ | ||
| 3289 | sc->filter_flags = rfilt; | ||
| 3290 | |||
| 3291 | mutex_unlock(&sc->lock); | ||
| 3292 | } | ||
| 3293 | |||
| 3294 | static int | ||
| 3295 | ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | ||
| 3296 | struct ieee80211_vif *vif, struct ieee80211_sta *sta, | ||
| 3297 | struct ieee80211_key_conf *key) | ||
| 3298 | { | ||
| 3299 | struct ath5k_softc *sc = hw->priv; | ||
| 3300 | struct ath5k_hw *ah = sc->ah; | ||
| 3301 | struct ath_common *common = ath5k_hw_common(ah); | ||
| 3302 | int ret = 0; | ||
| 3303 | |||
| 3304 | if (modparam_nohwcrypt) | ||
| 3305 | return -EOPNOTSUPP; | ||
| 3306 | |||
| 3307 | switch (key->cipher) { | ||
| 3308 | case WLAN_CIPHER_SUITE_WEP40: | ||
| 3309 | case WLAN_CIPHER_SUITE_WEP104: | ||
| 3310 | case WLAN_CIPHER_SUITE_TKIP: | ||
| 3311 | break; | ||
| 3312 | case WLAN_CIPHER_SUITE_CCMP: | ||
| 3313 | if (common->crypt_caps & ATH_CRYPT_CAP_CIPHER_AESCCM) | ||
| 3314 | break; | ||
| 3315 | return -EOPNOTSUPP; | ||
| 3316 | default: | ||
| 3317 | WARN_ON(1); | ||
| 3318 | return -EINVAL; | ||
| 3319 | } | ||
| 3320 | |||
| 3321 | mutex_lock(&sc->lock); | ||
| 3322 | |||
| 3323 | switch (cmd) { | ||
| 3324 | case SET_KEY: | ||
| 3325 | ret = ath_key_config(common, vif, sta, key); | ||
| 3326 | if (ret >= 0) { | ||
| 3327 | key->hw_key_idx = ret; | ||
| 3328 | /* push IV and Michael MIC generation to stack */ | ||
| 3329 | key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; | ||
| 3330 | if (key->cipher == WLAN_CIPHER_SUITE_TKIP) | ||
| 3331 | key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC; | ||
| 3332 | if (key->cipher == WLAN_CIPHER_SUITE_CCMP) | ||
| 3333 | key->flags |= IEEE80211_KEY_FLAG_SW_MGMT; | ||
| 3334 | ret = 0; | ||
| 3335 | } | ||
| 3336 | break; | ||
| 3337 | case DISABLE_KEY: | ||
| 3338 | ath_key_delete(common, key); | ||
| 3339 | break; | ||
| 3340 | default: | ||
| 3341 | ret = -EINVAL; | ||
| 3342 | } | ||
| 3343 | |||
| 3344 | mmiowb(); | ||
| 3345 | mutex_unlock(&sc->lock); | ||
| 3346 | return ret; | ||
| 3347 | } | ||
| 3348 | |||
| 3349 | static int | ||
| 3350 | ath5k_get_stats(struct ieee80211_hw *hw, | ||
| 3351 | struct ieee80211_low_level_stats *stats) | ||
| 3352 | { | ||
| 3353 | struct ath5k_softc *sc = hw->priv; | ||
| 3354 | |||
| 3355 | /* Force update */ | ||
| 3356 | ath5k_hw_update_mib_counters(sc->ah); | ||
| 3357 | |||
| 3358 | stats->dot11ACKFailureCount = sc->stats.ack_fail; | ||
| 3359 | stats->dot11RTSFailureCount = sc->stats.rts_fail; | ||
| 3360 | stats->dot11RTSSuccessCount = sc->stats.rts_ok; | ||
| 3361 | stats->dot11FCSErrorCount = sc->stats.fcs_error; | ||
| 3362 | |||
| 3363 | return 0; | ||
| 3364 | } | ||
| 3365 | |||
| 3366 | static int ath5k_get_survey(struct ieee80211_hw *hw, int idx, | ||
| 3367 | struct survey_info *survey) | ||
| 3368 | { | ||
| 3369 | struct ath5k_softc *sc = hw->priv; | ||
| 3370 | struct ieee80211_conf *conf = &hw->conf; | ||
| 3371 | struct ath_common *common = ath5k_hw_common(sc->ah); | ||
| 3372 | struct ath_cycle_counters *cc = &common->cc_survey; | ||
| 3373 | unsigned int div = common->clockrate * 1000; | ||
| 3374 | |||
| 3375 | if (idx != 0) | ||
| 3376 | return -ENOENT; | ||
| 3377 | |||
| 3378 | spin_lock_bh(&common->cc_lock); | ||
| 3379 | ath_hw_cycle_counters_update(common); | ||
| 3380 | if (cc->cycles > 0) { | ||
| 3381 | sc->survey.channel_time += cc->cycles / div; | ||
| 3382 | sc->survey.channel_time_busy += cc->rx_busy / div; | ||
| 3383 | sc->survey.channel_time_rx += cc->rx_frame / div; | ||
| 3384 | sc->survey.channel_time_tx += cc->tx_frame / div; | ||
| 3385 | } | ||
| 3386 | memset(cc, 0, sizeof(*cc)); | ||
| 3387 | spin_unlock_bh(&common->cc_lock); | ||
| 3388 | |||
| 3389 | memcpy(survey, &sc->survey, sizeof(*survey)); | ||
| 3390 | |||
| 3391 | survey->channel = conf->channel; | ||
| 3392 | survey->noise = sc->ah->ah_noise_floor; | ||
| 3393 | survey->filled = SURVEY_INFO_NOISE_DBM | | ||
| 3394 | SURVEY_INFO_CHANNEL_TIME | | ||
| 3395 | SURVEY_INFO_CHANNEL_TIME_BUSY | | ||
| 3396 | SURVEY_INFO_CHANNEL_TIME_RX | | ||
| 3397 | SURVEY_INFO_CHANNEL_TIME_TX; | ||
| 3398 | |||
| 3399 | return 0; | ||
| 3400 | } | ||
| 3401 | |||
| 3402 | static u64 | ||
| 3403 | ath5k_get_tsf(struct ieee80211_hw *hw) | ||
| 3404 | { | ||
| 3405 | struct ath5k_softc *sc = hw->priv; | ||
| 3406 | |||
| 3407 | return ath5k_hw_get_tsf64(sc->ah); | ||
| 3408 | } | ||
| 3409 | |||
| 3410 | static void | ||
| 3411 | ath5k_set_tsf(struct ieee80211_hw *hw, u64 tsf) | ||
| 3412 | { | ||
| 3413 | struct ath5k_softc *sc = hw->priv; | ||
| 3414 | |||
| 3415 | ath5k_hw_set_tsf64(sc->ah, tsf); | ||
| 3416 | } | ||
| 3417 | |||
| 3418 | static void | ||
| 3419 | ath5k_reset_tsf(struct ieee80211_hw *hw) | ||
| 3420 | { | ||
| 3421 | struct ath5k_softc *sc = hw->priv; | ||
| 3422 | |||
| 3423 | /* | ||
| 3424 | * in IBSS mode we need to update the beacon timers too. | ||
| 3425 | * this will also reset the TSF if we call it with 0 | ||
| 3426 | */ | ||
| 3427 | if (sc->opmode == NL80211_IFTYPE_ADHOC) | ||
| 3428 | ath5k_beacon_update_timers(sc, 0); | ||
| 3429 | else | ||
| 3430 | ath5k_hw_reset_tsf(sc->ah); | ||
| 3431 | } | ||
| 3432 | |||
| 3433 | static void | ||
| 3434 | set_beacon_filter(struct ieee80211_hw *hw, bool enable) | 2957 | set_beacon_filter(struct ieee80211_hw *hw, bool enable) |
| 3435 | { | 2958 | { |
| 3436 | struct ath5k_softc *sc = hw->priv; | 2959 | struct ath5k_softc *sc = hw->priv; |
| @@ -3444,189 +2967,3 @@ set_beacon_filter(struct ieee80211_hw *hw, bool enable) | |||
| 3444 | ath5k_hw_set_rx_filter(ah, rfilt); | 2967 | ath5k_hw_set_rx_filter(ah, rfilt); |
| 3445 | sc->filter_flags = rfilt; | 2968 | sc->filter_flags = rfilt; |
| 3446 | } | 2969 | } |
| 3447 | |||
| 3448 | static void ath5k_bss_info_changed(struct ieee80211_hw *hw, | ||
| 3449 | struct ieee80211_vif *vif, | ||
| 3450 | struct ieee80211_bss_conf *bss_conf, | ||
| 3451 | u32 changes) | ||
| 3452 | { | ||
| 3453 | struct ath5k_vif *avf = (void *)vif->drv_priv; | ||
| 3454 | struct ath5k_softc *sc = hw->priv; | ||
| 3455 | struct ath5k_hw *ah = sc->ah; | ||
| 3456 | struct ath_common *common = ath5k_hw_common(ah); | ||
| 3457 | unsigned long flags; | ||
| 3458 | |||
| 3459 | mutex_lock(&sc->lock); | ||
| 3460 | |||
| 3461 | if (changes & BSS_CHANGED_BSSID) { | ||
| 3462 | /* Cache for later use during resets */ | ||
| 3463 | memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); | ||
| 3464 | common->curaid = 0; | ||
| 3465 | ath5k_hw_set_bssid(ah); | ||
| 3466 | mmiowb(); | ||
| 3467 | } | ||
| 3468 | |||
| 3469 | if (changes & BSS_CHANGED_BEACON_INT) | ||
| 3470 | sc->bintval = bss_conf->beacon_int; | ||
| 3471 | |||
| 3472 | if (changes & BSS_CHANGED_ASSOC) { | ||
| 3473 | avf->assoc = bss_conf->assoc; | ||
| 3474 | if (bss_conf->assoc) | ||
| 3475 | sc->assoc = bss_conf->assoc; | ||
| 3476 | else | ||
| 3477 | sc->assoc = ath_any_vif_assoc(sc); | ||
| 3478 | |||
| 3479 | if (sc->opmode == NL80211_IFTYPE_STATION) | ||
| 3480 | set_beacon_filter(hw, sc->assoc); | ||
| 3481 | ath5k_hw_set_ledstate(sc->ah, sc->assoc ? | ||
| 3482 | AR5K_LED_ASSOC : AR5K_LED_INIT); | ||
| 3483 | if (bss_conf->assoc) { | ||
| 3484 | ATH5K_DBG(sc, ATH5K_DEBUG_ANY, | ||
| 3485 | "Bss Info ASSOC %d, bssid: %pM\n", | ||
| 3486 | bss_conf->aid, common->curbssid); | ||
| 3487 | common->curaid = bss_conf->aid; | ||
| 3488 | ath5k_hw_set_bssid(ah); | ||
| 3489 | /* Once ANI is available you would start it here */ | ||
| 3490 | } | ||
| 3491 | } | ||
| 3492 | |||
| 3493 | if (changes & BSS_CHANGED_BEACON) { | ||
| 3494 | spin_lock_irqsave(&sc->block, flags); | ||
| 3495 | ath5k_beacon_update(hw, vif); | ||
| 3496 | spin_unlock_irqrestore(&sc->block, flags); | ||
| 3497 | } | ||
| 3498 | |||
| 3499 | if (changes & BSS_CHANGED_BEACON_ENABLED) | ||
| 3500 | sc->enable_beacon = bss_conf->enable_beacon; | ||
| 3501 | |||
| 3502 | if (changes & (BSS_CHANGED_BEACON | BSS_CHANGED_BEACON_ENABLED | | ||
| 3503 | BSS_CHANGED_BEACON_INT)) | ||
| 3504 | ath5k_beacon_config(sc); | ||
| 3505 | |||
| 3506 | mutex_unlock(&sc->lock); | ||
| 3507 | } | ||
| 3508 | |||
| 3509 | static void ath5k_sw_scan_start(struct ieee80211_hw *hw) | ||
| 3510 | { | ||
| 3511 | struct ath5k_softc *sc = hw->priv; | ||
| 3512 | if (!sc->assoc) | ||
| 3513 | ath5k_hw_set_ledstate(sc->ah, AR5K_LED_SCAN); | ||
| 3514 | } | ||
| 3515 | |||
| 3516 | static void ath5k_sw_scan_complete(struct ieee80211_hw *hw) | ||
| 3517 | { | ||
| 3518 | struct ath5k_softc *sc = hw->priv; | ||
| 3519 | ath5k_hw_set_ledstate(sc->ah, sc->assoc ? | ||
| 3520 | AR5K_LED_ASSOC : AR5K_LED_INIT); | ||
| 3521 | } | ||
| 3522 | |||
| 3523 | /** | ||
| 3524 | * ath5k_set_coverage_class - Set IEEE 802.11 coverage class | ||
| 3525 | * | ||
| 3526 | * @hw: struct ieee80211_hw pointer | ||
| 3527 | * @coverage_class: IEEE 802.11 coverage class number | ||
| 3528 | * | ||
| 3529 | * Mac80211 callback. Sets slot time, ACK timeout and CTS timeout for given | ||
| 3530 | * coverage class. The values are persistent, they are restored after device | ||
| 3531 | * reset. | ||
| 3532 | */ | ||
| 3533 | static void ath5k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class) | ||
| 3534 | { | ||
| 3535 | struct ath5k_softc *sc = hw->priv; | ||
| 3536 | |||
| 3537 | mutex_lock(&sc->lock); | ||
| 3538 | ath5k_hw_set_coverage_class(sc->ah, coverage_class); | ||
| 3539 | mutex_unlock(&sc->lock); | ||
| 3540 | } | ||
| 3541 | |||
| 3542 | static int ath5k_conf_tx(struct ieee80211_hw *hw, u16 queue, | ||
| 3543 | const struct ieee80211_tx_queue_params *params) | ||
| 3544 | { | ||
| 3545 | struct ath5k_softc *sc = hw->priv; | ||
| 3546 | struct ath5k_hw *ah = sc->ah; | ||
| 3547 | struct ath5k_txq_info qi; | ||
| 3548 | int ret = 0; | ||
| 3549 | |||
| 3550 | if (queue >= ah->ah_capabilities.cap_queues.q_tx_num) | ||
| 3551 | return 0; | ||
| 3552 | |||
| 3553 | mutex_lock(&sc->lock); | ||
| 3554 | |||
| 3555 | ath5k_hw_get_tx_queueprops(ah, queue, &qi); | ||
| 3556 | |||
| 3557 | qi.tqi_aifs = params->aifs; | ||
| 3558 | qi.tqi_cw_min = params->cw_min; | ||
| 3559 | qi.tqi_cw_max = params->cw_max; | ||
| 3560 | qi.tqi_burst_time = params->txop; | ||
| 3561 | |||
| 3562 | ATH5K_DBG(sc, ATH5K_DEBUG_ANY, | ||
| 3563 | "Configure tx [queue %d], " | ||
| 3564 | "aifs: %d, cw_min: %d, cw_max: %d, txop: %d\n", | ||
| 3565 | queue, params->aifs, params->cw_min, | ||
| 3566 | params->cw_max, params->txop); | ||
| 3567 | |||
| 3568 | if (ath5k_hw_set_tx_queueprops(ah, queue, &qi)) { | ||
| 3569 | ATH5K_ERR(sc, | ||
| 3570 | "Unable to update hardware queue %u!\n", queue); | ||
| 3571 | ret = -EIO; | ||
| 3572 | } else | ||
| 3573 | ath5k_hw_reset_tx_queue(ah, queue); | ||
| 3574 | |||
| 3575 | mutex_unlock(&sc->lock); | ||
| 3576 | |||
| 3577 | return ret; | ||
| 3578 | } | ||
| 3579 | |||
| 3580 | static int ath5k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) | ||
| 3581 | { | ||
| 3582 | struct ath5k_softc *sc = hw->priv; | ||
| 3583 | |||
| 3584 | if (tx_ant == 1 && rx_ant == 1) | ||
| 3585 | ath5k_hw_set_antenna_mode(sc->ah, AR5K_ANTMODE_FIXED_A); | ||
| 3586 | else if (tx_ant == 2 && rx_ant == 2) | ||
| 3587 | ath5k_hw_set_antenna_mode(sc->ah, AR5K_ANTMODE_FIXED_B); | ||
| 3588 | else if ((tx_ant & 3) == 3 && (rx_ant & 3) == 3) | ||
| 3589 | ath5k_hw_set_antenna_mode(sc->ah, AR5K_ANTMODE_DEFAULT); | ||
| 3590 | else | ||
| 3591 | return -EINVAL; | ||
| 3592 | return 0; | ||
| 3593 | } | ||
| 3594 | |||
| 3595 | static int ath5k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) | ||
| 3596 | { | ||
| 3597 | struct ath5k_softc *sc = hw->priv; | ||
| 3598 | |||
| 3599 | switch (sc->ah->ah_ant_mode) { | ||
| 3600 | case AR5K_ANTMODE_FIXED_A: | ||
| 3601 | *tx_ant = 1; *rx_ant = 1; break; | ||
| 3602 | case AR5K_ANTMODE_FIXED_B: | ||
| 3603 | *tx_ant = 2; *rx_ant = 2; break; | ||
| 3604 | case AR5K_ANTMODE_DEFAULT: | ||
| 3605 | *tx_ant = 3; *rx_ant = 3; break; | ||
| 3606 | } | ||
| 3607 | return 0; | ||
| 3608 | } | ||
| 3609 | |||
| 3610 | const struct ieee80211_ops ath5k_hw_ops = { | ||
| 3611 | .tx = ath5k_tx, | ||
| 3612 | .start = ath5k_start, | ||
| 3613 | .stop = ath5k_stop, | ||
| 3614 | .add_interface = ath5k_add_interface, | ||
| 3615 | .remove_interface = ath5k_remove_interface, | ||
| 3616 | .config = ath5k_config, | ||
| 3617 | .prepare_multicast = ath5k_prepare_multicast, | ||
| 3618 | .configure_filter = ath5k_configure_filter, | ||
| 3619 | .set_key = ath5k_set_key, | ||
| 3620 | .get_stats = ath5k_get_stats, | ||
| 3621 | .get_survey = ath5k_get_survey, | ||
| 3622 | .conf_tx = ath5k_conf_tx, | ||
| 3623 | .get_tsf = ath5k_get_tsf, | ||
| 3624 | .set_tsf = ath5k_set_tsf, | ||
| 3625 | .reset_tsf = ath5k_reset_tsf, | ||
| 3626 | .bss_info_changed = ath5k_bss_info_changed, | ||
| 3627 | .sw_scan_start = ath5k_sw_scan_start, | ||
| 3628 | .sw_scan_complete = ath5k_sw_scan_complete, | ||
| 3629 | .set_coverage_class = ath5k_set_coverage_class, | ||
| 3630 | .set_antenna = ath5k_set_antenna, | ||
| 3631 | .get_antenna = ath5k_get_antenna, | ||
| 3632 | }; | ||
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c index 97eaa9a4415e..80e625608bac 100644 --- a/drivers/net/wireless/ath/ath5k/eeprom.c +++ b/drivers/net/wireless/ath/ath5k/eeprom.c | |||
| @@ -1802,3 +1802,19 @@ ath5k_eeprom_detach(struct ath5k_hw *ah) | |||
| 1802 | for (mode = AR5K_EEPROM_MODE_11A; mode <= AR5K_EEPROM_MODE_11G; mode++) | 1802 | for (mode = AR5K_EEPROM_MODE_11A; mode <= AR5K_EEPROM_MODE_11G; mode++) |
| 1803 | ath5k_eeprom_free_pcal_info(ah, mode); | 1803 | ath5k_eeprom_free_pcal_info(ah, mode); |
| 1804 | } | 1804 | } |
| 1805 | |||
| 1806 | int | ||
| 1807 | ath5k_eeprom_mode_from_channel(struct ieee80211_channel *channel) | ||
| 1808 | { | ||
| 1809 | switch (channel->hw_value & CHANNEL_MODES) { | ||
| 1810 | case CHANNEL_A: | ||
| 1811 | case CHANNEL_XR: | ||
| 1812 | return AR5K_EEPROM_MODE_11A; | ||
| 1813 | case CHANNEL_G: | ||
| 1814 | return AR5K_EEPROM_MODE_11G; | ||
| 1815 | case CHANNEL_B: | ||
| 1816 | return AR5K_EEPROM_MODE_11B; | ||
| 1817 | default: | ||
| 1818 | return -1; | ||
| 1819 | } | ||
| 1820 | } | ||
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.h b/drivers/net/wireless/ath/ath5k/eeprom.h index 0017006be841..7c09e150dbdc 100644 --- a/drivers/net/wireless/ath/ath5k/eeprom.h +++ b/drivers/net/wireless/ath/ath5k/eeprom.h | |||
| @@ -517,3 +517,5 @@ struct ath5k_eeprom_info { | |||
| 517 | u32 ee_antenna[AR5K_EEPROM_N_MODES][AR5K_ANT_MAX]; | 517 | u32 ee_antenna[AR5K_EEPROM_N_MODES][AR5K_ANT_MAX]; |
| 518 | }; | 518 | }; |
| 519 | 519 | ||
| 520 | int | ||
| 521 | ath5k_eeprom_mode_from_channel(struct ieee80211_channel *channel); | ||
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c new file mode 100644 index 000000000000..d76d68c99f72 --- /dev/null +++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c | |||
| @@ -0,0 +1,774 @@ | |||
| 1 | /*- | ||
| 2 | * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting | ||
| 3 | * Copyright (c) 2004-2005 Atheros Communications, Inc. | ||
| 4 | * Copyright (c) 2006 Devicescape Software, Inc. | ||
| 5 | * Copyright (c) 2007 Jiri Slaby <jirislaby@gmail.com> | ||
| 6 | * Copyright (c) 2007 Luis R. Rodriguez <mcgrof@winlab.rutgers.edu> | ||
| 7 | * Copyright (c) 2010 Bruno Randolf <br1@einfach.org> | ||
| 8 | * | ||
| 9 | * All rights reserved. | ||
| 10 | * | ||
| 11 | * Redistribution and use in source and binary forms, with or without | ||
| 12 | * modification, are permitted provided that the following conditions | ||
| 13 | * are met: | ||
| 14 | * 1. Redistributions of source code must retain the above copyright | ||
| 15 | * notice, this list of conditions and the following disclaimer, | ||
| 16 | * without modification. | ||
| 17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | ||
| 18 | * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any | ||
| 19 | * redistribution must be conditioned upon including a substantially | ||
| 20 | * similar Disclaimer requirement for further binary redistribution. | ||
| 21 | * 3. Neither the names of the above-listed copyright holders nor the names | ||
| 22 | * of any contributors may be used to endorse or promote products derived | ||
| 23 | * from this software without specific prior written permission. | ||
| 24 | * | ||
| 25 | * Alternatively, this software may be distributed under the terms of the | ||
| 26 | * GNU General Public License ("GPL") version 2 as published by the Free | ||
| 27 | * Software Foundation. | ||
| 28 | * | ||
| 29 | * NO WARRANTY | ||
| 30 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 31 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 32 | * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY | ||
| 33 | * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL | ||
| 34 | * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, | ||
| 35 | * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| 36 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| 37 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | ||
| 38 | * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 39 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | ||
| 40 | * THE POSSIBILITY OF SUCH DAMAGES. | ||
| 41 | * | ||
| 42 | */ | ||
| 43 | |||
| 44 | #include <asm/unaligned.h> | ||
| 45 | |||
| 46 | #include "base.h" | ||
| 47 | #include "reg.h" | ||
| 48 | |||
| 49 | extern int ath5k_modparam_nohwcrypt; | ||
| 50 | |||
| 51 | /* functions used from base.c */ | ||
| 52 | void set_beacon_filter(struct ieee80211_hw *hw, bool enable); | ||
| 53 | bool ath_any_vif_assoc(struct ath5k_softc *sc); | ||
| 54 | int ath5k_tx_queue(struct ieee80211_hw *hw, struct sk_buff *skb, | ||
| 55 | struct ath5k_txq *txq); | ||
| 56 | int ath5k_init_hw(struct ath5k_softc *sc); | ||
| 57 | int ath5k_stop_hw(struct ath5k_softc *sc); | ||
| 58 | void ath5k_mode_setup(struct ath5k_softc *sc, struct ieee80211_vif *vif); | ||
| 59 | void ath5k_update_bssid_mask_and_opmode(struct ath5k_softc *sc, | ||
| 60 | struct ieee80211_vif *vif); | ||
| 61 | int ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan); | ||
| 62 | void ath5k_beacon_update_timers(struct ath5k_softc *sc, u64 bc_tsf); | ||
| 63 | int ath5k_beacon_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif); | ||
| 64 | void ath5k_beacon_config(struct ath5k_softc *sc); | ||
| 65 | void ath5k_txbuf_free_skb(struct ath5k_softc *sc, struct ath5k_buf *bf); | ||
| 66 | void ath5k_rxbuf_free_skb(struct ath5k_softc *sc, struct ath5k_buf *bf); | ||
| 67 | |||
| 68 | /********************\ | ||
| 69 | * Mac80211 functions * | ||
| 70 | \********************/ | ||
| 71 | |||
| 72 | static int | ||
| 73 | ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | ||
| 74 | { | ||
| 75 | struct ath5k_softc *sc = hw->priv; | ||
| 76 | u16 qnum = skb_get_queue_mapping(skb); | ||
| 77 | |||
| 78 | if (WARN_ON(qnum >= sc->ah->ah_capabilities.cap_queues.q_tx_num)) { | ||
| 79 | dev_kfree_skb_any(skb); | ||
| 80 | return 0; | ||
| 81 | } | ||
| 82 | |||
| 83 | return ath5k_tx_queue(hw, skb, &sc->txqs[qnum]); | ||
| 84 | } | ||
| 85 | |||
| 86 | |||
| 87 | static int | ||
| 88 | ath5k_start(struct ieee80211_hw *hw) | ||
| 89 | { | ||
| 90 | return ath5k_init_hw(hw->priv); | ||
| 91 | } | ||
| 92 | |||
| 93 | |||
| 94 | static void | ||
| 95 | ath5k_stop(struct ieee80211_hw *hw) | ||
| 96 | { | ||
| 97 | ath5k_stop_hw(hw->priv); | ||
| 98 | } | ||
| 99 | |||
| 100 | |||
| 101 | static int | ||
| 102 | ath5k_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | ||
| 103 | { | ||
| 104 | struct ath5k_softc *sc = hw->priv; | ||
| 105 | int ret; | ||
| 106 | struct ath5k_vif *avf = (void *)vif->drv_priv; | ||
| 107 | |||
| 108 | mutex_lock(&sc->lock); | ||
| 109 | |||
| 110 | if ((vif->type == NL80211_IFTYPE_AP || | ||
| 111 | vif->type == NL80211_IFTYPE_ADHOC) | ||
| 112 | && (sc->num_ap_vifs + sc->num_adhoc_vifs) >= ATH_BCBUF) { | ||
| 113 | ret = -ELNRNG; | ||
| 114 | goto end; | ||
| 115 | } | ||
| 116 | |||
| 117 | /* Don't allow other interfaces if one ad-hoc is configured. | ||
| 118 | * TODO: Fix the problems with ad-hoc and multiple other interfaces. | ||
| 119 | * We would need to operate the HW in ad-hoc mode to allow TSF updates | ||
| 120 | * for the IBSS, but this breaks with additional AP or STA interfaces | ||
| 121 | * at the moment. */ | ||
| 122 | if (sc->num_adhoc_vifs || | ||
| 123 | (sc->nvifs && vif->type == NL80211_IFTYPE_ADHOC)) { | ||
| 124 | ATH5K_ERR(sc, "Only one single ad-hoc interface is allowed.\n"); | ||
| 125 | ret = -ELNRNG; | ||
| 126 | goto end; | ||
| 127 | } | ||
| 128 | |||
| 129 | switch (vif->type) { | ||
| 130 | case NL80211_IFTYPE_AP: | ||
| 131 | case NL80211_IFTYPE_STATION: | ||
| 132 | case NL80211_IFTYPE_ADHOC: | ||
| 133 | case NL80211_IFTYPE_MESH_POINT: | ||
| 134 | avf->opmode = vif->type; | ||
| 135 | break; | ||
| 136 | default: | ||
| 137 | ret = -EOPNOTSUPP; | ||
| 138 | goto end; | ||
| 139 | } | ||
| 140 | |||
| 141 | sc->nvifs++; | ||
| 142 | ATH5K_DBG(sc, ATH5K_DEBUG_MODE, "add interface mode %d\n", avf->opmode); | ||
| 143 | |||
| 144 | /* Assign the vap/adhoc to a beacon xmit slot. */ | ||
| 145 | if ((avf->opmode == NL80211_IFTYPE_AP) || | ||
| 146 | (avf->opmode == NL80211_IFTYPE_ADHOC) || | ||
| 147 | (avf->opmode == NL80211_IFTYPE_MESH_POINT)) { | ||
| 148 | int slot; | ||
| 149 | |||
| 150 | WARN_ON(list_empty(&sc->bcbuf)); | ||
| 151 | avf->bbuf = list_first_entry(&sc->bcbuf, struct ath5k_buf, | ||
| 152 | list); | ||
| 153 | list_del(&avf->bbuf->list); | ||
| 154 | |||
| 155 | avf->bslot = 0; | ||
| 156 | for (slot = 0; slot < ATH_BCBUF; slot++) { | ||
| 157 | if (!sc->bslot[slot]) { | ||
| 158 | avf->bslot = slot; | ||
| 159 | break; | ||
| 160 | } | ||
| 161 | } | ||
| 162 | BUG_ON(sc->bslot[avf->bslot] != NULL); | ||
| 163 | sc->bslot[avf->bslot] = vif; | ||
| 164 | if (avf->opmode == NL80211_IFTYPE_AP) | ||
| 165 | sc->num_ap_vifs++; | ||
| 166 | else if (avf->opmode == NL80211_IFTYPE_ADHOC) | ||
| 167 | sc->num_adhoc_vifs++; | ||
| 168 | } | ||
| 169 | |||
| 170 | /* Any MAC address is fine, all others are included through the | ||
| 171 | * filter. | ||
| 172 | */ | ||
| 173 | memcpy(&sc->lladdr, vif->addr, ETH_ALEN); | ||
| 174 | ath5k_hw_set_lladdr(sc->ah, vif->addr); | ||
| 175 | |||
| 176 | memcpy(&avf->lladdr, vif->addr, ETH_ALEN); | ||
| 177 | |||
| 178 | ath5k_mode_setup(sc, vif); | ||
| 179 | |||
| 180 | ret = 0; | ||
| 181 | end: | ||
| 182 | mutex_unlock(&sc->lock); | ||
| 183 | return ret; | ||
| 184 | } | ||
| 185 | |||
| 186 | |||
| 187 | static void | ||
| 188 | ath5k_remove_interface(struct ieee80211_hw *hw, | ||
| 189 | struct ieee80211_vif *vif) | ||
| 190 | { | ||
| 191 | struct ath5k_softc *sc = hw->priv; | ||
| 192 | struct ath5k_vif *avf = (void *)vif->drv_priv; | ||
| 193 | unsigned int i; | ||
| 194 | |||
| 195 | mutex_lock(&sc->lock); | ||
| 196 | sc->nvifs--; | ||
| 197 | |||
| 198 | if (avf->bbuf) { | ||
| 199 | ath5k_txbuf_free_skb(sc, avf->bbuf); | ||
| 200 | list_add_tail(&avf->bbuf->list, &sc->bcbuf); | ||
| 201 | for (i = 0; i < ATH_BCBUF; i++) { | ||
| 202 | if (sc->bslot[i] == vif) { | ||
| 203 | sc->bslot[i] = NULL; | ||
| 204 | break; | ||
| 205 | } | ||
| 206 | } | ||
| 207 | avf->bbuf = NULL; | ||
| 208 | } | ||
| 209 | if (avf->opmode == NL80211_IFTYPE_AP) | ||
| 210 | sc->num_ap_vifs--; | ||
| 211 | else if (avf->opmode == NL80211_IFTYPE_ADHOC) | ||
| 212 | sc->num_adhoc_vifs--; | ||
| 213 | |||
| 214 | ath5k_update_bssid_mask_and_opmode(sc, NULL); | ||
| 215 | mutex_unlock(&sc->lock); | ||
| 216 | } | ||
| 217 | |||
| 218 | |||
| 219 | /* | ||
| 220 | * TODO: Phy disable/diversity etc | ||
| 221 | */ | ||
| 222 | static int | ||
| 223 | ath5k_config(struct ieee80211_hw *hw, u32 changed) | ||
| 224 | { | ||
| 225 | struct ath5k_softc *sc = hw->priv; | ||
| 226 | struct ath5k_hw *ah = sc->ah; | ||
| 227 | struct ieee80211_conf *conf = &hw->conf; | ||
| 228 | int ret = 0; | ||
| 229 | |||
| 230 | mutex_lock(&sc->lock); | ||
| 231 | |||
| 232 | if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { | ||
| 233 | ret = ath5k_chan_set(sc, conf->channel); | ||
| 234 | if (ret < 0) | ||
| 235 | goto unlock; | ||
| 236 | } | ||
| 237 | |||
| 238 | if ((changed & IEEE80211_CONF_CHANGE_POWER) && | ||
| 239 | (sc->power_level != conf->power_level)) { | ||
| 240 | sc->power_level = conf->power_level; | ||
| 241 | |||
| 242 | /* Half dB steps */ | ||
| 243 | ath5k_hw_set_txpower_limit(ah, (conf->power_level * 2)); | ||
| 244 | } | ||
| 245 | |||
| 246 | /* TODO: | ||
| 247 | * 1) Move this on config_interface and handle each case | ||
| 248 | * separately eg. when we have only one STA vif, use | ||
| 249 | * AR5K_ANTMODE_SINGLE_AP | ||
| 250 | * | ||
| 251 | * 2) Allow the user to change antenna mode eg. when only | ||
| 252 | * one antenna is present | ||
| 253 | * | ||
| 254 | * 3) Allow the user to set default/tx antenna when possible | ||
| 255 | * | ||
| 256 | * 4) Default mode should handle 90% of the cases, together | ||
| 257 | * with fixed a/b and single AP modes we should be able to | ||
| 258 | * handle 99%. Sectored modes are extreme cases and i still | ||
| 259 | * haven't found a usage for them. If we decide to support them, | ||
| 260 | * then we must allow the user to set how many tx antennas we | ||
| 261 | * have available | ||
| 262 | */ | ||
| 263 | ath5k_hw_set_antenna_mode(ah, ah->ah_ant_mode); | ||
| 264 | |||
| 265 | unlock: | ||
| 266 | mutex_unlock(&sc->lock); | ||
| 267 | return ret; | ||
| 268 | } | ||
| 269 | |||
| 270 | |||
| 271 | static void | ||
| 272 | ath5k_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | ||
| 273 | struct ieee80211_bss_conf *bss_conf, u32 changes) | ||
| 274 | { | ||
| 275 | struct ath5k_vif *avf = (void *)vif->drv_priv; | ||
| 276 | struct ath5k_softc *sc = hw->priv; | ||
| 277 | struct ath5k_hw *ah = sc->ah; | ||
| 278 | struct ath_common *common = ath5k_hw_common(ah); | ||
| 279 | unsigned long flags; | ||
| 280 | |||
| 281 | mutex_lock(&sc->lock); | ||
| 282 | |||
| 283 | if (changes & BSS_CHANGED_BSSID) { | ||
| 284 | /* Cache for later use during resets */ | ||
| 285 | memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); | ||
| 286 | common->curaid = 0; | ||
| 287 | ath5k_hw_set_bssid(ah); | ||
| 288 | mmiowb(); | ||
| 289 | } | ||
| 290 | |||
| 291 | if (changes & BSS_CHANGED_BEACON_INT) | ||
| 292 | sc->bintval = bss_conf->beacon_int; | ||
| 293 | |||
| 294 | if (changes & BSS_CHANGED_ASSOC) { | ||
| 295 | avf->assoc = bss_conf->assoc; | ||
| 296 | if (bss_conf->assoc) | ||
| 297 | sc->assoc = bss_conf->assoc; | ||
| 298 | else | ||
| 299 | sc->assoc = ath_any_vif_assoc(sc); | ||
| 300 | |||
| 301 | if (sc->opmode == NL80211_IFTYPE_STATION) | ||
| 302 | set_beacon_filter(hw, sc->assoc); | ||
| 303 | ath5k_hw_set_ledstate(sc->ah, sc->assoc ? | ||
| 304 | AR5K_LED_ASSOC : AR5K_LED_INIT); | ||
| 305 | if (bss_conf->assoc) { | ||
| 306 | ATH5K_DBG(sc, ATH5K_DEBUG_ANY, | ||
| 307 | "Bss Info ASSOC %d, bssid: %pM\n", | ||
| 308 | bss_conf->aid, common->curbssid); | ||
| 309 | common->curaid = bss_conf->aid; | ||
| 310 | ath5k_hw_set_bssid(ah); | ||
| 311 | /* Once ANI is available you would start it here */ | ||
| 312 | } | ||
| 313 | } | ||
| 314 | |||
| 315 | if (changes & BSS_CHANGED_BEACON) { | ||
| 316 | spin_lock_irqsave(&sc->block, flags); | ||
| 317 | ath5k_beacon_update(hw, vif); | ||
| 318 | spin_unlock_irqrestore(&sc->block, flags); | ||
| 319 | } | ||
| 320 | |||
| 321 | if (changes & BSS_CHANGED_BEACON_ENABLED) | ||
| 322 | sc->enable_beacon = bss_conf->enable_beacon; | ||
| 323 | |||
| 324 | if (changes & (BSS_CHANGED_BEACON | BSS_CHANGED_BEACON_ENABLED | | ||
| 325 | BSS_CHANGED_BEACON_INT)) | ||
| 326 | ath5k_beacon_config(sc); | ||
| 327 | |||
| 328 | mutex_unlock(&sc->lock); | ||
| 329 | } | ||
| 330 | |||
| 331 | |||
| 332 | static u64 | ||
| 333 | ath5k_prepare_multicast(struct ieee80211_hw *hw, | ||
| 334 | struct netdev_hw_addr_list *mc_list) | ||
| 335 | { | ||
| 336 | u32 mfilt[2], val; | ||
| 337 | u8 pos; | ||
| 338 | struct netdev_hw_addr *ha; | ||
| 339 | |||
| 340 | mfilt[0] = 0; | ||
| 341 | mfilt[1] = 1; | ||
| 342 | |||
| 343 | netdev_hw_addr_list_for_each(ha, mc_list) { | ||
| 344 | /* calculate XOR of eight 6-bit values */ | ||
| 345 | val = get_unaligned_le32(ha->addr + 0); | ||
| 346 | pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; | ||
| 347 | val = get_unaligned_le32(ha->addr + 3); | ||
| 348 | pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; | ||
| 349 | pos &= 0x3f; | ||
| 350 | mfilt[pos / 32] |= (1 << (pos % 32)); | ||
| 351 | /* XXX: we might be able to just do this instead, | ||
| 352 | * but not sure, needs testing, if we do use this we'd | ||
| 353 | * neet to inform below to not reset the mcast */ | ||
| 354 | /* ath5k_hw_set_mcast_filterindex(ah, | ||
| 355 | * ha->addr[5]); */ | ||
| 356 | } | ||
| 357 | |||
| 358 | return ((u64)(mfilt[1]) << 32) | mfilt[0]; | ||
| 359 | } | ||
| 360 | |||
| 361 | |||
| 362 | /* | ||
| 363 | * o always accept unicast, broadcast, and multicast traffic | ||
| 364 | * o multicast traffic for all BSSIDs will be enabled if mac80211 | ||
| 365 | * says it should be | ||
| 366 | * o maintain current state of phy ofdm or phy cck error reception. | ||
| 367 | * If the hardware detects any of these type of errors then | ||
| 368 | * ath5k_hw_get_rx_filter() will pass to us the respective | ||
| 369 | * hardware filters to be able to receive these type of frames. | ||
| 370 | * o probe request frames are accepted only when operating in | ||
| 371 | * hostap, adhoc, or monitor modes | ||
| 372 | * o enable promiscuous mode according to the interface state | ||
| 373 | * o accept beacons: | ||
| 374 | * - when operating in adhoc mode so the 802.11 layer creates | ||
| 375 | * node table entries for peers, | ||
| 376 | * - when operating in station mode for collecting rssi data when | ||
| 377 | * the station is otherwise quiet, or | ||
| 378 | * - when scanning | ||
| 379 | */ | ||
| 380 | static void | ||
| 381 | ath5k_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, | ||
| 382 | unsigned int *new_flags, u64 multicast) | ||
| 383 | { | ||
| 384 | #define SUPPORTED_FIF_FLAGS \ | ||
| 385 | (FIF_PROMISC_IN_BSS | FIF_ALLMULTI | FIF_FCSFAIL | \ | ||
| 386 | FIF_PLCPFAIL | FIF_CONTROL | FIF_OTHER_BSS | \ | ||
| 387 | FIF_BCN_PRBRESP_PROMISC) | ||
| 388 | |||
| 389 | struct ath5k_softc *sc = hw->priv; | ||
| 390 | struct ath5k_hw *ah = sc->ah; | ||
| 391 | u32 mfilt[2], rfilt; | ||
| 392 | |||
| 393 | mutex_lock(&sc->lock); | ||
| 394 | |||
| 395 | mfilt[0] = multicast; | ||
| 396 | mfilt[1] = multicast >> 32; | ||
| 397 | |||
| 398 | /* Only deal with supported flags */ | ||
| 399 | changed_flags &= SUPPORTED_FIF_FLAGS; | ||
| 400 | *new_flags &= SUPPORTED_FIF_FLAGS; | ||
| 401 | |||
| 402 | /* If HW detects any phy or radar errors, leave those filters on. | ||
| 403 | * Also, always enable Unicast, Broadcasts and Multicast | ||
| 404 | * XXX: move unicast, bssid broadcasts and multicast to mac80211 */ | ||
| 405 | rfilt = (ath5k_hw_get_rx_filter(ah) & (AR5K_RX_FILTER_PHYERR)) | | ||
| 406 | (AR5K_RX_FILTER_UCAST | AR5K_RX_FILTER_BCAST | | ||
| 407 | AR5K_RX_FILTER_MCAST); | ||
| 408 | |||
| 409 | if (changed_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) { | ||
| 410 | if (*new_flags & FIF_PROMISC_IN_BSS) | ||
| 411 | __set_bit(ATH_STAT_PROMISC, sc->status); | ||
| 412 | else | ||
| 413 | __clear_bit(ATH_STAT_PROMISC, sc->status); | ||
| 414 | } | ||
| 415 | |||
| 416 | if (test_bit(ATH_STAT_PROMISC, sc->status)) | ||
| 417 | rfilt |= AR5K_RX_FILTER_PROM; | ||
| 418 | |||
| 419 | /* Note, AR5K_RX_FILTER_MCAST is already enabled */ | ||
| 420 | if (*new_flags & FIF_ALLMULTI) { | ||
| 421 | mfilt[0] = ~0; | ||
| 422 | mfilt[1] = ~0; | ||
| 423 | } | ||
| 424 | |||
| 425 | /* This is the best we can do */ | ||
| 426 | if (*new_flags & (FIF_FCSFAIL | FIF_PLCPFAIL)) | ||
| 427 | rfilt |= AR5K_RX_FILTER_PHYERR; | ||
| 428 | |||
| 429 | /* FIF_BCN_PRBRESP_PROMISC really means to enable beacons | ||
| 430 | * and probes for any BSSID */ | ||
| 431 | if ((*new_flags & FIF_BCN_PRBRESP_PROMISC) || (sc->nvifs > 1)) | ||
| 432 | rfilt |= AR5K_RX_FILTER_BEACON; | ||
| 433 | |||
| 434 | /* FIF_CONTROL doc says that if FIF_PROMISC_IN_BSS is not | ||
| 435 | * set we should only pass on control frames for this | ||
| 436 | * station. This needs testing. I believe right now this | ||
| 437 | * enables *all* control frames, which is OK.. but | ||
| 438 | * but we should see if we can improve on granularity */ | ||
| 439 | if (*new_flags & FIF_CONTROL) | ||
| 440 | rfilt |= AR5K_RX_FILTER_CONTROL; | ||
| 441 | |||
| 442 | /* Additional settings per mode -- this is per ath5k */ | ||
| 443 | |||
| 444 | /* XXX move these to mac80211, and add a beacon IFF flag to mac80211 */ | ||
| 445 | |||
| 446 | switch (sc->opmode) { | ||
| 447 | case NL80211_IFTYPE_MESH_POINT: | ||
| 448 | rfilt |= AR5K_RX_FILTER_CONTROL | | ||
| 449 | AR5K_RX_FILTER_BEACON | | ||
| 450 | AR5K_RX_FILTER_PROBEREQ | | ||
| 451 | AR5K_RX_FILTER_PROM; | ||
| 452 | break; | ||
| 453 | case NL80211_IFTYPE_AP: | ||
| 454 | case NL80211_IFTYPE_ADHOC: | ||
| 455 | rfilt |= AR5K_RX_FILTER_PROBEREQ | | ||
| 456 | AR5K_RX_FILTER_BEACON; | ||
| 457 | break; | ||
| 458 | case NL80211_IFTYPE_STATION: | ||
| 459 | if (sc->assoc) | ||
| 460 | rfilt |= AR5K_RX_FILTER_BEACON; | ||
| 461 | default: | ||
| 462 | break; | ||
| 463 | } | ||
| 464 | |||
| 465 | /* Set filters */ | ||
| 466 | ath5k_hw_set_rx_filter(ah, rfilt); | ||
| 467 | |||
| 468 | /* Set multicast bits */ | ||
| 469 | ath5k_hw_set_mcast_filter(ah, mfilt[0], mfilt[1]); | ||
| 470 | /* Set the cached hw filter flags, this will later actually | ||
| 471 | * be set in HW */ | ||
| 472 | sc->filter_flags = rfilt; | ||
| 473 | |||
| 474 | mutex_unlock(&sc->lock); | ||
| 475 | } | ||
| 476 | |||
| 477 | |||
| 478 | static int | ||
| 479 | ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | ||
| 480 | struct ieee80211_vif *vif, struct ieee80211_sta *sta, | ||
| 481 | struct ieee80211_key_conf *key) | ||
| 482 | { | ||
| 483 | struct ath5k_softc *sc = hw->priv; | ||
| 484 | struct ath5k_hw *ah = sc->ah; | ||
| 485 | struct ath_common *common = ath5k_hw_common(ah); | ||
| 486 | int ret = 0; | ||
| 487 | |||
| 488 | if (ath5k_modparam_nohwcrypt) | ||
| 489 | return -EOPNOTSUPP; | ||
| 490 | |||
| 491 | switch (key->cipher) { | ||
| 492 | case WLAN_CIPHER_SUITE_WEP40: | ||
| 493 | case WLAN_CIPHER_SUITE_WEP104: | ||
| 494 | case WLAN_CIPHER_SUITE_TKIP: | ||
| 495 | break; | ||
| 496 | case WLAN_CIPHER_SUITE_CCMP: | ||
| 497 | if (common->crypt_caps & ATH_CRYPT_CAP_CIPHER_AESCCM) | ||
| 498 | break; | ||
| 499 | return -EOPNOTSUPP; | ||
| 500 | default: | ||
| 501 | WARN_ON(1); | ||
| 502 | return -EINVAL; | ||
| 503 | } | ||
| 504 | |||
| 505 | mutex_lock(&sc->lock); | ||
| 506 | |||
| 507 | switch (cmd) { | ||
| 508 | case SET_KEY: | ||
| 509 | ret = ath_key_config(common, vif, sta, key); | ||
| 510 | if (ret >= 0) { | ||
| 511 | key->hw_key_idx = ret; | ||
| 512 | /* push IV and Michael MIC generation to stack */ | ||
| 513 | key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; | ||
| 514 | if (key->cipher == WLAN_CIPHER_SUITE_TKIP) | ||
| 515 | key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC; | ||
| 516 | if (key->cipher == WLAN_CIPHER_SUITE_CCMP) | ||
| 517 | key->flags |= IEEE80211_KEY_FLAG_SW_MGMT; | ||
| 518 | ret = 0; | ||
| 519 | } | ||
| 520 | break; | ||
| 521 | case DISABLE_KEY: | ||
| 522 | ath_key_delete(common, key); | ||
| 523 | break; | ||
| 524 | default: | ||
| 525 | ret = -EINVAL; | ||
| 526 | } | ||
| 527 | |||
| 528 | mmiowb(); | ||
| 529 | mutex_unlock(&sc->lock); | ||
| 530 | return ret; | ||
| 531 | } | ||
| 532 | |||
| 533 | |||
| 534 | static void | ||
| 535 | ath5k_sw_scan_start(struct ieee80211_hw *hw) | ||
| 536 | { | ||
| 537 | struct ath5k_softc *sc = hw->priv; | ||
| 538 | if (!sc->assoc) | ||
| 539 | ath5k_hw_set_ledstate(sc->ah, AR5K_LED_SCAN); | ||
| 540 | } | ||
| 541 | |||
| 542 | |||
| 543 | static void | ||
| 544 | ath5k_sw_scan_complete(struct ieee80211_hw *hw) | ||
| 545 | { | ||
| 546 | struct ath5k_softc *sc = hw->priv; | ||
| 547 | ath5k_hw_set_ledstate(sc->ah, sc->assoc ? | ||
| 548 | AR5K_LED_ASSOC : AR5K_LED_INIT); | ||
| 549 | } | ||
| 550 | |||
| 551 | |||
| 552 | static int | ||
| 553 | ath5k_get_stats(struct ieee80211_hw *hw, | ||
| 554 | struct ieee80211_low_level_stats *stats) | ||
| 555 | { | ||
| 556 | struct ath5k_softc *sc = hw->priv; | ||
| 557 | |||
| 558 | /* Force update */ | ||
| 559 | ath5k_hw_update_mib_counters(sc->ah); | ||
| 560 | |||
| 561 | stats->dot11ACKFailureCount = sc->stats.ack_fail; | ||
| 562 | stats->dot11RTSFailureCount = sc->stats.rts_fail; | ||
| 563 | stats->dot11RTSSuccessCount = sc->stats.rts_ok; | ||
| 564 | stats->dot11FCSErrorCount = sc->stats.fcs_error; | ||
| 565 | |||
| 566 | return 0; | ||
| 567 | } | ||
| 568 | |||
| 569 | |||
| 570 | static int | ||
| 571 | ath5k_conf_tx(struct ieee80211_hw *hw, u16 queue, | ||
| 572 | const struct ieee80211_tx_queue_params *params) | ||
| 573 | { | ||
| 574 | struct ath5k_softc *sc = hw->priv; | ||
| 575 | struct ath5k_hw *ah = sc->ah; | ||
| 576 | struct ath5k_txq_info qi; | ||
| 577 | int ret = 0; | ||
| 578 | |||
| 579 | if (queue >= ah->ah_capabilities.cap_queues.q_tx_num) | ||
| 580 | return 0; | ||
| 581 | |||
| 582 | mutex_lock(&sc->lock); | ||
| 583 | |||
| 584 | ath5k_hw_get_tx_queueprops(ah, queue, &qi); | ||
| 585 | |||
| 586 | qi.tqi_aifs = params->aifs; | ||
| 587 | qi.tqi_cw_min = params->cw_min; | ||
| 588 | qi.tqi_cw_max = params->cw_max; | ||
| 589 | qi.tqi_burst_time = params->txop; | ||
| 590 | |||
| 591 | ATH5K_DBG(sc, ATH5K_DEBUG_ANY, | ||
| 592 | "Configure tx [queue %d], " | ||
| 593 | "aifs: %d, cw_min: %d, cw_max: %d, txop: %d\n", | ||
| 594 | queue, params->aifs, params->cw_min, | ||
| 595 | params->cw_max, params->txop); | ||
| 596 | |||
| 597 | if (ath5k_hw_set_tx_queueprops(ah, queue, &qi)) { | ||
| 598 | ATH5K_ERR(sc, | ||
| 599 | "Unable to update hardware queue %u!\n", queue); | ||
| 600 | ret = -EIO; | ||
| 601 | } else | ||
| 602 | ath5k_hw_reset_tx_queue(ah, queue); | ||
| 603 | |||
| 604 | mutex_unlock(&sc->lock); | ||
| 605 | |||
| 606 | return ret; | ||
| 607 | } | ||
| 608 | |||
| 609 | |||
| 610 | static u64 | ||
| 611 | ath5k_get_tsf(struct ieee80211_hw *hw) | ||
| 612 | { | ||
| 613 | struct ath5k_softc *sc = hw->priv; | ||
| 614 | |||
| 615 | return ath5k_hw_get_tsf64(sc->ah); | ||
| 616 | } | ||
| 617 | |||
| 618 | |||
| 619 | static void | ||
| 620 | ath5k_set_tsf(struct ieee80211_hw *hw, u64 tsf) | ||
| 621 | { | ||
| 622 | struct ath5k_softc *sc = hw->priv; | ||
| 623 | |||
| 624 | ath5k_hw_set_tsf64(sc->ah, tsf); | ||
| 625 | } | ||
| 626 | |||
| 627 | |||
| 628 | static void | ||
| 629 | ath5k_reset_tsf(struct ieee80211_hw *hw) | ||
| 630 | { | ||
| 631 | struct ath5k_softc *sc = hw->priv; | ||
| 632 | |||
| 633 | /* | ||
| 634 | * in IBSS mode we need to update the beacon timers too. | ||
| 635 | * this will also reset the TSF if we call it with 0 | ||
| 636 | */ | ||
| 637 | if (sc->opmode == NL80211_IFTYPE_ADHOC) | ||
| 638 | ath5k_beacon_update_timers(sc, 0); | ||
| 639 | else | ||
| 640 | ath5k_hw_reset_tsf(sc->ah); | ||
| 641 | } | ||
| 642 | |||
| 643 | |||
| 644 | static int | ||
| 645 | ath5k_get_survey(struct ieee80211_hw *hw, int idx, struct survey_info *survey) | ||
| 646 | { | ||
| 647 | struct ath5k_softc *sc = hw->priv; | ||
| 648 | struct ieee80211_conf *conf = &hw->conf; | ||
| 649 | struct ath_common *common = ath5k_hw_common(sc->ah); | ||
| 650 | struct ath_cycle_counters *cc = &common->cc_survey; | ||
| 651 | unsigned int div = common->clockrate * 1000; | ||
| 652 | |||
| 653 | if (idx != 0) | ||
| 654 | return -ENOENT; | ||
| 655 | |||
| 656 | spin_lock_bh(&common->cc_lock); | ||
| 657 | ath_hw_cycle_counters_update(common); | ||
| 658 | if (cc->cycles > 0) { | ||
| 659 | sc->survey.channel_time += cc->cycles / div; | ||
| 660 | sc->survey.channel_time_busy += cc->rx_busy / div; | ||
| 661 | sc->survey.channel_time_rx += cc->rx_frame / div; | ||
| 662 | sc->survey.channel_time_tx += cc->tx_frame / div; | ||
| 663 | } | ||
| 664 | memset(cc, 0, sizeof(*cc)); | ||
| 665 | spin_unlock_bh(&common->cc_lock); | ||
| 666 | |||
| 667 | memcpy(survey, &sc->survey, sizeof(*survey)); | ||
| 668 | |||
| 669 | survey->channel = conf->channel; | ||
| 670 | survey->noise = sc->ah->ah_noise_floor; | ||
| 671 | survey->filled = SURVEY_INFO_NOISE_DBM | | ||
| 672 | SURVEY_INFO_CHANNEL_TIME | | ||
| 673 | SURVEY_INFO_CHANNEL_TIME_BUSY | | ||
| 674 | SURVEY_INFO_CHANNEL_TIME_RX | | ||
| 675 | SURVEY_INFO_CHANNEL_TIME_TX; | ||
| 676 | |||
| 677 | return 0; | ||
| 678 | } | ||
| 679 | |||
| 680 | |||
| 681 | /** | ||
| 682 | * ath5k_set_coverage_class - Set IEEE 802.11 coverage class | ||
| 683 | * | ||
| 684 | * @hw: struct ieee80211_hw pointer | ||
| 685 | * @coverage_class: IEEE 802.11 coverage class number | ||
| 686 | * | ||
| 687 | * Mac80211 callback. Sets slot time, ACK timeout and CTS timeout for given | ||
| 688 | * coverage class. The values are persistent, they are restored after device | ||
| 689 | * reset. | ||
| 690 | */ | ||
| 691 | static void | ||
| 692 | ath5k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class) | ||
| 693 | { | ||
| 694 | struct ath5k_softc *sc = hw->priv; | ||
| 695 | |||
| 696 | mutex_lock(&sc->lock); | ||
| 697 | ath5k_hw_set_coverage_class(sc->ah, coverage_class); | ||
| 698 | mutex_unlock(&sc->lock); | ||
| 699 | } | ||
| 700 | |||
| 701 | |||
| 702 | static int | ||
| 703 | ath5k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) | ||
| 704 | { | ||
| 705 | struct ath5k_softc *sc = hw->priv; | ||
| 706 | |||
| 707 | if (tx_ant == 1 && rx_ant == 1) | ||
| 708 | ath5k_hw_set_antenna_mode(sc->ah, AR5K_ANTMODE_FIXED_A); | ||
| 709 | else if (tx_ant == 2 && rx_ant == 2) | ||
| 710 | ath5k_hw_set_antenna_mode(sc->ah, AR5K_ANTMODE_FIXED_B); | ||
| 711 | else if ((tx_ant & 3) == 3 && (rx_ant & 3) == 3) | ||
| 712 | ath5k_hw_set_antenna_mode(sc->ah, AR5K_ANTMODE_DEFAULT); | ||
| 713 | else | ||
| 714 | return -EINVAL; | ||
| 715 | return 0; | ||
| 716 | } | ||
| 717 | |||
| 718 | |||
| 719 | static int | ||
| 720 | ath5k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) | ||
| 721 | { | ||
| 722 | struct ath5k_softc *sc = hw->priv; | ||
| 723 | |||
| 724 | switch (sc->ah->ah_ant_mode) { | ||
| 725 | case AR5K_ANTMODE_FIXED_A: | ||
| 726 | *tx_ant = 1; *rx_ant = 1; break; | ||
| 727 | case AR5K_ANTMODE_FIXED_B: | ||
| 728 | *tx_ant = 2; *rx_ant = 2; break; | ||
| 729 | case AR5K_ANTMODE_DEFAULT: | ||
| 730 | *tx_ant = 3; *rx_ant = 3; break; | ||
| 731 | } | ||
| 732 | return 0; | ||
| 733 | } | ||
| 734 | |||
| 735 | |||
| 736 | const struct ieee80211_ops ath5k_hw_ops = { | ||
| 737 | .tx = ath5k_tx, | ||
| 738 | .start = ath5k_start, | ||
| 739 | .stop = ath5k_stop, | ||
| 740 | .add_interface = ath5k_add_interface, | ||
| 741 | /* .change_interface = not implemented */ | ||
| 742 | .remove_interface = ath5k_remove_interface, | ||
| 743 | .config = ath5k_config, | ||
| 744 | .bss_info_changed = ath5k_bss_info_changed, | ||
| 745 | .prepare_multicast = ath5k_prepare_multicast, | ||
| 746 | .configure_filter = ath5k_configure_filter, | ||
| 747 | /* .set_tim = not implemented */ | ||
| 748 | .set_key = ath5k_set_key, | ||
| 749 | /* .update_tkip_key = not implemented */ | ||
| 750 | /* .hw_scan = not implemented */ | ||
| 751 | .sw_scan_start = ath5k_sw_scan_start, | ||
| 752 | .sw_scan_complete = ath5k_sw_scan_complete, | ||
| 753 | .get_stats = ath5k_get_stats, | ||
| 754 | /* .get_tkip_seq = not implemented */ | ||
| 755 | /* .set_frag_threshold = not implemented */ | ||
| 756 | /* .set_rts_threshold = not implemented */ | ||
| 757 | /* .sta_add = not implemented */ | ||
| 758 | /* .sta_remove = not implemented */ | ||
| 759 | /* .sta_notify = not implemented */ | ||
| 760 | .conf_tx = ath5k_conf_tx, | ||
| 761 | .get_tsf = ath5k_get_tsf, | ||
| 762 | .set_tsf = ath5k_set_tsf, | ||
| 763 | .reset_tsf = ath5k_reset_tsf, | ||
| 764 | /* .tx_last_beacon = not implemented */ | ||
| 765 | /* .ampdu_action = not needed */ | ||
| 766 | .get_survey = ath5k_get_survey, | ||
| 767 | .set_coverage_class = ath5k_set_coverage_class, | ||
| 768 | /* .rfkill_poll = not implemented */ | ||
| 769 | /* .flush = not implemented */ | ||
| 770 | /* .channel_switch = not implemented */ | ||
| 771 | /* .napi_poll = not implemented */ | ||
| 772 | .set_antenna = ath5k_set_antenna, | ||
| 773 | .get_antenna = ath5k_get_antenna, | ||
| 774 | }; | ||
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index f84afb420bd8..78c26fdccad1 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c | |||
| @@ -609,10 +609,10 @@ done: | |||
| 609 | /* Write initial RF gain table to set the RF sensitivity | 609 | /* Write initial RF gain table to set the RF sensitivity |
| 610 | * this one works on all RF chips and has nothing to do | 610 | * this one works on all RF chips and has nothing to do |
| 611 | * with gain_F calibration */ | 611 | * with gain_F calibration */ |
| 612 | static int ath5k_hw_rfgain_init(struct ath5k_hw *ah, unsigned int freq) | 612 | static int ath5k_hw_rfgain_init(struct ath5k_hw *ah, enum ieee80211_band band) |
| 613 | { | 613 | { |
| 614 | const struct ath5k_ini_rfgain *ath5k_rfg; | 614 | const struct ath5k_ini_rfgain *ath5k_rfg; |
| 615 | unsigned int i, size; | 615 | unsigned int i, size, index; |
| 616 | 616 | ||
| 617 | switch (ah->ah_radio) { | 617 | switch (ah->ah_radio) { |
| 618 | case AR5K_RF5111: | 618 | case AR5K_RF5111: |
| @@ -644,17 +644,11 @@ static int ath5k_hw_rfgain_init(struct ath5k_hw *ah, unsigned int freq) | |||
| 644 | return -EINVAL; | 644 | return -EINVAL; |
| 645 | } | 645 | } |
| 646 | 646 | ||
| 647 | switch (freq) { | 647 | index = (band == IEEE80211_BAND_2GHZ) ? 1 : 0; |
| 648 | case AR5K_INI_RFGAIN_2GHZ: | ||
| 649 | case AR5K_INI_RFGAIN_5GHZ: | ||
| 650 | break; | ||
| 651 | default: | ||
| 652 | return -EINVAL; | ||
| 653 | } | ||
| 654 | 648 | ||
| 655 | for (i = 0; i < size; i++) { | 649 | for (i = 0; i < size; i++) { |
| 656 | AR5K_REG_WAIT(i); | 650 | AR5K_REG_WAIT(i); |
| 657 | ath5k_hw_reg_write(ah, ath5k_rfg[i].rfg_value[freq], | 651 | ath5k_hw_reg_write(ah, ath5k_rfg[i].rfg_value[index], |
| 658 | (u32)ath5k_rfg[i].rfg_register); | 652 | (u32)ath5k_rfg[i].rfg_register); |
| 659 | } | 653 | } |
| 660 | 654 | ||
| @@ -1361,20 +1355,7 @@ void ath5k_hw_update_noise_floor(struct ath5k_hw *ah) | |||
| 1361 | return; | 1355 | return; |
| 1362 | } | 1356 | } |
| 1363 | 1357 | ||
| 1364 | switch (ah->ah_current_channel->hw_value & CHANNEL_MODES) { | 1358 | ee_mode = ath5k_eeprom_mode_from_channel(ah->ah_current_channel); |
| 1365 | case CHANNEL_A: | ||
| 1366 | case CHANNEL_XR: | ||
| 1367 | ee_mode = AR5K_EEPROM_MODE_11A; | ||
| 1368 | break; | ||
| 1369 | case CHANNEL_G: | ||
| 1370 | ee_mode = AR5K_EEPROM_MODE_11G; | ||
| 1371 | break; | ||
| 1372 | default: | ||
| 1373 | case CHANNEL_B: | ||
| 1374 | ee_mode = AR5K_EEPROM_MODE_11B; | ||
| 1375 | break; | ||
| 1376 | } | ||
| 1377 | |||
| 1378 | 1359 | ||
| 1379 | /* completed NF calibration, test threshold */ | 1360 | /* completed NF calibration, test threshold */ |
| 1380 | nf = ath5k_hw_read_measured_noise_floor(ah); | 1361 | nf = ath5k_hw_read_measured_noise_floor(ah); |
| @@ -1935,7 +1916,8 @@ ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode) | |||
| 1935 | struct ieee80211_channel *channel = ah->ah_current_channel; | 1916 | struct ieee80211_channel *channel = ah->ah_current_channel; |
| 1936 | bool use_def_for_tx, update_def_on_tx, use_def_for_rts, fast_div; | 1917 | bool use_def_for_tx, update_def_on_tx, use_def_for_rts, fast_div; |
| 1937 | bool use_def_for_sg; | 1918 | bool use_def_for_sg; |
| 1938 | u8 def_ant, tx_ant, ee_mode; | 1919 | int ee_mode; |
| 1920 | u8 def_ant, tx_ant; | ||
| 1939 | u32 sta_id1 = 0; | 1921 | u32 sta_id1 = 0; |
| 1940 | 1922 | ||
| 1941 | /* if channel is not initialized yet we can't set the antennas | 1923 | /* if channel is not initialized yet we can't set the antennas |
| @@ -1947,18 +1929,8 @@ ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode) | |||
| 1947 | 1929 | ||
| 1948 | def_ant = ah->ah_def_ant; | 1930 | def_ant = ah->ah_def_ant; |
| 1949 | 1931 | ||
| 1950 | switch (channel->hw_value & CHANNEL_MODES) { | 1932 | ee_mode = ath5k_eeprom_mode_from_channel(channel); |
| 1951 | case CHANNEL_A: | 1933 | if (ee_mode < 0) { |
| 1952 | case CHANNEL_XR: | ||
| 1953 | ee_mode = AR5K_EEPROM_MODE_11A; | ||
| 1954 | break; | ||
| 1955 | case CHANNEL_G: | ||
| 1956 | ee_mode = AR5K_EEPROM_MODE_11G; | ||
| 1957 | break; | ||
| 1958 | case CHANNEL_B: | ||
| 1959 | ee_mode = AR5K_EEPROM_MODE_11B; | ||
| 1960 | break; | ||
| 1961 | default: | ||
| 1962 | ATH5K_ERR(ah->ah_sc, | 1934 | ATH5K_ERR(ah->ah_sc, |
| 1963 | "invalid channel: %d\n", channel->center_freq); | 1935 | "invalid channel: %d\n", channel->center_freq); |
| 1964 | return; | 1936 | return; |
| @@ -2593,7 +2565,7 @@ ath5k_combine_linear_pcdac_curves(struct ath5k_hw *ah, s16* table_min, | |||
| 2593 | 2565 | ||
| 2594 | /* Write PCDAC values on hw */ | 2566 | /* Write PCDAC values on hw */ |
| 2595 | static void | 2567 | static void |
| 2596 | ath5k_setup_pcdac_table(struct ath5k_hw *ah) | 2568 | ath5k_write_pcdac_table(struct ath5k_hw *ah) |
| 2597 | { | 2569 | { |
| 2598 | u8 *pcdac_out = ah->ah_txpower.txp_pd_table; | 2570 | u8 *pcdac_out = ah->ah_txpower.txp_pd_table; |
| 2599 | int i; | 2571 | int i; |
| @@ -2742,7 +2714,7 @@ ath5k_combine_pwr_to_pdadc_curves(struct ath5k_hw *ah, | |||
| 2742 | 2714 | ||
| 2743 | /* Write PDADC values on hw */ | 2715 | /* Write PDADC values on hw */ |
| 2744 | static void | 2716 | static void |
| 2745 | ath5k_setup_pwr_to_pdadc_table(struct ath5k_hw *ah, u8 ee_mode) | 2717 | ath5k_write_pwr_to_pdadc_table(struct ath5k_hw *ah, u8 ee_mode) |
| 2746 | { | 2718 | { |
| 2747 | struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; | 2719 | struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; |
| 2748 | u8 *pdadc_out = ah->ah_txpower.txp_pd_table; | 2720 | u8 *pdadc_out = ah->ah_txpower.txp_pd_table; |
| @@ -2957,8 +2929,7 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah, | |||
| 2957 | (s16) pcinfo_R->freq, | 2929 | (s16) pcinfo_R->freq, |
| 2958 | pcinfo_L->max_pwr, pcinfo_R->max_pwr); | 2930 | pcinfo_L->max_pwr, pcinfo_R->max_pwr); |
| 2959 | 2931 | ||
| 2960 | /* We are ready to go, fill PCDAC/PDADC | 2932 | /* Fill PCDAC/PDADC table */ |
| 2961 | * table and write settings on hardware */ | ||
| 2962 | switch (type) { | 2933 | switch (type) { |
| 2963 | case AR5K_PWRTABLE_LINEAR_PCDAC: | 2934 | case AR5K_PWRTABLE_LINEAR_PCDAC: |
| 2964 | /* For RF5112 we can have one or two curves | 2935 | /* For RF5112 we can have one or two curves |
| @@ -2971,9 +2942,6 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah, | |||
| 2971 | * match max power value with max | 2942 | * match max power value with max |
| 2972 | * table index */ | 2943 | * table index */ |
| 2973 | ah->ah_txpower.txp_offset = 64 - (table_max[0] / 2); | 2944 | ah->ah_txpower.txp_offset = 64 - (table_max[0] / 2); |
| 2974 | |||
| 2975 | /* Write settings on hw */ | ||
| 2976 | ath5k_setup_pcdac_table(ah); | ||
| 2977 | break; | 2945 | break; |
| 2978 | case AR5K_PWRTABLE_PWR_TO_PCDAC: | 2946 | case AR5K_PWRTABLE_PWR_TO_PCDAC: |
| 2979 | /* We are done for RF5111 since it has only | 2947 | /* We are done for RF5111 since it has only |
| @@ -2983,9 +2951,6 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah, | |||
| 2983 | /* No rate powertable adjustment for RF5111 */ | 2951 | /* No rate powertable adjustment for RF5111 */ |
| 2984 | ah->ah_txpower.txp_min_idx = 0; | 2952 | ah->ah_txpower.txp_min_idx = 0; |
| 2985 | ah->ah_txpower.txp_offset = 0; | 2953 | ah->ah_txpower.txp_offset = 0; |
| 2986 | |||
| 2987 | /* Write settings on hw */ | ||
| 2988 | ath5k_setup_pcdac_table(ah); | ||
| 2989 | break; | 2954 | break; |
| 2990 | case AR5K_PWRTABLE_PWR_TO_PDADC: | 2955 | case AR5K_PWRTABLE_PWR_TO_PDADC: |
| 2991 | /* Set PDADC boundaries and fill | 2956 | /* Set PDADC boundaries and fill |
| @@ -2993,9 +2958,6 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah, | |||
| 2993 | ath5k_combine_pwr_to_pdadc_curves(ah, table_min, table_max, | 2958 | ath5k_combine_pwr_to_pdadc_curves(ah, table_min, table_max, |
| 2994 | ee->ee_pd_gains[ee_mode]); | 2959 | ee->ee_pd_gains[ee_mode]); |
| 2995 | 2960 | ||
| 2996 | /* Write settings on hw */ | ||
| 2997 | ath5k_setup_pwr_to_pdadc_table(ah, ee_mode); | ||
| 2998 | |||
| 2999 | /* Set txp.offset, note that table_min | 2961 | /* Set txp.offset, note that table_min |
| 3000 | * can be negative */ | 2962 | * can be negative */ |
| 3001 | ah->ah_txpower.txp_offset = table_min[0]; | 2963 | ah->ah_txpower.txp_offset = table_min[0]; |
| @@ -3004,9 +2966,20 @@ ath5k_setup_channel_powertable(struct ath5k_hw *ah, | |||
| 3004 | return -EINVAL; | 2966 | return -EINVAL; |
| 3005 | } | 2967 | } |
| 3006 | 2968 | ||
| 2969 | ah->ah_txpower.txp_setup = true; | ||
| 2970 | |||
| 3007 | return 0; | 2971 | return 0; |
| 3008 | } | 2972 | } |
| 3009 | 2973 | ||
| 2974 | /* Write power table for current channel to hw */ | ||
| 2975 | static void | ||
| 2976 | ath5k_write_channel_powertable(struct ath5k_hw *ah, u8 ee_mode, u8 type) | ||
| 2977 | { | ||
| 2978 | if (type == AR5K_PWRTABLE_PWR_TO_PDADC) | ||
| 2979 | ath5k_write_pwr_to_pdadc_table(ah, ee_mode); | ||
| 2980 | else | ||
| 2981 | ath5k_write_pcdac_table(ah); | ||
| 2982 | } | ||
| 3010 | 2983 | ||
| 3011 | /* | 2984 | /* |
| 3012 | * Per-rate tx power setting | 2985 | * Per-rate tx power setting |
| @@ -3095,7 +3068,7 @@ ath5k_setup_rate_powertable(struct ath5k_hw *ah, u16 max_pwr, | |||
| 3095 | 3068 | ||
| 3096 | /* Min/max in 0.25dB units */ | 3069 | /* Min/max in 0.25dB units */ |
| 3097 | ah->ah_txpower.txp_min_pwr = 2 * rates[7]; | 3070 | ah->ah_txpower.txp_min_pwr = 2 * rates[7]; |
| 3098 | ah->ah_txpower.txp_max_pwr = 2 * rates[0]; | 3071 | ah->ah_txpower.txp_cur_pwr = 2 * rates[0]; |
| 3099 | ah->ah_txpower.txp_ofdm = rates[7]; | 3072 | ah->ah_txpower.txp_ofdm = rates[7]; |
| 3100 | } | 3073 | } |
| 3101 | 3074 | ||
| @@ -3105,9 +3078,11 @@ ath5k_setup_rate_powertable(struct ath5k_hw *ah, u16 max_pwr, | |||
| 3105 | */ | 3078 | */ |
| 3106 | static int | 3079 | static int |
| 3107 | ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel, | 3080 | ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel, |
| 3108 | u8 ee_mode, u8 txpower, bool fast) | 3081 | u8 txpower) |
| 3109 | { | 3082 | { |
| 3110 | struct ath5k_rate_pcal_info rate_info; | 3083 | struct ath5k_rate_pcal_info rate_info; |
| 3084 | struct ieee80211_channel *curr_channel = ah->ah_current_channel; | ||
| 3085 | int ee_mode; | ||
| 3111 | u8 type; | 3086 | u8 type; |
| 3112 | int ret; | 3087 | int ret; |
| 3113 | 3088 | ||
| @@ -3116,6 +3091,13 @@ ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel, | |||
| 3116 | return -EINVAL; | 3091 | return -EINVAL; |
| 3117 | } | 3092 | } |
| 3118 | 3093 | ||
| 3094 | ee_mode = ath5k_eeprom_mode_from_channel(channel); | ||
| 3095 | if (ee_mode < 0) { | ||
| 3096 | ATH5K_ERR(ah->ah_sc, | ||
| 3097 | "invalid channel: %d\n", channel->center_freq); | ||
| 3098 | return -EINVAL; | ||
| 3099 | } | ||
| 3100 | |||
| 3119 | /* Initialize TX power table */ | 3101 | /* Initialize TX power table */ |
| 3120 | switch (ah->ah_radio) { | 3102 | switch (ah->ah_radio) { |
| 3121 | case AR5K_RF5110: | 3103 | case AR5K_RF5110: |
| @@ -3138,28 +3120,26 @@ ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel, | |||
| 3138 | return -EINVAL; | 3120 | return -EINVAL; |
| 3139 | } | 3121 | } |
| 3140 | 3122 | ||
| 3141 | /* If fast is set it means we are on the same channel/mode | 3123 | /* |
| 3142 | * so there is no need to recalculate the powertable, we 'll | 3124 | * If we don't change channel/mode skip tx powertable calculation |
| 3143 | * just use the cached one */ | 3125 | * and use the cached one. |
| 3144 | if (!fast) { | 3126 | */ |
| 3127 | if (!ah->ah_txpower.txp_setup || | ||
| 3128 | (channel->hw_value != curr_channel->hw_value) || | ||
| 3129 | (channel->center_freq != curr_channel->center_freq)) { | ||
| 3145 | /* Reset TX power values */ | 3130 | /* Reset TX power values */ |
| 3146 | memset(&ah->ah_txpower, 0, sizeof(ah->ah_txpower)); | 3131 | memset(&ah->ah_txpower, 0, sizeof(ah->ah_txpower)); |
| 3147 | ah->ah_txpower.txp_tpc = AR5K_TUNE_TPC_TXPOWER; | 3132 | ah->ah_txpower.txp_tpc = AR5K_TUNE_TPC_TXPOWER; |
| 3148 | ah->ah_txpower.txp_min_pwr = 0; | ||
| 3149 | ah->ah_txpower.txp_max_pwr = AR5K_TUNE_MAX_TXPOWER; | ||
| 3150 | 3133 | ||
| 3151 | /* Calculate the powertable */ | 3134 | /* Calculate the powertable */ |
| 3152 | ret = ath5k_setup_channel_powertable(ah, channel, | 3135 | ret = ath5k_setup_channel_powertable(ah, channel, |
| 3153 | ee_mode, type); | 3136 | ee_mode, type); |
| 3154 | if (ret) | 3137 | if (ret) |
| 3155 | return ret; | 3138 | return ret; |
| 3156 | /* Write cached table on hw */ | 3139 | } |
| 3157 | } else if (type == AR5K_PWRTABLE_PWR_TO_PDADC) | ||
| 3158 | ath5k_setup_pwr_to_pdadc_table(ah, ee_mode); | ||
| 3159 | else | ||
| 3160 | ath5k_setup_pcdac_table(ah); | ||
| 3161 | |||
| 3162 | 3140 | ||
| 3141 | /* Write table on hw */ | ||
| 3142 | ath5k_write_channel_powertable(ah, ee_mode, type); | ||
| 3163 | 3143 | ||
| 3164 | /* Limit max power if we have a CTL available */ | 3144 | /* Limit max power if we have a CTL available */ |
| 3165 | ath5k_get_max_ctl_power(ah, channel); | 3145 | ath5k_get_max_ctl_power(ah, channel); |
| @@ -3214,31 +3194,10 @@ ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel, | |||
| 3214 | 3194 | ||
| 3215 | int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 txpower) | 3195 | int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 txpower) |
| 3216 | { | 3196 | { |
| 3217 | /*Just a try M.F.*/ | ||
| 3218 | struct ieee80211_channel *channel = ah->ah_current_channel; | ||
| 3219 | u8 ee_mode; | ||
| 3220 | |||
| 3221 | switch (channel->hw_value & CHANNEL_MODES) { | ||
| 3222 | case CHANNEL_A: | ||
| 3223 | case CHANNEL_XR: | ||
| 3224 | ee_mode = AR5K_EEPROM_MODE_11A; | ||
| 3225 | break; | ||
| 3226 | case CHANNEL_G: | ||
| 3227 | ee_mode = AR5K_EEPROM_MODE_11G; | ||
| 3228 | break; | ||
| 3229 | case CHANNEL_B: | ||
| 3230 | ee_mode = AR5K_EEPROM_MODE_11B; | ||
| 3231 | break; | ||
| 3232 | default: | ||
| 3233 | ATH5K_ERR(ah->ah_sc, | ||
| 3234 | "invalid channel: %d\n", channel->center_freq); | ||
| 3235 | return -EINVAL; | ||
| 3236 | } | ||
| 3237 | |||
| 3238 | ATH5K_DBG(ah->ah_sc, ATH5K_DEBUG_TXPOWER, | 3197 | ATH5K_DBG(ah->ah_sc, ATH5K_DEBUG_TXPOWER, |
| 3239 | "changing txpower to %d\n", txpower); | 3198 | "changing txpower to %d\n", txpower); |
| 3240 | 3199 | ||
| 3241 | return ath5k_hw_txpower(ah, channel, ee_mode, txpower, true); | 3200 | return ath5k_hw_txpower(ah, ah->ah_current_channel, txpower); |
| 3242 | } | 3201 | } |
| 3243 | 3202 | ||
| 3244 | /*************\ | 3203 | /*************\ |
| @@ -3246,12 +3205,11 @@ int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 txpower) | |||
| 3246 | \*************/ | 3205 | \*************/ |
| 3247 | 3206 | ||
| 3248 | int ath5k_hw_phy_init(struct ath5k_hw *ah, struct ieee80211_channel *channel, | 3207 | int ath5k_hw_phy_init(struct ath5k_hw *ah, struct ieee80211_channel *channel, |
| 3249 | u8 mode, u8 ee_mode, u8 freq, bool fast) | 3208 | u8 mode, bool fast) |
| 3250 | { | 3209 | { |
| 3251 | struct ieee80211_channel *curr_channel; | 3210 | struct ieee80211_channel *curr_channel; |
| 3252 | int ret, i; | 3211 | int ret, i; |
| 3253 | u32 phy_tst1; | 3212 | u32 phy_tst1; |
| 3254 | bool fast_txp; | ||
| 3255 | ret = 0; | 3213 | ret = 0; |
| 3256 | 3214 | ||
| 3257 | /* | 3215 | /* |
| @@ -3282,26 +3240,14 @@ int ath5k_hw_phy_init(struct ath5k_hw *ah, struct ieee80211_channel *channel, | |||
| 3282 | } | 3240 | } |
| 3283 | 3241 | ||
| 3284 | /* | 3242 | /* |
| 3285 | * If we don't change channel/mode skip | ||
| 3286 | * tx powertable calculation and use the | ||
| 3287 | * cached one. | ||
| 3288 | */ | ||
| 3289 | if ((channel->hw_value == curr_channel->hw_value) && | ||
| 3290 | (channel->center_freq == curr_channel->center_freq)) | ||
| 3291 | fast_txp = true; | ||
| 3292 | else | ||
| 3293 | fast_txp = false; | ||
| 3294 | |||
| 3295 | /* | ||
| 3296 | * Set TX power | 3243 | * Set TX power |
| 3297 | * | 3244 | * |
| 3298 | * Note: We need to do that before we set | 3245 | * Note: We need to do that before we set |
| 3299 | * RF buffer settings on 5211/5212+ so that we | 3246 | * RF buffer settings on 5211/5212+ so that we |
| 3300 | * properly set curve indices. | 3247 | * properly set curve indices. |
| 3301 | */ | 3248 | */ |
| 3302 | ret = ath5k_hw_txpower(ah, channel, ee_mode, | 3249 | ret = ath5k_hw_txpower(ah, channel, ah->ah_txpower.txp_cur_pwr ? |
| 3303 | ah->ah_txpower.txp_max_pwr / 2, | 3250 | ah->ah_txpower.txp_cur_pwr / 2 : AR5K_TUNE_MAX_TXPOWER); |
| 3304 | fast_txp); | ||
| 3305 | if (ret) | 3251 | if (ret) |
| 3306 | return ret; | 3252 | return ret; |
| 3307 | 3253 | ||
| @@ -3317,7 +3263,7 @@ int ath5k_hw_phy_init(struct ath5k_hw *ah, struct ieee80211_channel *channel, | |||
| 3317 | * Write initial RF gain settings | 3263 | * Write initial RF gain settings |
| 3318 | * This should work for both 5111/5112 | 3264 | * This should work for both 5111/5112 |
| 3319 | */ | 3265 | */ |
| 3320 | ret = ath5k_hw_rfgain_init(ah, freq); | 3266 | ret = ath5k_hw_rfgain_init(ah, channel->band); |
| 3321 | if (ret) | 3267 | if (ret) |
| 3322 | return ret; | 3268 | return ret; |
| 3323 | 3269 | ||
diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c index bc84aaa31446..84206898f77d 100644 --- a/drivers/net/wireless/ath/ath5k/reset.c +++ b/drivers/net/wireless/ath/ath5k/reset.c | |||
| @@ -537,7 +537,7 @@ int ath5k_hw_on_hold(struct ath5k_hw *ah) | |||
| 537 | * we ingore that flag for PCI-E cards. On PCI cards | 537 | * we ingore that flag for PCI-E cards. On PCI cards |
| 538 | * this flag gets cleared after 64 PCI clocks. | 538 | * this flag gets cleared after 64 PCI clocks. |
| 539 | */ | 539 | */ |
| 540 | bus_flags = (pdev && pdev->is_pcie) ? 0 : AR5K_RESET_CTL_PCI; | 540 | bus_flags = (pdev && pci_is_pcie(pdev)) ? 0 : AR5K_RESET_CTL_PCI; |
| 541 | 541 | ||
| 542 | if (ah->ah_version == AR5K_AR5210) { | 542 | if (ah->ah_version == AR5K_AR5210) { |
| 543 | ret = ath5k_hw_nic_reset(ah, AR5K_RESET_CTL_PCU | | 543 | ret = ath5k_hw_nic_reset(ah, AR5K_RESET_CTL_PCU | |
| @@ -594,7 +594,7 @@ int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial) | |||
| 594 | * we ingore that flag for PCI-E cards. On PCI cards | 594 | * we ingore that flag for PCI-E cards. On PCI cards |
| 595 | * this flag gets cleared after 64 PCI clocks. | 595 | * this flag gets cleared after 64 PCI clocks. |
| 596 | */ | 596 | */ |
| 597 | bus_flags = (pdev && pdev->is_pcie) ? 0 : AR5K_RESET_CTL_PCI; | 597 | bus_flags = (pdev && pci_is_pcie(pdev)) ? 0 : AR5K_RESET_CTL_PCI; |
| 598 | 598 | ||
| 599 | if (ah->ah_version == AR5K_AR5210) { | 599 | if (ah->ah_version == AR5K_AR5210) { |
| 600 | ret = ath5k_hw_nic_reset(ah, AR5K_RESET_CTL_PCU | | 600 | ret = ath5k_hw_nic_reset(ah, AR5K_RESET_CTL_PCU | |
| @@ -866,15 +866,18 @@ static void ath5k_hw_tweak_initval_settings(struct ath5k_hw *ah, | |||
| 866 | } | 866 | } |
| 867 | 867 | ||
| 868 | static void ath5k_hw_commit_eeprom_settings(struct ath5k_hw *ah, | 868 | static void ath5k_hw_commit_eeprom_settings(struct ath5k_hw *ah, |
| 869 | struct ieee80211_channel *channel, u8 ee_mode) | 869 | struct ieee80211_channel *channel) |
| 870 | { | 870 | { |
| 871 | struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; | 871 | struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; |
| 872 | s16 cck_ofdm_pwr_delta; | 872 | s16 cck_ofdm_pwr_delta; |
| 873 | u8 ee_mode; | ||
| 873 | 874 | ||
| 874 | /* TODO: Add support for AR5210 EEPROM */ | 875 | /* TODO: Add support for AR5210 EEPROM */ |
| 875 | if (ah->ah_version == AR5K_AR5210) | 876 | if (ah->ah_version == AR5K_AR5210) |
| 876 | return; | 877 | return; |
| 877 | 878 | ||
| 879 | ee_mode = ath5k_eeprom_mode_from_channel(channel); | ||
| 880 | |||
| 878 | /* Adjust power delta for channel 14 */ | 881 | /* Adjust power delta for channel 14 */ |
| 879 | if (channel->center_freq == 2484) | 882 | if (channel->center_freq == 2484) |
| 880 | cck_ofdm_pwr_delta = | 883 | cck_ofdm_pwr_delta = |
| @@ -1020,13 +1023,11 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, | |||
| 1020 | struct ieee80211_channel *channel, bool fast, bool skip_pcu) | 1023 | struct ieee80211_channel *channel, bool fast, bool skip_pcu) |
| 1021 | { | 1024 | { |
| 1022 | u32 s_seq[10], s_led[3], tsf_up, tsf_lo; | 1025 | u32 s_seq[10], s_led[3], tsf_up, tsf_lo; |
| 1023 | u8 mode, freq, ee_mode; | 1026 | u8 mode; |
| 1024 | int i, ret; | 1027 | int i, ret; |
| 1025 | 1028 | ||
| 1026 | ee_mode = 0; | ||
| 1027 | tsf_up = 0; | 1029 | tsf_up = 0; |
| 1028 | tsf_lo = 0; | 1030 | tsf_lo = 0; |
| 1029 | freq = 0; | ||
| 1030 | mode = 0; | 1031 | mode = 0; |
| 1031 | 1032 | ||
| 1032 | /* | 1033 | /* |
| @@ -1071,8 +1072,6 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, | |||
| 1071 | switch (channel->hw_value & CHANNEL_MODES) { | 1072 | switch (channel->hw_value & CHANNEL_MODES) { |
| 1072 | case CHANNEL_A: | 1073 | case CHANNEL_A: |
| 1073 | mode = AR5K_MODE_11A; | 1074 | mode = AR5K_MODE_11A; |
| 1074 | freq = AR5K_INI_RFGAIN_5GHZ; | ||
| 1075 | ee_mode = AR5K_EEPROM_MODE_11A; | ||
| 1076 | break; | 1075 | break; |
| 1077 | case CHANNEL_G: | 1076 | case CHANNEL_G: |
| 1078 | 1077 | ||
| @@ -1083,8 +1082,6 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, | |||
| 1083 | } | 1082 | } |
| 1084 | 1083 | ||
| 1085 | mode = AR5K_MODE_11G; | 1084 | mode = AR5K_MODE_11G; |
| 1086 | freq = AR5K_INI_RFGAIN_2GHZ; | ||
| 1087 | ee_mode = AR5K_EEPROM_MODE_11G; | ||
| 1088 | break; | 1085 | break; |
| 1089 | case CHANNEL_B: | 1086 | case CHANNEL_B: |
| 1090 | 1087 | ||
| @@ -1095,8 +1092,6 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, | |||
| 1095 | } | 1092 | } |
| 1096 | 1093 | ||
| 1097 | mode = AR5K_MODE_11B; | 1094 | mode = AR5K_MODE_11B; |
| 1098 | freq = AR5K_INI_RFGAIN_2GHZ; | ||
| 1099 | ee_mode = AR5K_EEPROM_MODE_11B; | ||
| 1100 | break; | 1095 | break; |
| 1101 | case CHANNEL_XR: | 1096 | case CHANNEL_XR: |
| 1102 | if (ah->ah_version == AR5K_AR5211) { | 1097 | if (ah->ah_version == AR5K_AR5211) { |
| @@ -1105,8 +1100,6 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, | |||
| 1105 | return -EINVAL; | 1100 | return -EINVAL; |
| 1106 | } | 1101 | } |
| 1107 | mode = AR5K_MODE_XR; | 1102 | mode = AR5K_MODE_XR; |
| 1108 | freq = AR5K_INI_RFGAIN_5GHZ; | ||
| 1109 | ee_mode = AR5K_EEPROM_MODE_11A; | ||
| 1110 | break; | 1103 | break; |
| 1111 | default: | 1104 | default: |
| 1112 | ATH5K_ERR(ah->ah_sc, | 1105 | ATH5K_ERR(ah->ah_sc, |
| @@ -1119,8 +1112,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, | |||
| 1119 | * go on. If it fails continue with a normal reset. | 1112 | * go on. If it fails continue with a normal reset. |
| 1120 | */ | 1113 | */ |
| 1121 | if (fast) { | 1114 | if (fast) { |
| 1122 | ret = ath5k_hw_phy_init(ah, channel, mode, | 1115 | ret = ath5k_hw_phy_init(ah, channel, mode, true); |
| 1123 | ee_mode, freq, true); | ||
| 1124 | if (ret) { | 1116 | if (ret) { |
| 1125 | ATH5K_DBG(ah->ah_sc, ATH5K_DEBUG_RESET, | 1117 | ATH5K_DBG(ah->ah_sc, ATH5K_DEBUG_RESET, |
| 1126 | "fast chan change failed, falling back to normal reset\n"); | 1118 | "fast chan change failed, falling back to normal reset\n"); |
| @@ -1217,7 +1209,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, | |||
| 1217 | ath5k_hw_tweak_initval_settings(ah, channel); | 1209 | ath5k_hw_tweak_initval_settings(ah, channel); |
| 1218 | 1210 | ||
| 1219 | /* Commit values from EEPROM */ | 1211 | /* Commit values from EEPROM */ |
| 1220 | ath5k_hw_commit_eeprom_settings(ah, channel, ee_mode); | 1212 | ath5k_hw_commit_eeprom_settings(ah, channel); |
| 1221 | 1213 | ||
| 1222 | 1214 | ||
| 1223 | /* | 1215 | /* |
| @@ -1256,7 +1248,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, | |||
| 1256 | /* | 1248 | /* |
| 1257 | * Initialize PHY | 1249 | * Initialize PHY |
| 1258 | */ | 1250 | */ |
| 1259 | ret = ath5k_hw_phy_init(ah, channel, mode, ee_mode, freq, false); | 1251 | ret = ath5k_hw_phy_init(ah, channel, mode, false); |
| 1260 | if (ret) { | 1252 | if (ret) { |
| 1261 | ATH5K_ERR(ah->ah_sc, | 1253 | ATH5K_ERR(ah->ah_sc, |
| 1262 | "failed to initialize PHY (%i) !\n", ret); | 1254 | "failed to initialize PHY (%i) !\n", ret); |
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c index fdb5a835fdcf..f8a7771faee2 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | int modparam_force_new_ani; | 23 | int modparam_force_new_ani; |
| 24 | module_param_named(force_new_ani, modparam_force_new_ani, int, 0444); | 24 | module_param_named(force_new_ani, modparam_force_new_ani, int, 0444); |
| 25 | MODULE_PARM_DESC(nohwcrypt, "Force new ANI for AR5008, AR9001, AR9002"); | 25 | MODULE_PARM_DESC(force_new_ani, "Force new ANI for AR5008, AR9001, AR9002"); |
| 26 | 26 | ||
| 27 | /* General hardware code for the A5008/AR9001/AR9002 hadware families */ | 27 | /* General hardware code for the A5008/AR9001/AR9002 hadware families */ |
| 28 | 28 | ||
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_phy.c b/drivers/net/wireless/ath/ath9k/ar9002_phy.c index 7ae66a889f5a..7d68d61e406b 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c | |||
| @@ -203,13 +203,14 @@ static void ar9002_hw_spur_mitigate(struct ath_hw *ah, | |||
| 203 | for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { | 203 | for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { |
| 204 | cur_bb_spur = ah->eep_ops->get_spur_channel(ah, i, is2GHz); | 204 | cur_bb_spur = ah->eep_ops->get_spur_channel(ah, i, is2GHz); |
| 205 | 205 | ||
| 206 | if (AR_NO_SPUR == cur_bb_spur) | ||
| 207 | break; | ||
| 208 | |||
| 206 | if (is2GHz) | 209 | if (is2GHz) |
| 207 | cur_bb_spur = (cur_bb_spur / 10) + AR_BASE_FREQ_2GHZ; | 210 | cur_bb_spur = (cur_bb_spur / 10) + AR_BASE_FREQ_2GHZ; |
| 208 | else | 211 | else |
| 209 | cur_bb_spur = (cur_bb_spur / 10) + AR_BASE_FREQ_5GHZ; | 212 | cur_bb_spur = (cur_bb_spur / 10) + AR_BASE_FREQ_5GHZ; |
| 210 | 213 | ||
| 211 | if (AR_NO_SPUR == cur_bb_spur) | ||
| 212 | break; | ||
| 213 | cur_bb_spur = cur_bb_spur - freq; | 214 | cur_bb_spur = cur_bb_spur - freq; |
| 214 | 215 | ||
| 215 | if (IS_CHAN_HT40(chan)) { | 216 | if (IS_CHAN_HT40(chan)) { |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 466d2bf02eab..4819747fa4c3 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
| @@ -59,6 +59,8 @@ | |||
| 59 | 59 | ||
| 60 | #define CTL(_tpower, _flag) ((_tpower) | ((_flag) << 6)) | 60 | #define CTL(_tpower, _flag) ((_tpower) | ((_flag) << 6)) |
| 61 | 61 | ||
| 62 | #define EEPROM_DATA_LEN_9485 1088 | ||
| 63 | |||
| 62 | static int ar9003_hw_power_interpolate(int32_t x, | 64 | static int ar9003_hw_power_interpolate(int32_t x, |
| 63 | int32_t *px, int32_t *py, u_int16_t np); | 65 | int32_t *px, int32_t *py, u_int16_t np); |
| 64 | 66 | ||
| @@ -3368,7 +3370,7 @@ found: | |||
| 3368 | "Found block at %x: code=%d ref=%d length=%d major=%d minor=%d\n", | 3370 | "Found block at %x: code=%d ref=%d length=%d major=%d minor=%d\n", |
| 3369 | cptr, code, reference, length, major, minor); | 3371 | cptr, code, reference, length, major, minor); |
| 3370 | if ((!AR_SREV_9485(ah) && length >= 1024) || | 3372 | if ((!AR_SREV_9485(ah) && length >= 1024) || |
| 3371 | (AR_SREV_9485(ah) && length >= (4 * 1024))) { | 3373 | (AR_SREV_9485(ah) && length > EEPROM_DATA_LEN_9485)) { |
| 3372 | ath_dbg(common, ATH_DBG_EEPROM, | 3374 | ath_dbg(common, ATH_DBG_EEPROM, |
| 3373 | "Skipping bad header\n"); | 3375 | "Skipping bad header\n"); |
| 3374 | cptr -= COMP_HDR_LEN; | 3376 | cptr -= COMP_HDR_LEN; |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c index b6e4ee48ef78..4ceddbbdfcee 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c | |||
| @@ -613,9 +613,9 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs, | |||
| 613 | * possibly be reviewing the last subframe. AR_CRCErr | 613 | * possibly be reviewing the last subframe. AR_CRCErr |
| 614 | * is the CRC of the actual data. | 614 | * is the CRC of the actual data. |
| 615 | */ | 615 | */ |
| 616 | if (rxsp->status11 & AR_CRCErr) { | 616 | if (rxsp->status11 & AR_CRCErr) |
| 617 | rxs->rs_status |= ATH9K_RXERR_CRC; | 617 | rxs->rs_status |= ATH9K_RXERR_CRC; |
| 618 | } else if (rxsp->status11 & AR_PHYErr) { | 618 | if (rxsp->status11 & AR_PHYErr) { |
| 619 | phyerr = MS(rxsp->status11, AR_PHYErrCode); | 619 | phyerr = MS(rxsp->status11, AR_PHYErrCode); |
| 620 | /* | 620 | /* |
| 621 | * If we reach a point here where AR_PostDelimCRCErr is | 621 | * If we reach a point here where AR_PostDelimCRCErr is |
| @@ -638,11 +638,12 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs, | |||
| 638 | rxs->rs_phyerr = phyerr; | 638 | rxs->rs_phyerr = phyerr; |
| 639 | } | 639 | } |
| 640 | 640 | ||
| 641 | } else if (rxsp->status11 & AR_DecryptCRCErr) { | 641 | } |
| 642 | if (rxsp->status11 & AR_DecryptCRCErr) | ||
| 642 | rxs->rs_status |= ATH9K_RXERR_DECRYPT; | 643 | rxs->rs_status |= ATH9K_RXERR_DECRYPT; |
| 643 | } else if (rxsp->status11 & AR_MichaelErr) { | 644 | if (rxsp->status11 & AR_MichaelErr) |
| 644 | rxs->rs_status |= ATH9K_RXERR_MIC; | 645 | rxs->rs_status |= ATH9K_RXERR_MIC; |
| 645 | } else if (rxsp->status11 & AR_KeyMiss) | 646 | if (rxsp->status11 & AR_KeyMiss) |
| 646 | rxs->rs_status |= ATH9K_RXERR_DECRYPT; | 647 | rxs->rs_status |= ATH9K_RXERR_DECRYPT; |
| 647 | } | 648 | } |
| 648 | 649 | ||
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 2c31f5142eda..3681caf54282 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
| @@ -664,11 +664,13 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz) | |||
| 664 | } | 664 | } |
| 665 | 665 | ||
| 666 | extern struct ieee80211_ops ath9k_ops; | 666 | extern struct ieee80211_ops ath9k_ops; |
| 667 | extern int modparam_nohwcrypt; | 667 | extern int ath9k_modparam_nohwcrypt; |
| 668 | extern int led_blink; | 668 | extern int led_blink; |
| 669 | extern int ath9k_pm_qos_value; | 669 | extern int ath9k_pm_qos_value; |
| 670 | extern bool is_ath9k_unloaded; | ||
| 670 | 671 | ||
| 671 | irqreturn_t ath_isr(int irq, void *dev); | 672 | irqreturn_t ath_isr(int irq, void *dev); |
| 673 | void ath9k_init_crypto(struct ath_softc *sc); | ||
| 672 | int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, | 674 | int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, |
| 673 | const struct ath_bus_ops *bus_ops); | 675 | const struct ath_bus_ops *bus_ops); |
| 674 | void ath9k_deinit_device(struct ath_softc *sc); | 676 | void ath9k_deinit_device(struct ath_softc *sc); |
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index 5e108c086904..385ba03134ba 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c | |||
| @@ -566,8 +566,6 @@ static void ath_beacon_config_sta(struct ath_softc *sc, | |||
| 566 | * last beacon we received (which may be none). | 566 | * last beacon we received (which may be none). |
| 567 | */ | 567 | */ |
| 568 | dtimperiod = conf->dtim_period; | 568 | dtimperiod = conf->dtim_period; |
| 569 | if (dtimperiod <= 0) /* NB: 0 if not known */ | ||
| 570 | dtimperiod = 1; | ||
| 571 | dtimcount = conf->dtim_count; | 569 | dtimcount = conf->dtim_count; |
| 572 | if (dtimcount >= dtimperiod) /* NB: sanity check */ | 570 | if (dtimcount >= dtimperiod) /* NB: sanity check */ |
| 573 | dtimcount = 0; | 571 | dtimcount = 0; |
| @@ -575,8 +573,6 @@ static void ath_beacon_config_sta(struct ath_softc *sc, | |||
| 575 | cfpcount = 0; | 573 | cfpcount = 0; |
| 576 | 574 | ||
| 577 | sleepduration = conf->listen_interval * intval; | 575 | sleepduration = conf->listen_interval * intval; |
| 578 | if (sleepduration <= 0) | ||
| 579 | sleepduration = intval; | ||
| 580 | 576 | ||
| 581 | /* | 577 | /* |
| 582 | * Pull nexttbtt forward to reflect the current | 578 | * Pull nexttbtt forward to reflect the current |
| @@ -662,8 +658,7 @@ static void ath_beacon_config_sta(struct ath_softc *sc, | |||
| 662 | } | 658 | } |
| 663 | 659 | ||
| 664 | static void ath_beacon_config_adhoc(struct ath_softc *sc, | 660 | static void ath_beacon_config_adhoc(struct ath_softc *sc, |
| 665 | struct ath_beacon_config *conf, | 661 | struct ath_beacon_config *conf) |
| 666 | struct ieee80211_vif *vif) | ||
| 667 | { | 662 | { |
| 668 | struct ath_hw *ah = sc->sc_ah; | 663 | struct ath_hw *ah = sc->sc_ah; |
| 669 | struct ath_common *common = ath9k_hw_common(ah); | 664 | struct ath_common *common = ath9k_hw_common(ah); |
| @@ -718,18 +713,17 @@ void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif) | |||
| 718 | /* Setup the beacon configuration parameters */ | 713 | /* Setup the beacon configuration parameters */ |
| 719 | if (vif) { | 714 | if (vif) { |
| 720 | struct ieee80211_bss_conf *bss_conf = &vif->bss_conf; | 715 | struct ieee80211_bss_conf *bss_conf = &vif->bss_conf; |
| 721 | |||
| 722 | iftype = vif->type; | 716 | iftype = vif->type; |
| 723 | |||
| 724 | cur_conf->beacon_interval = bss_conf->beacon_int; | 717 | cur_conf->beacon_interval = bss_conf->beacon_int; |
| 725 | cur_conf->dtim_period = bss_conf->dtim_period; | 718 | cur_conf->dtim_period = bss_conf->dtim_period; |
| 719 | } else { | ||
| 720 | iftype = sc->sc_ah->opmode; | ||
| 721 | } | ||
| 722 | |||
| 726 | cur_conf->listen_interval = 1; | 723 | cur_conf->listen_interval = 1; |
| 727 | cur_conf->dtim_count = 1; | 724 | cur_conf->dtim_count = 1; |
| 728 | cur_conf->bmiss_timeout = | 725 | cur_conf->bmiss_timeout = |
| 729 | ATH_DEFAULT_BMISS_LIMIT * cur_conf->beacon_interval; | 726 | ATH_DEFAULT_BMISS_LIMIT * cur_conf->beacon_interval; |
| 730 | } else { | ||
| 731 | iftype = sc->sc_ah->opmode; | ||
| 732 | } | ||
| 733 | 727 | ||
| 734 | /* | 728 | /* |
| 735 | * It looks like mac80211 may end up using beacon interval of zero in | 729 | * It looks like mac80211 may end up using beacon interval of zero in |
| @@ -740,13 +734,20 @@ void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif) | |||
| 740 | if (cur_conf->beacon_interval == 0) | 734 | if (cur_conf->beacon_interval == 0) |
| 741 | cur_conf->beacon_interval = 100; | 735 | cur_conf->beacon_interval = 100; |
| 742 | 736 | ||
| 737 | /* | ||
| 738 | * Some times we dont parse dtim period from mac80211, in that case | ||
| 739 | * use a default value | ||
| 740 | */ | ||
| 741 | if (cur_conf->dtim_period == 0) | ||
| 742 | cur_conf->dtim_period = 1; | ||
| 743 | |||
| 743 | switch (iftype) { | 744 | switch (iftype) { |
| 744 | case NL80211_IFTYPE_AP: | 745 | case NL80211_IFTYPE_AP: |
| 745 | ath_beacon_config_ap(sc, cur_conf); | 746 | ath_beacon_config_ap(sc, cur_conf); |
| 746 | break; | 747 | break; |
| 747 | case NL80211_IFTYPE_ADHOC: | 748 | case NL80211_IFTYPE_ADHOC: |
| 748 | case NL80211_IFTYPE_MESH_POINT: | 749 | case NL80211_IFTYPE_MESH_POINT: |
| 749 | ath_beacon_config_adhoc(sc, cur_conf, vif); | 750 | ath_beacon_config_adhoc(sc, cur_conf); |
| 750 | break; | 751 | break; |
| 751 | case NL80211_IFTYPE_STATION: | 752 | case NL80211_IFTYPE_STATION: |
| 752 | ath_beacon_config_sta(sc, cur_conf); | 753 | ath_beacon_config_sta(sc, cur_conf); |
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h index f6f09d1378f4..58e2ddc927a9 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.h +++ b/drivers/net/wireless/ath/ath9k/eeprom.h | |||
| @@ -23,8 +23,6 @@ | |||
| 23 | #include <net/cfg80211.h> | 23 | #include <net/cfg80211.h> |
| 24 | #include "ar9003_eeprom.h" | 24 | #include "ar9003_eeprom.h" |
| 25 | 25 | ||
| 26 | #define AH_USE_EEPROM 0x1 | ||
| 27 | |||
| 28 | #ifdef __BIG_ENDIAN | 26 | #ifdef __BIG_ENDIAN |
| 29 | #define AR5416_EEPROM_MAGIC 0x5aa5 | 27 | #define AR5416_EEPROM_MAGIC 0x5aa5 |
| 30 | #else | 28 | #else |
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 22b68b3c8566..5ab3084eb9cb 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c | |||
| @@ -153,16 +153,36 @@ static void hif_usb_tx_cb(struct urb *urb) | |||
| 153 | case -ENODEV: | 153 | case -ENODEV: |
| 154 | case -ESHUTDOWN: | 154 | case -ESHUTDOWN: |
| 155 | /* | 155 | /* |
| 156 | * The URB has been killed, free the SKBs | 156 | * The URB has been killed, free the SKBs. |
| 157 | * and return. | ||
| 158 | */ | 157 | */ |
| 159 | ath9k_skb_queue_purge(hif_dev, &tx_buf->skb_queue); | 158 | ath9k_skb_queue_purge(hif_dev, &tx_buf->skb_queue); |
| 160 | return; | 159 | |
| 160 | /* | ||
| 161 | * If the URBs are being flushed, no need to add this | ||
| 162 | * URB to the free list. | ||
| 163 | */ | ||
| 164 | spin_lock(&hif_dev->tx.tx_lock); | ||
| 165 | if (hif_dev->tx.flags & HIF_USB_TX_FLUSH) { | ||
| 166 | spin_unlock(&hif_dev->tx.tx_lock); | ||
| 167 | return; | ||
| 168 | } | ||
| 169 | spin_unlock(&hif_dev->tx.tx_lock); | ||
| 170 | |||
| 171 | /* | ||
| 172 | * In the stop() case, this URB has to be added to | ||
| 173 | * the free list. | ||
| 174 | */ | ||
| 175 | goto add_free; | ||
| 161 | default: | 176 | default: |
| 162 | break; | 177 | break; |
| 163 | } | 178 | } |
| 164 | 179 | ||
| 165 | /* Check if TX has been stopped */ | 180 | /* |
| 181 | * Check if TX has been stopped, this is needed because | ||
| 182 | * this CB could have been invoked just after the TX lock | ||
| 183 | * was released in hif_stop() and kill_urb() hasn't been | ||
| 184 | * called yet. | ||
| 185 | */ | ||
| 166 | spin_lock(&hif_dev->tx.tx_lock); | 186 | spin_lock(&hif_dev->tx.tx_lock); |
| 167 | if (hif_dev->tx.flags & HIF_USB_TX_STOP) { | 187 | if (hif_dev->tx.flags & HIF_USB_TX_STOP) { |
| 168 | spin_unlock(&hif_dev->tx.tx_lock); | 188 | spin_unlock(&hif_dev->tx.tx_lock); |
| @@ -314,6 +334,7 @@ static void hif_usb_start(void *hif_handle, u8 pipe_id) | |||
| 314 | static void hif_usb_stop(void *hif_handle, u8 pipe_id) | 334 | static void hif_usb_stop(void *hif_handle, u8 pipe_id) |
| 315 | { | 335 | { |
| 316 | struct hif_device_usb *hif_dev = (struct hif_device_usb *)hif_handle; | 336 | struct hif_device_usb *hif_dev = (struct hif_device_usb *)hif_handle; |
| 337 | struct tx_buf *tx_buf = NULL, *tx_buf_tmp = NULL; | ||
| 317 | unsigned long flags; | 338 | unsigned long flags; |
| 318 | 339 | ||
| 319 | spin_lock_irqsave(&hif_dev->tx.tx_lock, flags); | 340 | spin_lock_irqsave(&hif_dev->tx.tx_lock, flags); |
| @@ -321,6 +342,12 @@ static void hif_usb_stop(void *hif_handle, u8 pipe_id) | |||
| 321 | hif_dev->tx.tx_skb_cnt = 0; | 342 | hif_dev->tx.tx_skb_cnt = 0; |
| 322 | hif_dev->tx.flags |= HIF_USB_TX_STOP; | 343 | hif_dev->tx.flags |= HIF_USB_TX_STOP; |
| 323 | spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags); | 344 | spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags); |
| 345 | |||
| 346 | /* The pending URBs have to be canceled. */ | ||
| 347 | list_for_each_entry_safe(tx_buf, tx_buf_tmp, | ||
| 348 | &hif_dev->tx.tx_pending, list) { | ||
| 349 | usb_kill_urb(tx_buf->urb); | ||
| 350 | } | ||
| 324 | } | 351 | } |
| 325 | 352 | ||
| 326 | static int hif_usb_send(void *hif_handle, u8 pipe_id, struct sk_buff *skb, | 353 | static int hif_usb_send(void *hif_handle, u8 pipe_id, struct sk_buff *skb, |
| @@ -587,6 +614,7 @@ free: | |||
| 587 | static void ath9k_hif_usb_dealloc_tx_urbs(struct hif_device_usb *hif_dev) | 614 | static void ath9k_hif_usb_dealloc_tx_urbs(struct hif_device_usb *hif_dev) |
| 588 | { | 615 | { |
| 589 | struct tx_buf *tx_buf = NULL, *tx_buf_tmp = NULL; | 616 | struct tx_buf *tx_buf = NULL, *tx_buf_tmp = NULL; |
| 617 | unsigned long flags; | ||
| 590 | 618 | ||
| 591 | list_for_each_entry_safe(tx_buf, tx_buf_tmp, | 619 | list_for_each_entry_safe(tx_buf, tx_buf_tmp, |
| 592 | &hif_dev->tx.tx_buf, list) { | 620 | &hif_dev->tx.tx_buf, list) { |
| @@ -597,6 +625,10 @@ static void ath9k_hif_usb_dealloc_tx_urbs(struct hif_device_usb *hif_dev) | |||
| 597 | kfree(tx_buf); | 625 | kfree(tx_buf); |
| 598 | } | 626 | } |
| 599 | 627 | ||
| 628 | spin_lock_irqsave(&hif_dev->tx.tx_lock, flags); | ||
| 629 | hif_dev->tx.flags |= HIF_USB_TX_FLUSH; | ||
| 630 | spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags); | ||
| 631 | |||
| 600 | list_for_each_entry_safe(tx_buf, tx_buf_tmp, | 632 | list_for_each_entry_safe(tx_buf, tx_buf_tmp, |
| 601 | &hif_dev->tx.tx_pending, list) { | 633 | &hif_dev->tx.tx_pending, list) { |
| 602 | usb_kill_urb(tx_buf->urb); | 634 | usb_kill_urb(tx_buf->urb); |
| @@ -993,16 +1025,16 @@ static void ath9k_hif_usb_disconnect(struct usb_interface *interface) | |||
| 993 | { | 1025 | { |
| 994 | struct usb_device *udev = interface_to_usbdev(interface); | 1026 | struct usb_device *udev = interface_to_usbdev(interface); |
| 995 | struct hif_device_usb *hif_dev = usb_get_intfdata(interface); | 1027 | struct hif_device_usb *hif_dev = usb_get_intfdata(interface); |
| 1028 | bool unplugged = (udev->state == USB_STATE_NOTATTACHED) ? true : false; | ||
| 996 | 1029 | ||
| 997 | if (hif_dev) { | 1030 | if (hif_dev) { |
| 998 | ath9k_htc_hw_deinit(hif_dev->htc_handle, | 1031 | ath9k_htc_hw_deinit(hif_dev->htc_handle, unplugged); |
| 999 | (udev->state == USB_STATE_NOTATTACHED) ? true : false); | ||
| 1000 | ath9k_htc_hw_free(hif_dev->htc_handle); | 1032 | ath9k_htc_hw_free(hif_dev->htc_handle); |
| 1001 | ath9k_hif_usb_dev_deinit(hif_dev); | 1033 | ath9k_hif_usb_dev_deinit(hif_dev); |
| 1002 | usb_set_intfdata(interface, NULL); | 1034 | usb_set_intfdata(interface, NULL); |
| 1003 | } | 1035 | } |
| 1004 | 1036 | ||
| 1005 | if (hif_dev->flags & HIF_USB_START) | 1037 | if (!unplugged && (hif_dev->flags & HIF_USB_START)) |
| 1006 | ath9k_hif_usb_reboot(udev); | 1038 | ath9k_hif_usb_reboot(udev); |
| 1007 | 1039 | ||
| 1008 | kfree(hif_dev); | 1040 | kfree(hif_dev); |
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.h b/drivers/net/wireless/ath/ath9k/hif_usb.h index e4a5e2e79541..7b9d863d4035 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.h +++ b/drivers/net/wireless/ath/ath9k/hif_usb.h | |||
| @@ -64,6 +64,7 @@ struct tx_buf { | |||
| 64 | }; | 64 | }; |
| 65 | 65 | ||
| 66 | #define HIF_USB_TX_STOP BIT(0) | 66 | #define HIF_USB_TX_STOP BIT(0) |
| 67 | #define HIF_USB_TX_FLUSH BIT(1) | ||
| 67 | 68 | ||
| 68 | struct hif_usb_tx { | 69 | struct hif_usb_tx { |
| 69 | u8 flags; | 70 | u8 flags; |
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index fdf9d5fe8cc0..a099b3e87ed3 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h | |||
| @@ -331,17 +331,15 @@ void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv); | |||
| 331 | 331 | ||
| 332 | #define OP_INVALID BIT(0) | 332 | #define OP_INVALID BIT(0) |
| 333 | #define OP_SCANNING BIT(1) | 333 | #define OP_SCANNING BIT(1) |
| 334 | #define OP_FULL_RESET BIT(2) | 334 | #define OP_LED_ASSOCIATED BIT(2) |
| 335 | #define OP_LED_ASSOCIATED BIT(3) | 335 | #define OP_LED_ON BIT(3) |
| 336 | #define OP_LED_ON BIT(4) | 336 | #define OP_PREAMBLE_SHORT BIT(4) |
| 337 | #define OP_PREAMBLE_SHORT BIT(5) | 337 | #define OP_PROTECT_ENABLE BIT(5) |
| 338 | #define OP_PROTECT_ENABLE BIT(6) | 338 | #define OP_ASSOCIATED BIT(6) |
| 339 | #define OP_ASSOCIATED BIT(7) | 339 | #define OP_ENABLE_BEACON BIT(7) |
| 340 | #define OP_ENABLE_BEACON BIT(8) | 340 | #define OP_LED_DEINIT BIT(8) |
| 341 | #define OP_LED_DEINIT BIT(9) | 341 | #define OP_BT_PRIORITY_DETECTED BIT(9) |
| 342 | #define OP_UNPLUGGED BIT(10) | 342 | #define OP_BT_SCAN BIT(10) |
| 343 | #define OP_BT_PRIORITY_DETECTED BIT(11) | ||
| 344 | #define OP_BT_SCAN BIT(12) | ||
| 345 | 343 | ||
| 346 | struct ath9k_htc_priv { | 344 | struct ath9k_htc_priv { |
| 347 | struct device *dev; | 345 | struct device *dev; |
| @@ -378,7 +376,7 @@ struct ath9k_htc_priv { | |||
| 378 | struct ieee80211_vif *vif; | 376 | struct ieee80211_vif *vif; |
| 379 | struct htc_beacon_config cur_beacon_conf; | 377 | struct htc_beacon_config cur_beacon_conf; |
| 380 | unsigned int rxfilter; | 378 | unsigned int rxfilter; |
| 381 | struct tasklet_struct wmi_tasklet; | 379 | struct tasklet_struct swba_tasklet; |
| 382 | struct tasklet_struct rx_tasklet; | 380 | struct tasklet_struct rx_tasklet; |
| 383 | struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; | 381 | struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; |
| 384 | struct ath9k_htc_rx rx; | 382 | struct ath9k_htc_rx rx; |
| @@ -386,6 +384,7 @@ struct ath9k_htc_priv { | |||
| 386 | struct sk_buff_head tx_queue; | 384 | struct sk_buff_head tx_queue; |
| 387 | struct delayed_work ath9k_ani_work; | 385 | struct delayed_work ath9k_ani_work; |
| 388 | struct work_struct ps_work; | 386 | struct work_struct ps_work; |
| 387 | struct work_struct fatal_work; | ||
| 389 | 388 | ||
| 390 | struct mutex htc_pm_lock; | 389 | struct mutex htc_pm_lock; |
| 391 | unsigned long ps_usecount; | 390 | unsigned long ps_usecount; |
| @@ -420,6 +419,8 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz) | |||
| 420 | common->bus_ops->read_cachesize(common, csz); | 419 | common->bus_ops->read_cachesize(common, csz); |
| 421 | } | 420 | } |
| 422 | 421 | ||
| 422 | void ath9k_htc_reset(struct ath9k_htc_priv *priv); | ||
| 423 | |||
| 423 | void ath9k_htc_beaconq_config(struct ath9k_htc_priv *priv); | 424 | void ath9k_htc_beaconq_config(struct ath9k_htc_priv *priv); |
| 424 | void ath9k_htc_beacon_config(struct ath9k_htc_priv *priv, | 425 | void ath9k_htc_beacon_config(struct ath9k_htc_priv *priv, |
| 425 | struct ieee80211_vif *vif); | 426 | struct ieee80211_vif *vif); |
| @@ -435,6 +436,7 @@ void ath9k_htc_beaconep(void *drv_priv, struct sk_buff *skb, | |||
| 435 | void ath9k_htc_station_work(struct work_struct *work); | 436 | void ath9k_htc_station_work(struct work_struct *work); |
| 436 | void ath9k_htc_aggr_work(struct work_struct *work); | 437 | void ath9k_htc_aggr_work(struct work_struct *work); |
| 437 | void ath9k_ani_work(struct work_struct *work);; | 438 | void ath9k_ani_work(struct work_struct *work);; |
| 439 | void ath_start_ani(struct ath9k_htc_priv *priv); | ||
| 438 | 440 | ||
| 439 | int ath9k_tx_init(struct ath9k_htc_priv *priv); | 441 | int ath9k_tx_init(struct ath9k_htc_priv *priv); |
| 440 | void ath9k_tx_tasklet(unsigned long data); | 442 | void ath9k_tx_tasklet(unsigned long data); |
| @@ -457,8 +459,13 @@ void ath9k_htc_ps_restore(struct ath9k_htc_priv *priv); | |||
| 457 | void ath9k_ps_work(struct work_struct *work); | 459 | void ath9k_ps_work(struct work_struct *work); |
| 458 | bool ath9k_htc_setpower(struct ath9k_htc_priv *priv, | 460 | bool ath9k_htc_setpower(struct ath9k_htc_priv *priv, |
| 459 | enum ath9k_power_mode mode); | 461 | enum ath9k_power_mode mode); |
| 462 | void ath_update_txpow(struct ath9k_htc_priv *priv); | ||
| 460 | 463 | ||
| 461 | void ath9k_start_rfkill_poll(struct ath9k_htc_priv *priv); | 464 | void ath9k_start_rfkill_poll(struct ath9k_htc_priv *priv); |
| 465 | void ath9k_htc_rfkill_poll_state(struct ieee80211_hw *hw); | ||
| 466 | void ath9k_htc_radio_enable(struct ieee80211_hw *hw); | ||
| 467 | void ath9k_htc_radio_disable(struct ieee80211_hw *hw); | ||
| 468 | void ath9k_led_stop_brightness(struct ath9k_htc_priv *priv); | ||
| 462 | void ath9k_init_leds(struct ath9k_htc_priv *priv); | 469 | void ath9k_init_leds(struct ath9k_htc_priv *priv); |
| 463 | void ath9k_deinit_leds(struct ath9k_htc_priv *priv); | 470 | void ath9k_deinit_leds(struct ath9k_htc_priv *priv); |
| 464 | 471 | ||
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c index 283ff97ed446..fe70f67aa088 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2010 Atheros Communications Inc. | ||
| 3 | * | ||
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 5 | * purpose with or without fee is hereby granted, provided that the above | ||
| 6 | * copyright notice and this permission notice appear in all copies. | ||
| 7 | * | ||
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | */ | ||
| 16 | |||
| 1 | #include "htc.h" | 17 | #include "htc.h" |
| 2 | 18 | ||
| 3 | /******************/ | 19 | /******************/ |
| @@ -131,3 +147,314 @@ void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv) | |||
| 131 | cancel_delayed_work_sync(&priv->coex_period_work); | 147 | cancel_delayed_work_sync(&priv->coex_period_work); |
| 132 | cancel_delayed_work_sync(&priv->duty_cycle_work); | 148 | cancel_delayed_work_sync(&priv->duty_cycle_work); |
| 133 | } | 149 | } |
| 150 | |||
| 151 | /*******/ | ||
| 152 | /* LED */ | ||
| 153 | /*******/ | ||
| 154 | |||
| 155 | static void ath9k_led_blink_work(struct work_struct *work) | ||
| 156 | { | ||
| 157 | struct ath9k_htc_priv *priv = container_of(work, struct ath9k_htc_priv, | ||
| 158 | ath9k_led_blink_work.work); | ||
| 159 | |||
| 160 | if (!(priv->op_flags & OP_LED_ASSOCIATED)) | ||
| 161 | return; | ||
| 162 | |||
| 163 | if ((priv->led_on_duration == ATH_LED_ON_DURATION_IDLE) || | ||
| 164 | (priv->led_off_duration == ATH_LED_OFF_DURATION_IDLE)) | ||
| 165 | ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, 0); | ||
| 166 | else | ||
| 167 | ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, | ||
| 168 | (priv->op_flags & OP_LED_ON) ? 1 : 0); | ||
| 169 | |||
| 170 | ieee80211_queue_delayed_work(priv->hw, | ||
| 171 | &priv->ath9k_led_blink_work, | ||
| 172 | (priv->op_flags & OP_LED_ON) ? | ||
| 173 | msecs_to_jiffies(priv->led_off_duration) : | ||
| 174 | msecs_to_jiffies(priv->led_on_duration)); | ||
| 175 | |||
| 176 | priv->led_on_duration = priv->led_on_cnt ? | ||
| 177 | max((ATH_LED_ON_DURATION_IDLE - priv->led_on_cnt), 25) : | ||
| 178 | ATH_LED_ON_DURATION_IDLE; | ||
| 179 | priv->led_off_duration = priv->led_off_cnt ? | ||
| 180 | max((ATH_LED_OFF_DURATION_IDLE - priv->led_off_cnt), 10) : | ||
| 181 | ATH_LED_OFF_DURATION_IDLE; | ||
| 182 | priv->led_on_cnt = priv->led_off_cnt = 0; | ||
| 183 | |||
| 184 | if (priv->op_flags & OP_LED_ON) | ||
| 185 | priv->op_flags &= ~OP_LED_ON; | ||
| 186 | else | ||
| 187 | priv->op_flags |= OP_LED_ON; | ||
| 188 | } | ||
| 189 | |||
| 190 | static void ath9k_led_brightness_work(struct work_struct *work) | ||
| 191 | { | ||
| 192 | struct ath_led *led = container_of(work, struct ath_led, | ||
| 193 | brightness_work.work); | ||
| 194 | struct ath9k_htc_priv *priv = led->priv; | ||
| 195 | |||
| 196 | switch (led->brightness) { | ||
| 197 | case LED_OFF: | ||
| 198 | if (led->led_type == ATH_LED_ASSOC || | ||
| 199 | led->led_type == ATH_LED_RADIO) { | ||
| 200 | ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, | ||
| 201 | (led->led_type == ATH_LED_RADIO)); | ||
| 202 | priv->op_flags &= ~OP_LED_ASSOCIATED; | ||
| 203 | if (led->led_type == ATH_LED_RADIO) | ||
| 204 | priv->op_flags &= ~OP_LED_ON; | ||
| 205 | } else { | ||
| 206 | priv->led_off_cnt++; | ||
| 207 | } | ||
| 208 | break; | ||
| 209 | case LED_FULL: | ||
| 210 | if (led->led_type == ATH_LED_ASSOC) { | ||
| 211 | priv->op_flags |= OP_LED_ASSOCIATED; | ||
| 212 | ieee80211_queue_delayed_work(priv->hw, | ||
| 213 | &priv->ath9k_led_blink_work, 0); | ||
| 214 | } else if (led->led_type == ATH_LED_RADIO) { | ||
| 215 | ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, 0); | ||
| 216 | priv->op_flags |= OP_LED_ON; | ||
| 217 | } else { | ||
| 218 | priv->led_on_cnt++; | ||
| 219 | } | ||
| 220 | break; | ||
| 221 | default: | ||
| 222 | break; | ||
| 223 | } | ||
| 224 | } | ||
| 225 | |||
| 226 | static void ath9k_led_brightness(struct led_classdev *led_cdev, | ||
| 227 | enum led_brightness brightness) | ||
| 228 | { | ||
| 229 | struct ath_led *led = container_of(led_cdev, struct ath_led, led_cdev); | ||
| 230 | struct ath9k_htc_priv *priv = led->priv; | ||
| 231 | |||
| 232 | led->brightness = brightness; | ||
| 233 | if (!(priv->op_flags & OP_LED_DEINIT)) | ||
| 234 | ieee80211_queue_delayed_work(priv->hw, | ||
| 235 | &led->brightness_work, 0); | ||
| 236 | } | ||
| 237 | |||
| 238 | void ath9k_led_stop_brightness(struct ath9k_htc_priv *priv) | ||
| 239 | { | ||
| 240 | cancel_delayed_work_sync(&priv->radio_led.brightness_work); | ||
| 241 | cancel_delayed_work_sync(&priv->assoc_led.brightness_work); | ||
| 242 | cancel_delayed_work_sync(&priv->tx_led.brightness_work); | ||
| 243 | cancel_delayed_work_sync(&priv->rx_led.brightness_work); | ||
| 244 | } | ||
| 245 | |||
| 246 | static int ath9k_register_led(struct ath9k_htc_priv *priv, struct ath_led *led, | ||
| 247 | char *trigger) | ||
| 248 | { | ||
| 249 | int ret; | ||
| 250 | |||
| 251 | led->priv = priv; | ||
| 252 | led->led_cdev.name = led->name; | ||
| 253 | led->led_cdev.default_trigger = trigger; | ||
| 254 | led->led_cdev.brightness_set = ath9k_led_brightness; | ||
| 255 | |||
| 256 | ret = led_classdev_register(wiphy_dev(priv->hw->wiphy), &led->led_cdev); | ||
| 257 | if (ret) | ||
| 258 | ath_err(ath9k_hw_common(priv->ah), | ||
| 259 | "Failed to register led:%s", led->name); | ||
| 260 | else | ||
| 261 | led->registered = 1; | ||
| 262 | |||
| 263 | INIT_DELAYED_WORK(&led->brightness_work, ath9k_led_brightness_work); | ||
| 264 | |||
| 265 | return ret; | ||
| 266 | } | ||
| 267 | |||
| 268 | static void ath9k_unregister_led(struct ath_led *led) | ||
| 269 | { | ||
| 270 | if (led->registered) { | ||
| 271 | led_classdev_unregister(&led->led_cdev); | ||
| 272 | led->registered = 0; | ||
| 273 | } | ||
| 274 | } | ||
| 275 | |||
| 276 | void ath9k_deinit_leds(struct ath9k_htc_priv *priv) | ||
| 277 | { | ||
| 278 | priv->op_flags |= OP_LED_DEINIT; | ||
| 279 | ath9k_unregister_led(&priv->assoc_led); | ||
| 280 | priv->op_flags &= ~OP_LED_ASSOCIATED; | ||
| 281 | ath9k_unregister_led(&priv->tx_led); | ||
| 282 | ath9k_unregister_led(&priv->rx_led); | ||
| 283 | ath9k_unregister_led(&priv->radio_led); | ||
| 284 | } | ||
| 285 | |||
| 286 | void ath9k_init_leds(struct ath9k_htc_priv *priv) | ||
| 287 | { | ||
| 288 | char *trigger; | ||
| 289 | int ret; | ||
| 290 | |||
| 291 | if (AR_SREV_9287(priv->ah)) | ||
| 292 | priv->ah->led_pin = ATH_LED_PIN_9287; | ||
| 293 | else if (AR_SREV_9271(priv->ah)) | ||
| 294 | priv->ah->led_pin = ATH_LED_PIN_9271; | ||
| 295 | else if (AR_DEVID_7010(priv->ah)) | ||
| 296 | priv->ah->led_pin = ATH_LED_PIN_7010; | ||
| 297 | else | ||
| 298 | priv->ah->led_pin = ATH_LED_PIN_DEF; | ||
| 299 | |||
| 300 | /* Configure gpio 1 for output */ | ||
| 301 | ath9k_hw_cfg_output(priv->ah, priv->ah->led_pin, | ||
| 302 | AR_GPIO_OUTPUT_MUX_AS_OUTPUT); | ||
| 303 | /* LED off, active low */ | ||
| 304 | ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, 1); | ||
| 305 | |||
| 306 | INIT_DELAYED_WORK(&priv->ath9k_led_blink_work, ath9k_led_blink_work); | ||
| 307 | |||
| 308 | trigger = ieee80211_get_radio_led_name(priv->hw); | ||
| 309 | snprintf(priv->radio_led.name, sizeof(priv->radio_led.name), | ||
| 310 | "ath9k-%s::radio", wiphy_name(priv->hw->wiphy)); | ||
| 311 | ret = ath9k_register_led(priv, &priv->radio_led, trigger); | ||
| 312 | priv->radio_led.led_type = ATH_LED_RADIO; | ||
| 313 | if (ret) | ||
| 314 | goto fail; | ||
| 315 | |||
| 316 | trigger = ieee80211_get_assoc_led_name(priv->hw); | ||
| 317 | snprintf(priv->assoc_led.name, sizeof(priv->assoc_led.name), | ||
| 318 | "ath9k-%s::assoc", wiphy_name(priv->hw->wiphy)); | ||
| 319 | ret = ath9k_register_led(priv, &priv->assoc_led, trigger); | ||
| 320 | priv->assoc_led.led_type = ATH_LED_ASSOC; | ||
| 321 | if (ret) | ||
| 322 | goto fail; | ||
| 323 | |||
| 324 | trigger = ieee80211_get_tx_led_name(priv->hw); | ||
| 325 | snprintf(priv->tx_led.name, sizeof(priv->tx_led.name), | ||
| 326 | "ath9k-%s::tx", wiphy_name(priv->hw->wiphy)); | ||
| 327 | ret = ath9k_register_led(priv, &priv->tx_led, trigger); | ||
| 328 | priv->tx_led.led_type = ATH_LED_TX; | ||
| 329 | if (ret) | ||
| 330 | goto fail; | ||
| 331 | |||
| 332 | trigger = ieee80211_get_rx_led_name(priv->hw); | ||
| 333 | snprintf(priv->rx_led.name, sizeof(priv->rx_led.name), | ||
| 334 | "ath9k-%s::rx", wiphy_name(priv->hw->wiphy)); | ||
| 335 | ret = ath9k_register_led(priv, &priv->rx_led, trigger); | ||
| 336 | priv->rx_led.led_type = ATH_LED_RX; | ||
| 337 | if (ret) | ||
| 338 | goto fail; | ||
| 339 | |||
| 340 | priv->op_flags &= ~OP_LED_DEINIT; | ||
| 341 | |||
| 342 | return; | ||
| 343 | |||
| 344 | fail: | ||
| 345 | cancel_delayed_work_sync(&priv->ath9k_led_blink_work); | ||
| 346 | ath9k_deinit_leds(priv); | ||
| 347 | } | ||
| 348 | |||
| 349 | /*******************/ | ||
| 350 | /* Rfkill */ | ||
| 351 | /*******************/ | ||
| 352 | |||
| 353 | static bool ath_is_rfkill_set(struct ath9k_htc_priv *priv) | ||
| 354 | { | ||
| 355 | return ath9k_hw_gpio_get(priv->ah, priv->ah->rfkill_gpio) == | ||
| 356 | priv->ah->rfkill_polarity; | ||
| 357 | } | ||
| 358 | |||
| 359 | void ath9k_htc_rfkill_poll_state(struct ieee80211_hw *hw) | ||
| 360 | { | ||
| 361 | struct ath9k_htc_priv *priv = hw->priv; | ||
| 362 | bool blocked = !!ath_is_rfkill_set(priv); | ||
| 363 | |||
| 364 | wiphy_rfkill_set_hw_state(hw->wiphy, blocked); | ||
| 365 | } | ||
| 366 | |||
| 367 | void ath9k_start_rfkill_poll(struct ath9k_htc_priv *priv) | ||
| 368 | { | ||
| 369 | if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT) | ||
| 370 | wiphy_rfkill_start_polling(priv->hw->wiphy); | ||
| 371 | } | ||
| 372 | |||
| 373 | void ath9k_htc_radio_enable(struct ieee80211_hw *hw) | ||
| 374 | { | ||
| 375 | struct ath9k_htc_priv *priv = hw->priv; | ||
| 376 | struct ath_hw *ah = priv->ah; | ||
| 377 | struct ath_common *common = ath9k_hw_common(ah); | ||
| 378 | int ret; | ||
| 379 | u8 cmd_rsp; | ||
| 380 | |||
| 381 | if (!ah->curchan) | ||
| 382 | ah->curchan = ath9k_cmn_get_curchannel(hw, ah); | ||
| 383 | |||
| 384 | /* Reset the HW */ | ||
| 385 | ret = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); | ||
| 386 | if (ret) { | ||
| 387 | ath_err(common, | ||
| 388 | "Unable to reset hardware; reset status %d (freq %u MHz)\n", | ||
| 389 | ret, ah->curchan->channel); | ||
| 390 | } | ||
| 391 | |||
| 392 | ath_update_txpow(priv); | ||
| 393 | |||
| 394 | /* Start RX */ | ||
| 395 | WMI_CMD(WMI_START_RECV_CMDID); | ||
| 396 | ath9k_host_rx_init(priv); | ||
| 397 | |||
| 398 | /* Start TX */ | ||
| 399 | htc_start(priv->htc); | ||
| 400 | spin_lock_bh(&priv->tx_lock); | ||
| 401 | priv->tx_queues_stop = false; | ||
| 402 | spin_unlock_bh(&priv->tx_lock); | ||
| 403 | ieee80211_wake_queues(hw); | ||
| 404 | |||
| 405 | WMI_CMD(WMI_ENABLE_INTR_CMDID); | ||
| 406 | |||
| 407 | /* Enable LED */ | ||
| 408 | ath9k_hw_cfg_output(ah, ah->led_pin, | ||
| 409 | AR_GPIO_OUTPUT_MUX_AS_OUTPUT); | ||
| 410 | ath9k_hw_set_gpio(ah, ah->led_pin, 0); | ||
| 411 | } | ||
| 412 | |||
| 413 | void ath9k_htc_radio_disable(struct ieee80211_hw *hw) | ||
| 414 | { | ||
| 415 | struct ath9k_htc_priv *priv = hw->priv; | ||
| 416 | struct ath_hw *ah = priv->ah; | ||
| 417 | struct ath_common *common = ath9k_hw_common(ah); | ||
| 418 | int ret; | ||
| 419 | u8 cmd_rsp; | ||
| 420 | |||
| 421 | ath9k_htc_ps_wakeup(priv); | ||
| 422 | |||
| 423 | /* Disable LED */ | ||
| 424 | ath9k_hw_set_gpio(ah, ah->led_pin, 1); | ||
| 425 | ath9k_hw_cfg_gpio_input(ah, ah->led_pin); | ||
| 426 | |||
| 427 | WMI_CMD(WMI_DISABLE_INTR_CMDID); | ||
| 428 | |||
| 429 | /* Stop TX */ | ||
| 430 | ieee80211_stop_queues(hw); | ||
| 431 | htc_stop(priv->htc); | ||
| 432 | WMI_CMD(WMI_DRAIN_TXQ_ALL_CMDID); | ||
| 433 | skb_queue_purge(&priv->tx_queue); | ||
| 434 | |||
| 435 | /* Stop RX */ | ||
| 436 | WMI_CMD(WMI_STOP_RECV_CMDID); | ||
| 437 | |||
| 438 | /* | ||
| 439 | * The MIB counters have to be disabled here, | ||
| 440 | * since the target doesn't do it. | ||
| 441 | */ | ||
| 442 | ath9k_hw_disable_mib_counters(ah); | ||
| 443 | |||
| 444 | if (!ah->curchan) | ||
| 445 | ah->curchan = ath9k_cmn_get_curchannel(hw, ah); | ||
| 446 | |||
| 447 | /* Reset the HW */ | ||
| 448 | ret = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); | ||
| 449 | if (ret) { | ||
| 450 | ath_err(common, | ||
| 451 | "Unable to reset hardware; reset status %d (freq %u MHz)\n", | ||
| 452 | ret, ah->curchan->channel); | ||
| 453 | } | ||
| 454 | |||
| 455 | /* Disable the PHY */ | ||
| 456 | ath9k_hw_phy_disable(ah); | ||
| 457 | |||
| 458 | ath9k_htc_ps_restore(priv); | ||
| 459 | ath9k_htc_setpower(priv, ATH9K_PM_FULL_SLEEP); | ||
| 460 | } | ||
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index 0f6be350fd3c..38433f9bfe59 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c | |||
| @@ -142,7 +142,7 @@ static void ath9k_deinit_priv(struct ath9k_htc_priv *priv) | |||
| 142 | { | 142 | { |
| 143 | ath9k_htc_exit_debug(priv->ah); | 143 | ath9k_htc_exit_debug(priv->ah); |
| 144 | ath9k_hw_deinit(priv->ah); | 144 | ath9k_hw_deinit(priv->ah); |
| 145 | tasklet_kill(&priv->wmi_tasklet); | 145 | tasklet_kill(&priv->swba_tasklet); |
| 146 | tasklet_kill(&priv->rx_tasklet); | 146 | tasklet_kill(&priv->rx_tasklet); |
| 147 | tasklet_kill(&priv->tx_tasklet); | 147 | tasklet_kill(&priv->tx_tasklet); |
| 148 | kfree(priv->ah); | 148 | kfree(priv->ah); |
| @@ -647,13 +647,15 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv, | |||
| 647 | spin_lock_init(&priv->tx_lock); | 647 | spin_lock_init(&priv->tx_lock); |
| 648 | mutex_init(&priv->mutex); | 648 | mutex_init(&priv->mutex); |
| 649 | mutex_init(&priv->htc_pm_lock); | 649 | mutex_init(&priv->htc_pm_lock); |
| 650 | tasklet_init(&priv->wmi_tasklet, ath9k_wmi_tasklet, | 650 | tasklet_init(&priv->swba_tasklet, ath9k_swba_tasklet, |
| 651 | (unsigned long)priv); | 651 | (unsigned long)priv); |
| 652 | tasklet_init(&priv->rx_tasklet, ath9k_rx_tasklet, | 652 | tasklet_init(&priv->rx_tasklet, ath9k_rx_tasklet, |
| 653 | (unsigned long)priv); | 653 | (unsigned long)priv); |
| 654 | tasklet_init(&priv->tx_tasklet, ath9k_tx_tasklet, (unsigned long)priv); | 654 | tasklet_init(&priv->tx_tasklet, ath9k_tx_tasklet, |
| 655 | (unsigned long)priv); | ||
| 655 | INIT_DELAYED_WORK(&priv->ath9k_ani_work, ath9k_ani_work); | 656 | INIT_DELAYED_WORK(&priv->ath9k_ani_work, ath9k_ani_work); |
| 656 | INIT_WORK(&priv->ps_work, ath9k_ps_work); | 657 | INIT_WORK(&priv->ps_work, ath9k_ps_work); |
| 658 | INIT_WORK(&priv->fatal_work, ath9k_fatal_work); | ||
| 657 | 659 | ||
| 658 | /* | 660 | /* |
| 659 | * Cache line size is used to size and align various | 661 | * Cache line size is used to size and align various |
| @@ -714,8 +716,7 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv, | |||
| 714 | IEEE80211_HW_HAS_RATE_CONTROL | | 716 | IEEE80211_HW_HAS_RATE_CONTROL | |
| 715 | IEEE80211_HW_RX_INCLUDES_FCS | | 717 | IEEE80211_HW_RX_INCLUDES_FCS | |
| 716 | IEEE80211_HW_SUPPORTS_PS | | 718 | IEEE80211_HW_SUPPORTS_PS | |
| 717 | IEEE80211_HW_PS_NULLFUNC_STACK | | 719 | IEEE80211_HW_PS_NULLFUNC_STACK; |
| 718 | IEEE80211_HW_NEED_DTIM_PERIOD; | ||
| 719 | 720 | ||
| 720 | hw->wiphy->interface_modes = | 721 | hw->wiphy->interface_modes = |
| 721 | BIT(NL80211_IFTYPE_STATION) | | 722 | BIT(NL80211_IFTYPE_STATION) | |
| @@ -851,9 +852,6 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev, | |||
| 851 | if (ret) | 852 | if (ret) |
| 852 | goto err_init; | 853 | goto err_init; |
| 853 | 854 | ||
| 854 | /* The device may have been unplugged earlier. */ | ||
| 855 | priv->op_flags &= ~OP_UNPLUGGED; | ||
| 856 | |||
| 857 | ret = ath9k_init_device(priv, devid, product, drv_info); | 855 | ret = ath9k_init_device(priv, devid, product, drv_info); |
| 858 | if (ret) | 856 | if (ret) |
| 859 | goto err_init; | 857 | goto err_init; |
| @@ -873,7 +871,7 @@ void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug) | |||
| 873 | 871 | ||
| 874 | /* Check if the device has been yanked out. */ | 872 | /* Check if the device has been yanked out. */ |
| 875 | if (hotunplug) | 873 | if (hotunplug) |
| 876 | htc_handle->drv_priv->op_flags |= OP_UNPLUGGED; | 874 | htc_handle->drv_priv->ah->ah_flags |= AH_UNPLUGGED; |
| 877 | 875 | ||
| 878 | ath9k_deinit_device(htc_handle->drv_priv); | 876 | ath9k_deinit_device(htc_handle->drv_priv); |
| 879 | ath9k_deinit_wmi(htc_handle->drv_priv); | 877 | ath9k_deinit_wmi(htc_handle->drv_priv); |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index dd17909bd903..845b4c938d16 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
| @@ -24,7 +24,7 @@ static struct dentry *ath9k_debugfs_root; | |||
| 24 | /* Utilities */ | 24 | /* Utilities */ |
| 25 | /*************/ | 25 | /*************/ |
| 26 | 26 | ||
| 27 | static void ath_update_txpow(struct ath9k_htc_priv *priv) | 27 | void ath_update_txpow(struct ath9k_htc_priv *priv) |
| 28 | { | 28 | { |
| 29 | struct ath_hw *ah = priv->ah; | 29 | struct ath_hw *ah = priv->ah; |
| 30 | 30 | ||
| @@ -116,6 +116,60 @@ void ath9k_ps_work(struct work_struct *work) | |||
| 116 | ath9k_htc_setpower(priv, ATH9K_PM_NETWORK_SLEEP); | 116 | ath9k_htc_setpower(priv, ATH9K_PM_NETWORK_SLEEP); |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | void ath9k_htc_reset(struct ath9k_htc_priv *priv) | ||
| 120 | { | ||
| 121 | struct ath_hw *ah = priv->ah; | ||
| 122 | struct ath_common *common = ath9k_hw_common(ah); | ||
| 123 | struct ieee80211_channel *channel = priv->hw->conf.channel; | ||
| 124 | struct ath9k_hw_cal_data *caldata; | ||
| 125 | enum htc_phymode mode; | ||
| 126 | __be16 htc_mode; | ||
| 127 | u8 cmd_rsp; | ||
| 128 | int ret; | ||
| 129 | |||
| 130 | mutex_lock(&priv->mutex); | ||
| 131 | ath9k_htc_ps_wakeup(priv); | ||
| 132 | |||
| 133 | if (priv->op_flags & OP_ASSOCIATED) | ||
| 134 | cancel_delayed_work_sync(&priv->ath9k_ani_work); | ||
| 135 | |||
| 136 | ieee80211_stop_queues(priv->hw); | ||
| 137 | htc_stop(priv->htc); | ||
| 138 | WMI_CMD(WMI_DISABLE_INTR_CMDID); | ||
| 139 | WMI_CMD(WMI_DRAIN_TXQ_ALL_CMDID); | ||
| 140 | WMI_CMD(WMI_STOP_RECV_CMDID); | ||
| 141 | |||
| 142 | caldata = &priv->caldata[channel->hw_value]; | ||
| 143 | ret = ath9k_hw_reset(ah, ah->curchan, caldata, false); | ||
| 144 | if (ret) { | ||
| 145 | ath_err(common, | ||
| 146 | "Unable to reset device (%u Mhz) reset status %d\n", | ||
| 147 | channel->center_freq, ret); | ||
| 148 | } | ||
| 149 | |||
| 150 | ath_update_txpow(priv); | ||
| 151 | |||
| 152 | WMI_CMD(WMI_START_RECV_CMDID); | ||
| 153 | ath9k_host_rx_init(priv); | ||
| 154 | |||
| 155 | mode = ath9k_htc_get_curmode(priv, ah->curchan); | ||
| 156 | htc_mode = cpu_to_be16(mode); | ||
| 157 | WMI_CMD_BUF(WMI_SET_MODE_CMDID, &htc_mode); | ||
| 158 | |||
| 159 | WMI_CMD(WMI_ENABLE_INTR_CMDID); | ||
| 160 | htc_start(priv->htc); | ||
| 161 | |||
| 162 | if (priv->op_flags & OP_ASSOCIATED) { | ||
| 163 | ath9k_htc_beacon_config(priv, priv->vif); | ||
| 164 | ath_start_ani(priv); | ||
| 165 | } | ||
| 166 | |||
| 167 | ieee80211_wake_queues(priv->hw); | ||
| 168 | |||
| 169 | ath9k_htc_ps_restore(priv); | ||
| 170 | mutex_unlock(&priv->mutex); | ||
| 171 | } | ||
| 172 | |||
| 119 | static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, | 173 | static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, |
| 120 | struct ieee80211_hw *hw, | 174 | struct ieee80211_hw *hw, |
| 121 | struct ath9k_channel *hchan) | 175 | struct ath9k_channel *hchan) |
| @@ -123,7 +177,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, | |||
| 123 | struct ath_hw *ah = priv->ah; | 177 | struct ath_hw *ah = priv->ah; |
| 124 | struct ath_common *common = ath9k_hw_common(ah); | 178 | struct ath_common *common = ath9k_hw_common(ah); |
| 125 | struct ieee80211_conf *conf = &common->hw->conf; | 179 | struct ieee80211_conf *conf = &common->hw->conf; |
| 126 | bool fastcc = true; | 180 | bool fastcc; |
| 127 | struct ieee80211_channel *channel = hw->conf.channel; | 181 | struct ieee80211_channel *channel = hw->conf.channel; |
| 128 | struct ath9k_hw_cal_data *caldata; | 182 | struct ath9k_hw_cal_data *caldata; |
| 129 | enum htc_phymode mode; | 183 | enum htc_phymode mode; |
| @@ -134,8 +188,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, | |||
| 134 | if (priv->op_flags & OP_INVALID) | 188 | if (priv->op_flags & OP_INVALID) |
| 135 | return -EIO; | 189 | return -EIO; |
| 136 | 190 | ||
| 137 | if (priv->op_flags & OP_FULL_RESET) | 191 | fastcc = !!(hw->conf.flags & IEEE80211_CONF_OFFCHANNEL); |
| 138 | fastcc = false; | ||
| 139 | 192 | ||
| 140 | ath9k_htc_ps_wakeup(priv); | 193 | ath9k_htc_ps_wakeup(priv); |
| 141 | htc_stop(priv->htc); | 194 | htc_stop(priv->htc); |
| @@ -177,23 +230,43 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, | |||
| 177 | goto err; | 230 | goto err; |
| 178 | 231 | ||
| 179 | htc_start(priv->htc); | 232 | htc_start(priv->htc); |
| 180 | |||
| 181 | priv->op_flags &= ~OP_FULL_RESET; | ||
| 182 | err: | 233 | err: |
| 183 | ath9k_htc_ps_restore(priv); | 234 | ath9k_htc_ps_restore(priv); |
| 184 | return ret; | 235 | return ret; |
| 185 | } | 236 | } |
| 186 | 237 | ||
| 238 | static void __ath9k_htc_remove_monitor_interface(struct ath9k_htc_priv *priv) | ||
| 239 | { | ||
| 240 | struct ath_common *common = ath9k_hw_common(priv->ah); | ||
| 241 | struct ath9k_htc_target_vif hvif; | ||
| 242 | int ret = 0; | ||
| 243 | u8 cmd_rsp; | ||
| 244 | |||
| 245 | memset(&hvif, 0, sizeof(struct ath9k_htc_target_vif)); | ||
| 246 | memcpy(&hvif.myaddr, common->macaddr, ETH_ALEN); | ||
| 247 | hvif.index = 0; /* Should do for now */ | ||
| 248 | WMI_CMD_BUF(WMI_VAP_REMOVE_CMDID, &hvif); | ||
| 249 | priv->nvifs--; | ||
| 250 | } | ||
| 251 | |||
| 187 | static int ath9k_htc_add_monitor_interface(struct ath9k_htc_priv *priv) | 252 | static int ath9k_htc_add_monitor_interface(struct ath9k_htc_priv *priv) |
| 188 | { | 253 | { |
| 189 | struct ath_common *common = ath9k_hw_common(priv->ah); | 254 | struct ath_common *common = ath9k_hw_common(priv->ah); |
| 190 | struct ath9k_htc_target_vif hvif; | 255 | struct ath9k_htc_target_vif hvif; |
| 256 | struct ath9k_htc_target_sta tsta; | ||
| 191 | int ret = 0; | 257 | int ret = 0; |
| 192 | u8 cmd_rsp; | 258 | u8 cmd_rsp; |
| 193 | 259 | ||
| 194 | if (priv->nvifs > 0) | 260 | if (priv->nvifs > 0) |
| 195 | return -ENOBUFS; | 261 | return -ENOBUFS; |
| 196 | 262 | ||
| 263 | if (priv->nstations >= ATH9K_HTC_MAX_STA) | ||
| 264 | return -ENOBUFS; | ||
| 265 | |||
| 266 | /* | ||
| 267 | * Add an interface. | ||
| 268 | */ | ||
| 269 | |||
| 197 | memset(&hvif, 0, sizeof(struct ath9k_htc_target_vif)); | 270 | memset(&hvif, 0, sizeof(struct ath9k_htc_target_vif)); |
| 198 | memcpy(&hvif.myaddr, common->macaddr, ETH_ALEN); | 271 | memcpy(&hvif.myaddr, common->macaddr, ETH_ALEN); |
| 199 | 272 | ||
| @@ -206,23 +279,57 @@ static int ath9k_htc_add_monitor_interface(struct ath9k_htc_priv *priv) | |||
| 206 | return ret; | 279 | return ret; |
| 207 | 280 | ||
| 208 | priv->nvifs++; | 281 | priv->nvifs++; |
| 282 | |||
| 283 | /* | ||
| 284 | * Associate a station with the interface for packet injection. | ||
| 285 | */ | ||
| 286 | |||
| 287 | memset(&tsta, 0, sizeof(struct ath9k_htc_target_sta)); | ||
| 288 | |||
| 289 | memcpy(&tsta.macaddr, common->macaddr, ETH_ALEN); | ||
| 290 | |||
| 291 | tsta.is_vif_sta = 1; | ||
| 292 | tsta.sta_index = priv->nstations; | ||
| 293 | tsta.vif_index = hvif.index; | ||
| 294 | tsta.maxampdu = 0xffff; | ||
| 295 | |||
| 296 | WMI_CMD_BUF(WMI_NODE_CREATE_CMDID, &tsta); | ||
| 297 | if (ret) { | ||
| 298 | ath_err(common, "Unable to add station entry for monitor mode\n"); | ||
| 299 | goto err_vif; | ||
| 300 | } | ||
| 301 | |||
| 302 | priv->nstations++; | ||
| 303 | |||
| 209 | return 0; | 304 | return 0; |
| 305 | |||
| 306 | err_vif: | ||
| 307 | /* | ||
| 308 | * Remove the interface from the target. | ||
| 309 | */ | ||
| 310 | __ath9k_htc_remove_monitor_interface(priv); | ||
| 311 | return ret; | ||
| 210 | } | 312 | } |
| 211 | 313 | ||
| 212 | static int ath9k_htc_remove_monitor_interface(struct ath9k_htc_priv *priv) | 314 | static int ath9k_htc_remove_monitor_interface(struct ath9k_htc_priv *priv) |
| 213 | { | 315 | { |
| 214 | struct ath_common *common = ath9k_hw_common(priv->ah); | 316 | struct ath_common *common = ath9k_hw_common(priv->ah); |
| 215 | struct ath9k_htc_target_vif hvif; | ||
| 216 | int ret = 0; | 317 | int ret = 0; |
| 217 | u8 cmd_rsp; | 318 | u8 cmd_rsp, sta_idx; |
| 218 | 319 | ||
| 219 | memset(&hvif, 0, sizeof(struct ath9k_htc_target_vif)); | 320 | __ath9k_htc_remove_monitor_interface(priv); |
| 220 | memcpy(&hvif.myaddr, common->macaddr, ETH_ALEN); | ||
| 221 | hvif.index = 0; /* Should do for now */ | ||
| 222 | WMI_CMD_BUF(WMI_VAP_REMOVE_CMDID, &hvif); | ||
| 223 | priv->nvifs--; | ||
| 224 | 321 | ||
| 225 | return ret; | 322 | sta_idx = 0; /* Only single interface, for now */ |
| 323 | |||
| 324 | WMI_CMD_BUF(WMI_NODE_REMOVE_CMDID, &sta_idx); | ||
| 325 | if (ret) { | ||
| 326 | ath_err(common, "Unable to remove station entry for monitor mode\n"); | ||
| 327 | return ret; | ||
| 328 | } | ||
| 329 | |||
| 330 | priv->nstations--; | ||
| 331 | |||
| 332 | return 0; | ||
| 226 | } | 333 | } |
| 227 | 334 | ||
| 228 | static int ath9k_htc_add_station(struct ath9k_htc_priv *priv, | 335 | static int ath9k_htc_add_station(struct ath9k_htc_priv *priv, |
| @@ -690,7 +797,7 @@ void ath9k_htc_debug_remove_root(void) | |||
| 690 | /* ANI */ | 797 | /* ANI */ |
| 691 | /*******/ | 798 | /*******/ |
| 692 | 799 | ||
| 693 | static void ath_start_ani(struct ath9k_htc_priv *priv) | 800 | void ath_start_ani(struct ath9k_htc_priv *priv) |
| 694 | { | 801 | { |
| 695 | struct ath_common *common = ath9k_hw_common(priv->ah); | 802 | struct ath_common *common = ath9k_hw_common(priv->ah); |
| 696 | unsigned long timestamp = jiffies_to_msecs(jiffies); | 803 | unsigned long timestamp = jiffies_to_msecs(jiffies); |
| @@ -789,317 +896,6 @@ set_timer: | |||
| 789 | msecs_to_jiffies(cal_interval)); | 896 | msecs_to_jiffies(cal_interval)); |
| 790 | } | 897 | } |
| 791 | 898 | ||
| 792 | /*******/ | ||
| 793 | /* LED */ | ||
| 794 | /*******/ | ||
| 795 | |||
| 796 | static void ath9k_led_blink_work(struct work_struct *work) | ||
| 797 | { | ||
| 798 | struct ath9k_htc_priv *priv = container_of(work, struct ath9k_htc_priv, | ||
| 799 | ath9k_led_blink_work.work); | ||
| 800 | |||
| 801 | if (!(priv->op_flags & OP_LED_ASSOCIATED)) | ||
| 802 | return; | ||
| 803 | |||
| 804 | if ((priv->led_on_duration == ATH_LED_ON_DURATION_IDLE) || | ||
| 805 | (priv->led_off_duration == ATH_LED_OFF_DURATION_IDLE)) | ||
| 806 | ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, 0); | ||
| 807 | else | ||
| 808 | ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, | ||
| 809 | (priv->op_flags & OP_LED_ON) ? 1 : 0); | ||
| 810 | |||
| 811 | ieee80211_queue_delayed_work(priv->hw, | ||
| 812 | &priv->ath9k_led_blink_work, | ||
| 813 | (priv->op_flags & OP_LED_ON) ? | ||
| 814 | msecs_to_jiffies(priv->led_off_duration) : | ||
| 815 | msecs_to_jiffies(priv->led_on_duration)); | ||
| 816 | |||
| 817 | priv->led_on_duration = priv->led_on_cnt ? | ||
| 818 | max((ATH_LED_ON_DURATION_IDLE - priv->led_on_cnt), 25) : | ||
| 819 | ATH_LED_ON_DURATION_IDLE; | ||
| 820 | priv->led_off_duration = priv->led_off_cnt ? | ||
| 821 | max((ATH_LED_OFF_DURATION_IDLE - priv->led_off_cnt), 10) : | ||
| 822 | ATH_LED_OFF_DURATION_IDLE; | ||
| 823 | priv->led_on_cnt = priv->led_off_cnt = 0; | ||
| 824 | |||
| 825 | if (priv->op_flags & OP_LED_ON) | ||
| 826 | priv->op_flags &= ~OP_LED_ON; | ||
| 827 | else | ||
| 828 | priv->op_flags |= OP_LED_ON; | ||
| 829 | } | ||
| 830 | |||
| 831 | static void ath9k_led_brightness_work(struct work_struct *work) | ||
| 832 | { | ||
| 833 | struct ath_led *led = container_of(work, struct ath_led, | ||
| 834 | brightness_work.work); | ||
| 835 | struct ath9k_htc_priv *priv = led->priv; | ||
| 836 | |||
| 837 | switch (led->brightness) { | ||
| 838 | case LED_OFF: | ||
| 839 | if (led->led_type == ATH_LED_ASSOC || | ||
| 840 | led->led_type == ATH_LED_RADIO) { | ||
| 841 | ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, | ||
| 842 | (led->led_type == ATH_LED_RADIO)); | ||
| 843 | priv->op_flags &= ~OP_LED_ASSOCIATED; | ||
| 844 | if (led->led_type == ATH_LED_RADIO) | ||
| 845 | priv->op_flags &= ~OP_LED_ON; | ||
| 846 | } else { | ||
| 847 | priv->led_off_cnt++; | ||
| 848 | } | ||
| 849 | break; | ||
| 850 | case LED_FULL: | ||
| 851 | if (led->led_type == ATH_LED_ASSOC) { | ||
| 852 | priv->op_flags |= OP_LED_ASSOCIATED; | ||
| 853 | ieee80211_queue_delayed_work(priv->hw, | ||
| 854 | &priv->ath9k_led_blink_work, 0); | ||
| 855 | } else if (led->led_type == ATH_LED_RADIO) { | ||
| 856 | ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, 0); | ||
| 857 | priv->op_flags |= OP_LED_ON; | ||
| 858 | } else { | ||
| 859 | priv->led_on_cnt++; | ||
| 860 | } | ||
| 861 | break; | ||
| 862 | default: | ||
| 863 | break; | ||
| 864 | } | ||
| 865 | } | ||
| 866 | |||
| 867 | static void ath9k_led_brightness(struct led_classdev *led_cdev, | ||
| 868 | enum led_brightness brightness) | ||
| 869 | { | ||
| 870 | struct ath_led *led = container_of(led_cdev, struct ath_led, led_cdev); | ||
| 871 | struct ath9k_htc_priv *priv = led->priv; | ||
| 872 | |||
| 873 | led->brightness = brightness; | ||
| 874 | if (!(priv->op_flags & OP_LED_DEINIT)) | ||
| 875 | ieee80211_queue_delayed_work(priv->hw, | ||
| 876 | &led->brightness_work, 0); | ||
| 877 | } | ||
| 878 | |||
| 879 | static void ath9k_led_stop_brightness(struct ath9k_htc_priv *priv) | ||
| 880 | { | ||
| 881 | cancel_delayed_work_sync(&priv->radio_led.brightness_work); | ||
| 882 | cancel_delayed_work_sync(&priv->assoc_led.brightness_work); | ||
| 883 | cancel_delayed_work_sync(&priv->tx_led.brightness_work); | ||
| 884 | cancel_delayed_work_sync(&priv->rx_led.brightness_work); | ||
| 885 | } | ||
| 886 | |||
| 887 | static int ath9k_register_led(struct ath9k_htc_priv *priv, struct ath_led *led, | ||
| 888 | char *trigger) | ||
| 889 | { | ||
| 890 | int ret; | ||
| 891 | |||
| 892 | led->priv = priv; | ||
| 893 | led->led_cdev.name = led->name; | ||
| 894 | led->led_cdev.default_trigger = trigger; | ||
| 895 | led->led_cdev.brightness_set = ath9k_led_brightness; | ||
| 896 | |||
| 897 | ret = led_classdev_register(wiphy_dev(priv->hw->wiphy), &led->led_cdev); | ||
| 898 | if (ret) | ||
| 899 | ath_err(ath9k_hw_common(priv->ah), | ||
| 900 | "Failed to register led:%s", led->name); | ||
| 901 | else | ||
| 902 | led->registered = 1; | ||
| 903 | |||
| 904 | INIT_DELAYED_WORK(&led->brightness_work, ath9k_led_brightness_work); | ||
| 905 | |||
| 906 | return ret; | ||
| 907 | } | ||
| 908 | |||
| 909 | static void ath9k_unregister_led(struct ath_led *led) | ||
| 910 | { | ||
| 911 | if (led->registered) { | ||
| 912 | led_classdev_unregister(&led->led_cdev); | ||
| 913 | led->registered = 0; | ||
| 914 | } | ||
| 915 | } | ||
| 916 | |||
| 917 | void ath9k_deinit_leds(struct ath9k_htc_priv *priv) | ||
| 918 | { | ||
| 919 | priv->op_flags |= OP_LED_DEINIT; | ||
| 920 | ath9k_unregister_led(&priv->assoc_led); | ||
| 921 | priv->op_flags &= ~OP_LED_ASSOCIATED; | ||
| 922 | ath9k_unregister_led(&priv->tx_led); | ||
| 923 | ath9k_unregister_led(&priv->rx_led); | ||
| 924 | ath9k_unregister_led(&priv->radio_led); | ||
| 925 | } | ||
| 926 | |||
| 927 | void ath9k_init_leds(struct ath9k_htc_priv *priv) | ||
| 928 | { | ||
| 929 | char *trigger; | ||
| 930 | int ret; | ||
| 931 | |||
| 932 | if (AR_SREV_9287(priv->ah)) | ||
| 933 | priv->ah->led_pin = ATH_LED_PIN_9287; | ||
| 934 | else if (AR_SREV_9271(priv->ah)) | ||
| 935 | priv->ah->led_pin = ATH_LED_PIN_9271; | ||
| 936 | else if (AR_DEVID_7010(priv->ah)) | ||
| 937 | priv->ah->led_pin = ATH_LED_PIN_7010; | ||
| 938 | else | ||
| 939 | priv->ah->led_pin = ATH_LED_PIN_DEF; | ||
| 940 | |||
| 941 | /* Configure gpio 1 for output */ | ||
| 942 | ath9k_hw_cfg_output(priv->ah, priv->ah->led_pin, | ||
| 943 | AR_GPIO_OUTPUT_MUX_AS_OUTPUT); | ||
| 944 | /* LED off, active low */ | ||
| 945 | ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, 1); | ||
| 946 | |||
| 947 | INIT_DELAYED_WORK(&priv->ath9k_led_blink_work, ath9k_led_blink_work); | ||
| 948 | |||
| 949 | trigger = ieee80211_get_radio_led_name(priv->hw); | ||
| 950 | snprintf(priv->radio_led.name, sizeof(priv->radio_led.name), | ||
| 951 | "ath9k-%s::radio", wiphy_name(priv->hw->wiphy)); | ||
| 952 | ret = ath9k_register_led(priv, &priv->radio_led, trigger); | ||
| 953 | priv->radio_led.led_type = ATH_LED_RADIO; | ||
| 954 | if (ret) | ||
| 955 | goto fail; | ||
| 956 | |||
| 957 | trigger = ieee80211_get_assoc_led_name(priv->hw); | ||
| 958 | snprintf(priv->assoc_led.name, sizeof(priv->assoc_led.name), | ||
| 959 | "ath9k-%s::assoc", wiphy_name(priv->hw->wiphy)); | ||
| 960 | ret = ath9k_register_led(priv, &priv->assoc_led, trigger); | ||
| 961 | priv->assoc_led.led_type = ATH_LED_ASSOC; | ||
| 962 | if (ret) | ||
| 963 | goto fail; | ||
| 964 | |||
| 965 | trigger = ieee80211_get_tx_led_name(priv->hw); | ||
| 966 | snprintf(priv->tx_led.name, sizeof(priv->tx_led.name), | ||
| 967 | "ath9k-%s::tx", wiphy_name(priv->hw->wiphy)); | ||
| 968 | ret = ath9k_register_led(priv, &priv->tx_led, trigger); | ||
| 969 | priv->tx_led.led_type = ATH_LED_TX; | ||
| 970 | if (ret) | ||
| 971 | goto fail; | ||
| 972 | |||
| 973 | trigger = ieee80211_get_rx_led_name(priv->hw); | ||
| 974 | snprintf(priv->rx_led.name, sizeof(priv->rx_led.name), | ||
| 975 | "ath9k-%s::rx", wiphy_name(priv->hw->wiphy)); | ||
| 976 | ret = ath9k_register_led(priv, &priv->rx_led, trigger); | ||
| 977 | priv->rx_led.led_type = ATH_LED_RX; | ||
| 978 | if (ret) | ||
| 979 | goto fail; | ||
| 980 | |||
| 981 | priv->op_flags &= ~OP_LED_DEINIT; | ||
| 982 | |||
| 983 | return; | ||
| 984 | |||
| 985 | fail: | ||
| 986 | cancel_delayed_work_sync(&priv->ath9k_led_blink_work); | ||
| 987 | ath9k_deinit_leds(priv); | ||
| 988 | } | ||
| 989 | |||
| 990 | /*******************/ | ||
| 991 | /* Rfkill */ | ||
| 992 | /*******************/ | ||
| 993 | |||
| 994 | static bool ath_is_rfkill_set(struct ath9k_htc_priv *priv) | ||
| 995 | { | ||
| 996 | return ath9k_hw_gpio_get(priv->ah, priv->ah->rfkill_gpio) == | ||
| 997 | priv->ah->rfkill_polarity; | ||
| 998 | } | ||
| 999 | |||
| 1000 | static void ath9k_htc_rfkill_poll_state(struct ieee80211_hw *hw) | ||
| 1001 | { | ||
| 1002 | struct ath9k_htc_priv *priv = hw->priv; | ||
| 1003 | bool blocked = !!ath_is_rfkill_set(priv); | ||
| 1004 | |||
| 1005 | wiphy_rfkill_set_hw_state(hw->wiphy, blocked); | ||
| 1006 | } | ||
| 1007 | |||
| 1008 | void ath9k_start_rfkill_poll(struct ath9k_htc_priv *priv) | ||
| 1009 | { | ||
| 1010 | if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT) | ||
| 1011 | wiphy_rfkill_start_polling(priv->hw->wiphy); | ||
| 1012 | } | ||
| 1013 | |||
| 1014 | static void ath9k_htc_radio_enable(struct ieee80211_hw *hw) | ||
| 1015 | { | ||
| 1016 | struct ath9k_htc_priv *priv = hw->priv; | ||
| 1017 | struct ath_hw *ah = priv->ah; | ||
| 1018 | struct ath_common *common = ath9k_hw_common(ah); | ||
| 1019 | int ret; | ||
| 1020 | u8 cmd_rsp; | ||
| 1021 | |||
| 1022 | if (!ah->curchan) | ||
| 1023 | ah->curchan = ath9k_cmn_get_curchannel(hw, ah); | ||
| 1024 | |||
| 1025 | /* Reset the HW */ | ||
| 1026 | ret = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); | ||
| 1027 | if (ret) { | ||
| 1028 | ath_err(common, | ||
| 1029 | "Unable to reset hardware; reset status %d (freq %u MHz)\n", | ||
| 1030 | ret, ah->curchan->channel); | ||
| 1031 | } | ||
| 1032 | |||
| 1033 | ath_update_txpow(priv); | ||
| 1034 | |||
| 1035 | /* Start RX */ | ||
| 1036 | WMI_CMD(WMI_START_RECV_CMDID); | ||
| 1037 | ath9k_host_rx_init(priv); | ||
| 1038 | |||
| 1039 | /* Start TX */ | ||
| 1040 | htc_start(priv->htc); | ||
| 1041 | spin_lock_bh(&priv->tx_lock); | ||
| 1042 | priv->tx_queues_stop = false; | ||
| 1043 | spin_unlock_bh(&priv->tx_lock); | ||
| 1044 | ieee80211_wake_queues(hw); | ||
| 1045 | |||
| 1046 | WMI_CMD(WMI_ENABLE_INTR_CMDID); | ||
| 1047 | |||
| 1048 | /* Enable LED */ | ||
| 1049 | ath9k_hw_cfg_output(ah, ah->led_pin, | ||
| 1050 | AR_GPIO_OUTPUT_MUX_AS_OUTPUT); | ||
| 1051 | ath9k_hw_set_gpio(ah, ah->led_pin, 0); | ||
| 1052 | } | ||
| 1053 | |||
| 1054 | static void ath9k_htc_radio_disable(struct ieee80211_hw *hw) | ||
| 1055 | { | ||
| 1056 | struct ath9k_htc_priv *priv = hw->priv; | ||
| 1057 | struct ath_hw *ah = priv->ah; | ||
| 1058 | struct ath_common *common = ath9k_hw_common(ah); | ||
| 1059 | int ret; | ||
| 1060 | u8 cmd_rsp; | ||
| 1061 | |||
| 1062 | ath9k_htc_ps_wakeup(priv); | ||
| 1063 | |||
| 1064 | /* Disable LED */ | ||
| 1065 | ath9k_hw_set_gpio(ah, ah->led_pin, 1); | ||
| 1066 | ath9k_hw_cfg_gpio_input(ah, ah->led_pin); | ||
| 1067 | |||
| 1068 | WMI_CMD(WMI_DISABLE_INTR_CMDID); | ||
| 1069 | |||
| 1070 | /* Stop TX */ | ||
| 1071 | ieee80211_stop_queues(hw); | ||
| 1072 | htc_stop(priv->htc); | ||
| 1073 | WMI_CMD(WMI_DRAIN_TXQ_ALL_CMDID); | ||
| 1074 | skb_queue_purge(&priv->tx_queue); | ||
| 1075 | |||
| 1076 | /* Stop RX */ | ||
| 1077 | WMI_CMD(WMI_STOP_RECV_CMDID); | ||
| 1078 | |||
| 1079 | /* | ||
| 1080 | * The MIB counters have to be disabled here, | ||
| 1081 | * since the target doesn't do it. | ||
| 1082 | */ | ||
| 1083 | ath9k_hw_disable_mib_counters(ah); | ||
| 1084 | |||
| 1085 | if (!ah->curchan) | ||
| 1086 | ah->curchan = ath9k_cmn_get_curchannel(hw, ah); | ||
| 1087 | |||
| 1088 | /* Reset the HW */ | ||
| 1089 | ret = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false); | ||
| 1090 | if (ret) { | ||
| 1091 | ath_err(common, | ||
| 1092 | "Unable to reset hardware; reset status %d (freq %u MHz)\n", | ||
| 1093 | ret, ah->curchan->channel); | ||
| 1094 | } | ||
| 1095 | |||
| 1096 | /* Disable the PHY */ | ||
| 1097 | ath9k_hw_phy_disable(ah); | ||
| 1098 | |||
| 1099 | ath9k_htc_ps_restore(priv); | ||
| 1100 | ath9k_htc_setpower(priv, ATH9K_PM_FULL_SLEEP); | ||
| 1101 | } | ||
| 1102 | |||
| 1103 | /**********************/ | 899 | /**********************/ |
| 1104 | /* mac80211 Callbacks */ | 900 | /* mac80211 Callbacks */ |
| 1105 | /**********************/ | 901 | /**********************/ |
| @@ -1218,6 +1014,12 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw) | |||
| 1218 | int ret = 0; | 1014 | int ret = 0; |
| 1219 | u8 cmd_rsp; | 1015 | u8 cmd_rsp; |
| 1220 | 1016 | ||
| 1017 | /* Cancel all the running timers/work .. */ | ||
| 1018 | cancel_work_sync(&priv->fatal_work); | ||
| 1019 | cancel_work_sync(&priv->ps_work); | ||
| 1020 | cancel_delayed_work_sync(&priv->ath9k_led_blink_work); | ||
| 1021 | ath9k_led_stop_brightness(priv); | ||
| 1022 | |||
| 1221 | mutex_lock(&priv->mutex); | 1023 | mutex_lock(&priv->mutex); |
| 1222 | 1024 | ||
| 1223 | if (priv->op_flags & OP_INVALID) { | 1025 | if (priv->op_flags & OP_INVALID) { |
| @@ -1226,11 +1028,6 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw) | |||
| 1226 | return; | 1028 | return; |
| 1227 | } | 1029 | } |
| 1228 | 1030 | ||
| 1229 | /* Cancel all the running timers/work .. */ | ||
| 1230 | cancel_work_sync(&priv->ps_work); | ||
| 1231 | cancel_delayed_work_sync(&priv->ath9k_led_blink_work); | ||
| 1232 | ath9k_led_stop_brightness(priv); | ||
| 1233 | |||
| 1234 | ath9k_htc_ps_wakeup(priv); | 1031 | ath9k_htc_ps_wakeup(priv); |
| 1235 | htc_stop(priv->htc); | 1032 | htc_stop(priv->htc); |
| 1236 | WMI_CMD(WMI_DISABLE_INTR_CMDID); | 1033 | WMI_CMD(WMI_DISABLE_INTR_CMDID); |
| @@ -1792,7 +1589,6 @@ static void ath9k_htc_sw_scan_complete(struct ieee80211_hw *hw) | |||
| 1792 | spin_lock_bh(&priv->beacon_lock); | 1589 | spin_lock_bh(&priv->beacon_lock); |
| 1793 | priv->op_flags &= ~OP_SCANNING; | 1590 | priv->op_flags &= ~OP_SCANNING; |
| 1794 | spin_unlock_bh(&priv->beacon_lock); | 1591 | spin_unlock_bh(&priv->beacon_lock); |
| 1795 | priv->op_flags |= OP_FULL_RESET; | ||
| 1796 | if (priv->op_flags & OP_ASSOCIATED) { | 1592 | if (priv->op_flags & OP_ASSOCIATED) { |
| 1797 | ath9k_htc_beacon_config(priv, priv->vif); | 1593 | ath9k_htc_beacon_config(priv, priv->vif); |
| 1798 | ath_start_ani(priv); | 1594 | ath_start_ani(priv); |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 4b51ed47fe69..fde978665e07 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
| @@ -1615,7 +1615,9 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode) | |||
| 1615 | * simply keep the ATH_DBG_WARN_ON_ONCE() but make | 1615 | * simply keep the ATH_DBG_WARN_ON_ONCE() but make |
| 1616 | * ath9k_hw_setpower() return type void. | 1616 | * ath9k_hw_setpower() return type void. |
| 1617 | */ | 1617 | */ |
| 1618 | ATH_DBG_WARN_ON_ONCE(!status); | 1618 | |
| 1619 | if (!(ah->ah_flags & AH_UNPLUGGED)) | ||
| 1620 | ATH_DBG_WARN_ON_ONCE(!status); | ||
| 1619 | 1621 | ||
| 1620 | return status; | 1622 | return status; |
| 1621 | } | 1623 | } |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index b8ffaa5dc650..5a3dfec45e96 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
| @@ -646,6 +646,10 @@ struct ath_nf_limits { | |||
| 646 | s16 nominal; | 646 | s16 nominal; |
| 647 | }; | 647 | }; |
| 648 | 648 | ||
| 649 | /* ah_flags */ | ||
| 650 | #define AH_USE_EEPROM 0x1 | ||
| 651 | #define AH_UNPLUGGED 0x2 /* The card has been physically removed. */ | ||
| 652 | |||
| 649 | struct ath_hw { | 653 | struct ath_hw { |
| 650 | struct ieee80211_hw *hw; | 654 | struct ieee80211_hw *hw; |
| 651 | struct ath_common common; | 655 | struct ath_common common; |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index b0e5e716b167..767d8b86f1e1 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
| @@ -29,8 +29,8 @@ static unsigned int ath9k_debug = ATH_DBG_DEFAULT; | |||
| 29 | module_param_named(debug, ath9k_debug, uint, 0); | 29 | module_param_named(debug, ath9k_debug, uint, 0); |
| 30 | MODULE_PARM_DESC(debug, "Debugging mask"); | 30 | MODULE_PARM_DESC(debug, "Debugging mask"); |
| 31 | 31 | ||
| 32 | int modparam_nohwcrypt; | 32 | int ath9k_modparam_nohwcrypt; |
| 33 | module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444); | 33 | module_param_named(nohwcrypt, ath9k_modparam_nohwcrypt, int, 0444); |
| 34 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption"); | 34 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption"); |
| 35 | 35 | ||
| 36 | int led_blink; | 36 | int led_blink; |
| @@ -45,6 +45,7 @@ int ath9k_pm_qos_value = ATH9K_PM_QOS_DEFAULT_VALUE; | |||
| 45 | module_param_named(pmqos, ath9k_pm_qos_value, int, S_IRUSR | S_IRGRP | S_IROTH); | 45 | module_param_named(pmqos, ath9k_pm_qos_value, int, S_IRUSR | S_IRGRP | S_IROTH); |
| 46 | MODULE_PARM_DESC(pmqos, "User specified PM-QOS value"); | 46 | MODULE_PARM_DESC(pmqos, "User specified PM-QOS value"); |
| 47 | 47 | ||
| 48 | bool is_ath9k_unloaded; | ||
| 48 | /* We use the hw_value as an index into our private channel structure */ | 49 | /* We use the hw_value as an index into our private channel structure */ |
| 49 | 50 | ||
| 50 | #define CHAN2G(_freq, _idx) { \ | 51 | #define CHAN2G(_freq, _idx) { \ |
| @@ -372,7 +373,7 @@ fail: | |||
| 372 | #undef DS2PHYS | 373 | #undef DS2PHYS |
| 373 | } | 374 | } |
| 374 | 375 | ||
| 375 | static void ath9k_init_crypto(struct ath_softc *sc) | 376 | void ath9k_init_crypto(struct ath_softc *sc) |
| 376 | { | 377 | { |
| 377 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 378 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
| 378 | int i = 0; | 379 | int i = 0; |
| @@ -647,13 +648,12 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
| 647 | IEEE80211_HW_SUPPORTS_PS | | 648 | IEEE80211_HW_SUPPORTS_PS | |
| 648 | IEEE80211_HW_PS_NULLFUNC_STACK | | 649 | IEEE80211_HW_PS_NULLFUNC_STACK | |
| 649 | IEEE80211_HW_SPECTRUM_MGMT | | 650 | IEEE80211_HW_SPECTRUM_MGMT | |
| 650 | IEEE80211_HW_REPORTS_TX_ACK_STATUS | | 651 | IEEE80211_HW_REPORTS_TX_ACK_STATUS; |
| 651 | IEEE80211_HW_NEED_DTIM_PERIOD; | ||
| 652 | 652 | ||
| 653 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) | 653 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) |
| 654 | hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION; | 654 | hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION; |
| 655 | 655 | ||
| 656 | if (AR_SREV_9160_10_OR_LATER(sc->sc_ah) || modparam_nohwcrypt) | 656 | if (AR_SREV_9160_10_OR_LATER(sc->sc_ah) || ath9k_modparam_nohwcrypt) |
| 657 | hw->flags |= IEEE80211_HW_MFP_CAPABLE; | 657 | hw->flags |= IEEE80211_HW_MFP_CAPABLE; |
| 658 | 658 | ||
| 659 | hw->wiphy->interface_modes = | 659 | hw->wiphy->interface_modes = |
| @@ -899,6 +899,7 @@ module_init(ath9k_init); | |||
| 899 | 899 | ||
| 900 | static void __exit ath9k_exit(void) | 900 | static void __exit ath9k_exit(void) |
| 901 | { | 901 | { |
| 902 | is_ath9k_unloaded = true; | ||
| 902 | ath_ahb_exit(); | 903 | ath_ahb_exit(); |
| 903 | ath_pci_exit(); | 904 | ath_pci_exit(); |
| 904 | ath_rate_control_unregister(); | 905 | ath_rate_control_unregister(); |
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c index e3d2ebf00e2e..180170d3ce25 100644 --- a/drivers/net/wireless/ath/ath9k/mac.c +++ b/drivers/net/wireless/ath/ath9k/mac.c | |||
| @@ -692,15 +692,16 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds, | |||
| 692 | if ((ads.ds_rxstatus8 & AR_RxFrameOK) == 0) { | 692 | if ((ads.ds_rxstatus8 & AR_RxFrameOK) == 0) { |
| 693 | if (ads.ds_rxstatus8 & AR_CRCErr) | 693 | if (ads.ds_rxstatus8 & AR_CRCErr) |
| 694 | rs->rs_status |= ATH9K_RXERR_CRC; | 694 | rs->rs_status |= ATH9K_RXERR_CRC; |
| 695 | else if (ads.ds_rxstatus8 & AR_PHYErr) { | 695 | if (ads.ds_rxstatus8 & AR_PHYErr) { |
| 696 | rs->rs_status |= ATH9K_RXERR_PHY; | 696 | rs->rs_status |= ATH9K_RXERR_PHY; |
| 697 | phyerr = MS(ads.ds_rxstatus8, AR_PHYErrCode); | 697 | phyerr = MS(ads.ds_rxstatus8, AR_PHYErrCode); |
| 698 | rs->rs_phyerr = phyerr; | 698 | rs->rs_phyerr = phyerr; |
| 699 | } else if (ads.ds_rxstatus8 & AR_DecryptCRCErr) | 699 | } |
| 700 | if (ads.ds_rxstatus8 & AR_DecryptCRCErr) | ||
| 700 | rs->rs_status |= ATH9K_RXERR_DECRYPT; | 701 | rs->rs_status |= ATH9K_RXERR_DECRYPT; |
| 701 | else if (ads.ds_rxstatus8 & AR_MichaelErr) | 702 | if (ads.ds_rxstatus8 & AR_MichaelErr) |
| 702 | rs->rs_status |= ATH9K_RXERR_MIC; | 703 | rs->rs_status |= ATH9K_RXERR_MIC; |
| 703 | else if (ads.ds_rxstatus8 & AR_KeyMiss) | 704 | if (ads.ds_rxstatus8 & AR_KeyMiss) |
| 704 | rs->rs_status |= ATH9K_RXERR_DECRYPT; | 705 | rs->rs_status |= ATH9K_RXERR_DECRYPT; |
| 705 | } | 706 | } |
| 706 | 707 | ||
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 8a1691db166d..f90a6ca94a76 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
| @@ -285,7 +285,8 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw, | |||
| 285 | ath9k_hw_set_interrupts(ah, ah->imask); | 285 | ath9k_hw_set_interrupts(ah, ah->imask); |
| 286 | 286 | ||
| 287 | if (!(sc->sc_flags & (SC_OP_OFFCHANNEL))) { | 287 | if (!(sc->sc_flags & (SC_OP_OFFCHANNEL))) { |
| 288 | ath_beacon_config(sc, NULL); | 288 | if (sc->sc_flags & SC_OP_BEACONS) |
| 289 | ath_beacon_config(sc, NULL); | ||
| 289 | ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); | 290 | ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); |
| 290 | ath_start_ani(common); | 291 | ath_start_ani(common); |
| 291 | } | 292 | } |
| @@ -599,7 +600,7 @@ void ath9k_tasklet(unsigned long data) | |||
| 599 | return; | 600 | return; |
| 600 | } | 601 | } |
| 601 | 602 | ||
| 602 | spin_lock_bh(&sc->sc_pcu_lock); | 603 | spin_lock(&sc->sc_pcu_lock); |
| 603 | 604 | ||
| 604 | if (!ath9k_hw_check_alive(ah)) | 605 | if (!ath9k_hw_check_alive(ah)) |
| 605 | ieee80211_queue_work(sc->hw, &sc->hw_check_work); | 606 | ieee80211_queue_work(sc->hw, &sc->hw_check_work); |
| @@ -643,7 +644,7 @@ void ath9k_tasklet(unsigned long data) | |||
| 643 | /* re-enable hardware interrupt */ | 644 | /* re-enable hardware interrupt */ |
| 644 | ath9k_hw_enable_interrupts(ah); | 645 | ath9k_hw_enable_interrupts(ah); |
| 645 | 646 | ||
| 646 | spin_unlock_bh(&sc->sc_pcu_lock); | 647 | spin_unlock(&sc->sc_pcu_lock); |
| 647 | ath9k_ps_restore(sc); | 648 | ath9k_ps_restore(sc); |
| 648 | } | 649 | } |
| 649 | 650 | ||
| @@ -1328,6 +1329,7 @@ static void ath9k_stop(struct ieee80211_hw *hw) | |||
| 1328 | ath9k_ps_restore(sc); | 1329 | ath9k_ps_restore(sc); |
| 1329 | 1330 | ||
| 1330 | sc->ps_idle = true; | 1331 | sc->ps_idle = true; |
| 1332 | ath9k_set_wiphy_idle(aphy, true); | ||
| 1331 | ath_radio_disable(sc, hw); | 1333 | ath_radio_disable(sc, hw); |
| 1332 | 1334 | ||
| 1333 | sc->sc_flags |= SC_OP_INVALID; | 1335 | sc->sc_flags |= SC_OP_INVALID; |
| @@ -1455,6 +1457,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, | |||
| 1455 | struct ath_wiphy *aphy = hw->priv; | 1457 | struct ath_wiphy *aphy = hw->priv; |
| 1456 | struct ath_softc *sc = aphy->sc; | 1458 | struct ath_softc *sc = aphy->sc; |
| 1457 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 1459 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
| 1460 | int ret = 0; | ||
| 1458 | 1461 | ||
| 1459 | ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n"); | 1462 | ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n"); |
| 1460 | mutex_lock(&sc->mutex); | 1463 | mutex_lock(&sc->mutex); |
| @@ -1464,7 +1467,8 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, | |||
| 1464 | case NL80211_IFTYPE_ADHOC: | 1467 | case NL80211_IFTYPE_ADHOC: |
| 1465 | if (sc->nbcnvifs >= ATH_BCBUF) { | 1468 | if (sc->nbcnvifs >= ATH_BCBUF) { |
| 1466 | ath_err(common, "No beacon slot available\n"); | 1469 | ath_err(common, "No beacon slot available\n"); |
| 1467 | return -ENOBUFS; | 1470 | ret = -ENOBUFS; |
| 1471 | goto out; | ||
| 1468 | } | 1472 | } |
| 1469 | break; | 1473 | break; |
| 1470 | case NL80211_IFTYPE_STATION: | 1474 | case NL80211_IFTYPE_STATION: |
| @@ -1478,14 +1482,15 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, | |||
| 1478 | default: | 1482 | default: |
| 1479 | ath_err(common, "Interface type %d not yet supported\n", | 1483 | ath_err(common, "Interface type %d not yet supported\n", |
| 1480 | vif->type); | 1484 | vif->type); |
| 1481 | mutex_unlock(&sc->mutex); | 1485 | ret = -ENOTSUPP; |
| 1482 | return -ENOTSUPP; | 1486 | goto out; |
| 1483 | } | 1487 | } |
| 1484 | vif->type = new_type; | 1488 | vif->type = new_type; |
| 1485 | vif->p2p = p2p; | 1489 | vif->p2p = p2p; |
| 1486 | 1490 | ||
| 1491 | out: | ||
| 1487 | mutex_unlock(&sc->mutex); | 1492 | mutex_unlock(&sc->mutex); |
| 1488 | return 0; | 1493 | return ret; |
| 1489 | } | 1494 | } |
| 1490 | 1495 | ||
| 1491 | static void ath9k_remove_interface(struct ieee80211_hw *hw, | 1496 | static void ath9k_remove_interface(struct ieee80211_hw *hw, |
| @@ -1824,7 +1829,7 @@ static int ath9k_set_key(struct ieee80211_hw *hw, | |||
| 1824 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 1829 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
| 1825 | int ret = 0; | 1830 | int ret = 0; |
| 1826 | 1831 | ||
| 1827 | if (modparam_nohwcrypt) | 1832 | if (ath9k_modparam_nohwcrypt) |
| 1828 | return -ENOSPC; | 1833 | return -ENOSPC; |
| 1829 | 1834 | ||
| 1830 | mutex_lock(&sc->mutex); | 1835 | mutex_lock(&sc->mutex); |
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 7ca8499249ec..78ef1f13386f 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
| @@ -96,7 +96,7 @@ static void ath_pci_bt_coex_prep(struct ath_common *common) | |||
| 96 | struct pci_dev *pdev = to_pci_dev(sc->dev); | 96 | struct pci_dev *pdev = to_pci_dev(sc->dev); |
| 97 | u8 aspm; | 97 | u8 aspm; |
| 98 | 98 | ||
| 99 | if (!pdev->is_pcie) | 99 | if (!pci_is_pcie(pdev)) |
| 100 | return; | 100 | return; |
| 101 | 101 | ||
| 102 | pci_read_config_byte(pdev, ATH_PCIE_CAP_LINK_CTRL, &aspm); | 102 | pci_read_config_byte(pdev, ATH_PCIE_CAP_LINK_CTRL, &aspm); |
| @@ -264,6 +264,8 @@ static void ath_pci_remove(struct pci_dev *pdev) | |||
| 264 | struct ath_softc *sc = aphy->sc; | 264 | struct ath_softc *sc = aphy->sc; |
| 265 | void __iomem *mem = sc->mem; | 265 | void __iomem *mem = sc->mem; |
| 266 | 266 | ||
| 267 | if (!is_ath9k_unloaded) | ||
| 268 | sc->sc_ah->ah_flags |= AH_UNPLUGGED; | ||
| 267 | ath9k_deinit_device(sc); | 269 | ath9k_deinit_device(sc); |
| 268 | free_irq(sc->irq, sc); | 270 | free_irq(sc->irq, sc); |
| 269 | ieee80211_free_hw(sc->hw); | 271 | ieee80211_free_hw(sc->hw); |
| @@ -309,7 +311,16 @@ static int ath_pci_resume(struct device *device) | |||
| 309 | AR_GPIO_OUTPUT_MUX_AS_OUTPUT); | 311 | AR_GPIO_OUTPUT_MUX_AS_OUTPUT); |
| 310 | ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1); | 312 | ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1); |
| 311 | 313 | ||
| 314 | /* | ||
| 315 | * Reset key cache to sane defaults (all entries cleared) instead of | ||
| 316 | * semi-random values after suspend/resume. | ||
| 317 | */ | ||
| 318 | ath9k_ps_wakeup(sc); | ||
| 319 | ath9k_init_crypto(sc); | ||
| 320 | ath9k_ps_restore(sc); | ||
| 321 | |||
| 312 | sc->ps_idle = true; | 322 | sc->ps_idle = true; |
| 323 | ath9k_set_wiphy_idle(aphy, true); | ||
| 313 | ath_radio_disable(sc, hw); | 324 | ath_radio_disable(sc, hw); |
| 314 | 325 | ||
| 315 | return 0; | 326 | return 0; |
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 896d12986b1e..e45147820eae 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
| @@ -400,7 +400,7 @@ static void ath_rc_sort_validrates(const struct ath_rate_table *rate_table, | |||
| 400 | } | 400 | } |
| 401 | } | 401 | } |
| 402 | 402 | ||
| 403 | static void ath_rc_init_valid_txmask(struct ath_rate_priv *ath_rc_priv) | 403 | static void ath_rc_init_valid_rate_idx(struct ath_rate_priv *ath_rc_priv) |
| 404 | { | 404 | { |
| 405 | u8 i; | 405 | u8 i; |
| 406 | 406 | ||
| @@ -408,7 +408,7 @@ static void ath_rc_init_valid_txmask(struct ath_rate_priv *ath_rc_priv) | |||
| 408 | ath_rc_priv->valid_rate_index[i] = 0; | 408 | ath_rc_priv->valid_rate_index[i] = 0; |
| 409 | } | 409 | } |
| 410 | 410 | ||
| 411 | static inline void ath_rc_set_valid_txmask(struct ath_rate_priv *ath_rc_priv, | 411 | static inline void ath_rc_set_valid_rate_idx(struct ath_rate_priv *ath_rc_priv, |
| 412 | u8 index, int valid_tx_rate) | 412 | u8 index, int valid_tx_rate) |
| 413 | { | 413 | { |
| 414 | BUG_ON(index > ath_rc_priv->rate_table_size); | 414 | BUG_ON(index > ath_rc_priv->rate_table_size); |
| @@ -489,7 +489,7 @@ static u8 ath_rc_init_validrates(struct ath_rate_priv *ath_rc_priv, | |||
| 489 | 489 | ||
| 490 | ath_rc_priv->valid_phy_rateidx[phy][valid_rate_count] = i; | 490 | ath_rc_priv->valid_phy_rateidx[phy][valid_rate_count] = i; |
| 491 | ath_rc_priv->valid_phy_ratecnt[phy] += 1; | 491 | ath_rc_priv->valid_phy_ratecnt[phy] += 1; |
| 492 | ath_rc_set_valid_txmask(ath_rc_priv, i, 1); | 492 | ath_rc_set_valid_rate_idx(ath_rc_priv, i, 1); |
| 493 | hi = i; | 493 | hi = i; |
| 494 | } | 494 | } |
| 495 | } | 495 | } |
| @@ -532,7 +532,7 @@ static u8 ath_rc_setvalid_rates(struct ath_rate_priv *ath_rc_priv, | |||
| 532 | ath_rc_priv->valid_phy_rateidx[phy] | 532 | ath_rc_priv->valid_phy_rateidx[phy] |
| 533 | [valid_rate_count] = j; | 533 | [valid_rate_count] = j; |
| 534 | ath_rc_priv->valid_phy_ratecnt[phy] += 1; | 534 | ath_rc_priv->valid_phy_ratecnt[phy] += 1; |
| 535 | ath_rc_set_valid_txmask(ath_rc_priv, j, 1); | 535 | ath_rc_set_valid_rate_idx(ath_rc_priv, j, 1); |
| 536 | hi = A_MAX(hi, j); | 536 | hi = A_MAX(hi, j); |
| 537 | } | 537 | } |
| 538 | } | 538 | } |
| @@ -568,7 +568,7 @@ static u8 ath_rc_setvalid_htrates(struct ath_rate_priv *ath_rc_priv, | |||
| 568 | ath_rc_priv->valid_phy_rateidx[phy] | 568 | ath_rc_priv->valid_phy_rateidx[phy] |
| 569 | [ath_rc_priv->valid_phy_ratecnt[phy]] = j; | 569 | [ath_rc_priv->valid_phy_ratecnt[phy]] = j; |
| 570 | ath_rc_priv->valid_phy_ratecnt[phy] += 1; | 570 | ath_rc_priv->valid_phy_ratecnt[phy] += 1; |
| 571 | ath_rc_set_valid_txmask(ath_rc_priv, j, 1); | 571 | ath_rc_set_valid_rate_idx(ath_rc_priv, j, 1); |
| 572 | hi = A_MAX(hi, j); | 572 | hi = A_MAX(hi, j); |
| 573 | } | 573 | } |
| 574 | } | 574 | } |
| @@ -1210,7 +1210,7 @@ static void ath_rc_init(struct ath_softc *sc, | |||
| 1210 | } | 1210 | } |
| 1211 | 1211 | ||
| 1212 | /* Determine the valid rates */ | 1212 | /* Determine the valid rates */ |
| 1213 | ath_rc_init_valid_txmask(ath_rc_priv); | 1213 | ath_rc_init_valid_rate_idx(ath_rc_priv); |
| 1214 | 1214 | ||
| 1215 | for (i = 0; i < WLAN_RC_PHY_MAX; i++) { | 1215 | for (i = 0; i < WLAN_RC_PHY_MAX; i++) { |
| 1216 | for (j = 0; j < MAX_TX_RATE_PHY; j++) | 1216 | for (j = 0; j < MAX_TX_RATE_PHY; j++) |
| @@ -1321,7 +1321,7 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband, | |||
| 1321 | struct ath_rate_priv *ath_rc_priv = priv_sta; | 1321 | struct ath_rate_priv *ath_rc_priv = priv_sta; |
| 1322 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | 1322 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
| 1323 | struct ieee80211_hdr *hdr; | 1323 | struct ieee80211_hdr *hdr; |
| 1324 | int final_ts_idx = 0, tx_status = 0, is_underrun = 0; | 1324 | int final_ts_idx = 0, tx_status = 0; |
| 1325 | int long_retry = 0; | 1325 | int long_retry = 0; |
| 1326 | __le16 fc; | 1326 | __le16 fc; |
| 1327 | int i; | 1327 | int i; |
| @@ -1358,7 +1358,7 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband, | |||
| 1358 | tx_status = 1; | 1358 | tx_status = 1; |
| 1359 | 1359 | ||
| 1360 | ath_rc_tx_status(sc, ath_rc_priv, tx_info, final_ts_idx, tx_status, | 1360 | ath_rc_tx_status(sc, ath_rc_priv, tx_info, final_ts_idx, tx_status, |
| 1361 | (is_underrun) ? sc->hw->max_rate_tries : long_retry); | 1361 | long_retry); |
| 1362 | 1362 | ||
| 1363 | /* Check if aggregation has to be enabled for this tid */ | 1363 | /* Check if aggregation has to be enabled for this tid */ |
| 1364 | if (conf_is_ht(&sc->hw->conf) && | 1364 | if (conf_is_ht(&sc->hw->conf) && |
diff --git a/drivers/net/wireless/ath/ath9k/rc.h b/drivers/net/wireless/ath/ath9k/rc.h index 31a004cb60ac..5d984b8acdb1 100644 --- a/drivers/net/wireless/ath/ath9k/rc.h +++ b/drivers/net/wireless/ath/ath9k/rc.h | |||
| @@ -195,7 +195,6 @@ struct ath_rc_stats { | |||
| 195 | * @rate_max_phy: phy index for the max rate | 195 | * @rate_max_phy: phy index for the max rate |
| 196 | * @per: PER for every valid rate in % | 196 | * @per: PER for every valid rate in % |
| 197 | * @probe_interval: interval for ratectrl to probe for other rates | 197 | * @probe_interval: interval for ratectrl to probe for other rates |
| 198 | * @prev_data_rix: rate idx of last data frame | ||
| 199 | * @ht_cap: HT capabilities | 198 | * @ht_cap: HT capabilities |
| 200 | * @neg_rates: Negotatied rates | 199 | * @neg_rates: Negotatied rates |
| 201 | * @neg_ht_rates: Negotiated HT rates | 200 | * @neg_ht_rates: Negotiated HT rates |
| @@ -214,10 +213,8 @@ struct ath_rate_priv { | |||
| 214 | u32 probe_time; | 213 | u32 probe_time; |
| 215 | u32 per_down_time; | 214 | u32 per_down_time; |
| 216 | u32 probe_interval; | 215 | u32 probe_interval; |
| 217 | u32 prev_data_rix; | ||
| 218 | struct ath_rateset neg_rates; | 216 | struct ath_rateset neg_rates; |
| 219 | struct ath_rateset neg_ht_rates; | 217 | struct ath_rateset neg_ht_rates; |
| 220 | struct ath_rate_softc *asc; | ||
| 221 | const struct ath_rate_table *rate_table; | 218 | const struct ath_rate_table *rate_table; |
| 222 | 219 | ||
| 223 | struct dentry *debugfs_rcstats; | 220 | struct dentry *debugfs_rcstats; |
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 00ebed3f9158..b2497b8601e5 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
| @@ -528,7 +528,8 @@ bool ath_stoprecv(struct ath_softc *sc) | |||
| 528 | sc->rx.rxlink = NULL; | 528 | sc->rx.rxlink = NULL; |
| 529 | spin_unlock_bh(&sc->rx.rxbuflock); | 529 | spin_unlock_bh(&sc->rx.rxbuflock); |
| 530 | 530 | ||
| 531 | if (unlikely(!stopped)) { | 531 | if (!(ah->ah_flags & AH_UNPLUGGED) && |
| 532 | unlikely(!stopped)) { | ||
| 532 | ath_err(ath9k_hw_common(sc->sc_ah), | 533 | ath_err(ath9k_hw_common(sc->sc_ah), |
| 533 | "Could not stop RX, we could be " | 534 | "Could not stop RX, we could be " |
| 534 | "confusing the DMA engine when we start RX up\n"); | 535 | "confusing the DMA engine when we start RX up\n"); |
diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c index 8f42ea78198c..dc862f5e1162 100644 --- a/drivers/net/wireless/ath/ath9k/wmi.c +++ b/drivers/net/wireless/ath/ath9k/wmi.c | |||
| @@ -120,7 +120,7 @@ void ath9k_deinit_wmi(struct ath9k_htc_priv *priv) | |||
| 120 | kfree(priv->wmi); | 120 | kfree(priv->wmi); |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | void ath9k_wmi_tasklet(unsigned long data) | 123 | void ath9k_swba_tasklet(unsigned long data) |
| 124 | { | 124 | { |
| 125 | struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *)data; | 125 | struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *)data; |
| 126 | struct ath_common *common = ath9k_hw_common(priv->ah); | 126 | struct ath_common *common = ath9k_hw_common(priv->ah); |
| @@ -131,6 +131,16 @@ void ath9k_wmi_tasklet(unsigned long data) | |||
| 131 | 131 | ||
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | void ath9k_fatal_work(struct work_struct *work) | ||
| 135 | { | ||
| 136 | struct ath9k_htc_priv *priv = container_of(work, struct ath9k_htc_priv, | ||
| 137 | fatal_work); | ||
| 138 | struct ath_common *common = ath9k_hw_common(priv->ah); | ||
| 139 | |||
| 140 | ath_dbg(common, ATH_DBG_FATAL, "FATAL Event received, resetting device\n"); | ||
| 141 | ath9k_htc_reset(priv); | ||
| 142 | } | ||
| 143 | |||
| 134 | static void ath9k_wmi_rsp_callback(struct wmi *wmi, struct sk_buff *skb) | 144 | static void ath9k_wmi_rsp_callback(struct wmi *wmi, struct sk_buff *skb) |
| 135 | { | 145 | { |
| 136 | skb_pull(skb, sizeof(struct wmi_cmd_hdr)); | 146 | skb_pull(skb, sizeof(struct wmi_cmd_hdr)); |
| @@ -163,7 +173,11 @@ static void ath9k_wmi_ctrl_rx(void *priv, struct sk_buff *skb, | |||
| 163 | switch (cmd_id) { | 173 | switch (cmd_id) { |
| 164 | case WMI_SWBA_EVENTID: | 174 | case WMI_SWBA_EVENTID: |
| 165 | wmi->beacon_pending = *(u8 *)wmi_event; | 175 | wmi->beacon_pending = *(u8 *)wmi_event; |
| 166 | tasklet_schedule(&wmi->drv_priv->wmi_tasklet); | 176 | tasklet_schedule(&wmi->drv_priv->swba_tasklet); |
| 177 | break; | ||
| 178 | case WMI_FATAL_EVENTID: | ||
| 179 | ieee80211_queue_work(wmi->drv_priv->hw, | ||
| 180 | &wmi->drv_priv->fatal_work); | ||
| 167 | break; | 181 | break; |
| 168 | case WMI_TXRATE_EVENTID: | 182 | case WMI_TXRATE_EVENTID: |
| 169 | #ifdef CONFIG_ATH9K_HTC_DEBUGFS | 183 | #ifdef CONFIG_ATH9K_HTC_DEBUGFS |
| @@ -250,7 +264,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id, | |||
| 250 | int time_left, ret = 0; | 264 | int time_left, ret = 0; |
| 251 | unsigned long flags; | 265 | unsigned long flags; |
| 252 | 266 | ||
| 253 | if (wmi->drv_priv->op_flags & OP_UNPLUGGED) | 267 | if (ah->ah_flags & AH_UNPLUGGED) |
| 254 | return 0; | 268 | return 0; |
| 255 | 269 | ||
| 256 | skb = alloc_skb(headroom + cmd_len, GFP_ATOMIC); | 270 | skb = alloc_skb(headroom + cmd_len, GFP_ATOMIC); |
diff --git a/drivers/net/wireless/ath/ath9k/wmi.h b/drivers/net/wireless/ath/ath9k/wmi.h index ac61074af8ac..42084277522d 100644 --- a/drivers/net/wireless/ath/ath9k/wmi.h +++ b/drivers/net/wireless/ath/ath9k/wmi.h | |||
| @@ -117,7 +117,8 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id, | |||
| 117 | u8 *cmd_buf, u32 cmd_len, | 117 | u8 *cmd_buf, u32 cmd_len, |
| 118 | u8 *rsp_buf, u32 rsp_len, | 118 | u8 *rsp_buf, u32 rsp_len, |
| 119 | u32 timeout); | 119 | u32 timeout); |
| 120 | void ath9k_wmi_tasklet(unsigned long data); | 120 | void ath9k_swba_tasklet(unsigned long data); |
| 121 | void ath9k_fatal_work(struct work_struct *work); | ||
| 121 | 122 | ||
| 122 | #define WMI_CMD(_wmi_cmd) \ | 123 | #define WMI_CMD(_wmi_cmd) \ |
| 123 | do { \ | 124 | do { \ |
diff --git a/drivers/net/wireless/ath/carl9170/phy.c b/drivers/net/wireless/ath/carl9170/phy.c index 82bc81c4c930..b6b0de600506 100644 --- a/drivers/net/wireless/ath/carl9170/phy.c +++ b/drivers/net/wireless/ath/carl9170/phy.c | |||
| @@ -1029,8 +1029,6 @@ static int carl9170_init_rf_bank4_pwr(struct ar9170 *ar, bool band5ghz, | |||
| 1029 | if (err) | 1029 | if (err) |
| 1030 | return err; | 1030 | return err; |
| 1031 | 1031 | ||
| 1032 | msleep(20); | ||
| 1033 | |||
| 1034 | return 0; | 1032 | return 0; |
| 1035 | } | 1033 | } |
| 1036 | 1034 | ||
| @@ -1660,12 +1658,6 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel, | |||
| 1660 | return err; | 1658 | return err; |
| 1661 | 1659 | ||
| 1662 | cmd = CARL9170_CMD_RF_INIT; | 1660 | cmd = CARL9170_CMD_RF_INIT; |
| 1663 | |||
| 1664 | msleep(100); | ||
| 1665 | |||
| 1666 | err = carl9170_echo_test(ar, 0xaabbccdd); | ||
| 1667 | if (err) | ||
| 1668 | return err; | ||
| 1669 | } else { | 1661 | } else { |
| 1670 | cmd = CARL9170_CMD_FREQUENCY; | 1662 | cmd = CARL9170_CMD_FREQUENCY; |
| 1671 | } | 1663 | } |
| @@ -1676,6 +1668,8 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel, | |||
| 1676 | 1668 | ||
| 1677 | err = carl9170_write_reg(ar, AR9170_PHY_REG_HEAVY_CLIP_ENABLE, | 1669 | err = carl9170_write_reg(ar, AR9170_PHY_REG_HEAVY_CLIP_ENABLE, |
| 1678 | 0x200); | 1670 | 0x200); |
| 1671 | if (err) | ||
| 1672 | return err; | ||
| 1679 | 1673 | ||
| 1680 | err = carl9170_init_rf_bank4_pwr(ar, | 1674 | err = carl9170_init_rf_bank4_pwr(ar, |
| 1681 | channel->band == IEEE80211_BAND_5GHZ, | 1675 | channel->band == IEEE80211_BAND_5GHZ, |
diff --git a/drivers/net/wireless/ath/carl9170/usb.c b/drivers/net/wireless/ath/carl9170/usb.c index 2d947a30d29e..537732e5964f 100644 --- a/drivers/net/wireless/ath/carl9170/usb.c +++ b/drivers/net/wireless/ath/carl9170/usb.c | |||
| @@ -834,7 +834,7 @@ static int carl9170_usb_load_firmware(struct ar9170 *ar) | |||
| 834 | if (err) | 834 | if (err) |
| 835 | goto err_out; | 835 | goto err_out; |
| 836 | 836 | ||
| 837 | /* firmware restarts cmd counter */ | 837 | /* now, start the command response counter */ |
| 838 | ar->cmd_seq = -1; | 838 | ar->cmd_seq = -1; |
| 839 | 839 | ||
| 840 | return 0; | 840 | return 0; |
| @@ -851,7 +851,12 @@ int carl9170_usb_restart(struct ar9170 *ar) | |||
| 851 | if (ar->intf->condition != USB_INTERFACE_BOUND) | 851 | if (ar->intf->condition != USB_INTERFACE_BOUND) |
| 852 | return 0; | 852 | return 0; |
| 853 | 853 | ||
| 854 | /* Disable command response sequence counter. */ | 854 | /* |
| 855 | * Disable the command response sequence counter check. | ||
| 856 | * We already know that the device/firmware is in a bad state. | ||
| 857 | * So, no extra points are awarded to anyone who reminds the | ||
| 858 | * driver about that. | ||
| 859 | */ | ||
| 855 | ar->cmd_seq = -2; | 860 | ar->cmd_seq = -2; |
| 856 | 861 | ||
| 857 | err = carl9170_reboot(ar); | 862 | err = carl9170_reboot(ar); |
| @@ -903,6 +908,15 @@ static int carl9170_usb_init_device(struct ar9170 *ar) | |||
| 903 | { | 908 | { |
| 904 | int err; | 909 | int err; |
| 905 | 910 | ||
| 911 | /* | ||
| 912 | * The carl9170 firmware let's the driver know when it's | ||
| 913 | * ready for action. But we have to be prepared to gracefully | ||
| 914 | * handle all spurious [flushed] messages after each (re-)boot. | ||
| 915 | * Thus the command response counter remains disabled until it | ||
| 916 | * can be safely synchronized. | ||
| 917 | */ | ||
| 918 | ar->cmd_seq = -2; | ||
| 919 | |||
| 906 | err = carl9170_usb_send_rx_irq_urb(ar); | 920 | err = carl9170_usb_send_rx_irq_urb(ar); |
| 907 | if (err) | 921 | if (err) |
| 908 | goto err_out; | 922 | goto err_out; |
| @@ -911,14 +925,21 @@ static int carl9170_usb_init_device(struct ar9170 *ar) | |||
| 911 | if (err) | 925 | if (err) |
| 912 | goto err_unrx; | 926 | goto err_unrx; |
| 913 | 927 | ||
| 928 | err = carl9170_usb_open(ar); | ||
| 929 | if (err) | ||
| 930 | goto err_unrx; | ||
| 931 | |||
| 914 | mutex_lock(&ar->mutex); | 932 | mutex_lock(&ar->mutex); |
| 915 | err = carl9170_usb_load_firmware(ar); | 933 | err = carl9170_usb_load_firmware(ar); |
| 916 | mutex_unlock(&ar->mutex); | 934 | mutex_unlock(&ar->mutex); |
| 917 | if (err) | 935 | if (err) |
| 918 | goto err_unrx; | 936 | goto err_stop; |
| 919 | 937 | ||
| 920 | return 0; | 938 | return 0; |
| 921 | 939 | ||
| 940 | err_stop: | ||
| 941 | carl9170_usb_stop(ar); | ||
| 942 | |||
| 922 | err_unrx: | 943 | err_unrx: |
| 923 | carl9170_usb_cancel_urbs(ar); | 944 | carl9170_usb_cancel_urbs(ar); |
| 924 | 945 | ||
| @@ -964,10 +985,6 @@ static void carl9170_usb_firmware_finish(struct ar9170 *ar) | |||
| 964 | if (err) | 985 | if (err) |
| 965 | goto err_freefw; | 986 | goto err_freefw; |
| 966 | 987 | ||
| 967 | err = carl9170_usb_open(ar); | ||
| 968 | if (err) | ||
| 969 | goto err_unrx; | ||
| 970 | |||
| 971 | err = carl9170_register(ar); | 988 | err = carl9170_register(ar); |
| 972 | 989 | ||
| 973 | carl9170_usb_stop(ar); | 990 | carl9170_usb_stop(ar); |
| @@ -1043,7 +1060,6 @@ static int carl9170_usb_probe(struct usb_interface *intf, | |||
| 1043 | atomic_set(&ar->rx_work_urbs, 0); | 1060 | atomic_set(&ar->rx_work_urbs, 0); |
| 1044 | atomic_set(&ar->rx_anch_urbs, 0); | 1061 | atomic_set(&ar->rx_anch_urbs, 0); |
| 1045 | atomic_set(&ar->rx_pool_urbs, 0); | 1062 | atomic_set(&ar->rx_pool_urbs, 0); |
| 1046 | ar->cmd_seq = -2; | ||
| 1047 | 1063 | ||
| 1048 | usb_get_dev(ar->udev); | 1064 | usb_get_dev(ar->udev); |
| 1049 | 1065 | ||
| @@ -1090,10 +1106,6 @@ static int carl9170_usb_suspend(struct usb_interface *intf, | |||
| 1090 | 1106 | ||
| 1091 | carl9170_usb_cancel_urbs(ar); | 1107 | carl9170_usb_cancel_urbs(ar); |
| 1092 | 1108 | ||
| 1093 | /* | ||
| 1094 | * firmware automatically reboots for usb suspend. | ||
| 1095 | */ | ||
| 1096 | |||
| 1097 | return 0; | 1109 | return 0; |
| 1098 | } | 1110 | } |
| 1099 | 1111 | ||
| @@ -1106,12 +1118,20 @@ static int carl9170_usb_resume(struct usb_interface *intf) | |||
| 1106 | return -ENODEV; | 1118 | return -ENODEV; |
| 1107 | 1119 | ||
| 1108 | usb_unpoison_anchored_urbs(&ar->rx_anch); | 1120 | usb_unpoison_anchored_urbs(&ar->rx_anch); |
| 1121 | carl9170_set_state(ar, CARL9170_STOPPED); | ||
| 1109 | 1122 | ||
| 1110 | err = carl9170_usb_init_device(ar); | 1123 | /* |
| 1111 | if (err) | 1124 | * The USB documentation demands that [for suspend] all traffic |
| 1112 | goto err_unrx; | 1125 | * to and from the device has to stop. This would be fine, but |
| 1126 | * there's a catch: the device[usb phy] does not come back. | ||
| 1127 | * | ||
| 1128 | * Upon resume the firmware will "kill" itself and the | ||
| 1129 | * boot-code sorts out the magic voodoo. | ||
| 1130 | * Not very nice, but there's not much what could go wrong. | ||
| 1131 | */ | ||
| 1132 | msleep(1100); | ||
| 1113 | 1133 | ||
| 1114 | err = carl9170_usb_open(ar); | 1134 | err = carl9170_usb_init_device(ar); |
| 1115 | if (err) | 1135 | if (err) |
| 1116 | goto err_unrx; | 1136 | goto err_unrx; |
| 1117 | 1137 | ||
| @@ -1133,6 +1153,7 @@ static struct usb_driver carl9170_driver = { | |||
| 1133 | #ifdef CONFIG_PM | 1153 | #ifdef CONFIG_PM |
| 1134 | .suspend = carl9170_usb_suspend, | 1154 | .suspend = carl9170_usb_suspend, |
| 1135 | .resume = carl9170_usb_resume, | 1155 | .resume = carl9170_usb_resume, |
| 1156 | .reset_resume = carl9170_usb_resume, | ||
| 1136 | #endif /* CONFIG_PM */ | 1157 | #endif /* CONFIG_PM */ |
| 1137 | }; | 1158 | }; |
| 1138 | 1159 | ||
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 1aec160e3d2f..22bc9f17f634 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
| @@ -2121,8 +2121,10 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx) | |||
| 2121 | filename = "ucode13"; | 2121 | filename = "ucode13"; |
| 2122 | else if (rev == 14) | 2122 | else if (rev == 14) |
| 2123 | filename = "ucode14"; | 2123 | filename = "ucode14"; |
| 2124 | else if (rev >= 15) | 2124 | else if (rev == 15) |
| 2125 | filename = "ucode15"; | 2125 | filename = "ucode15"; |
| 2126 | else if ((rev >= 16) && (rev <= 20)) | ||
| 2127 | filename = "ucode16_mimo"; | ||
| 2126 | else | 2128 | else |
| 2127 | goto err_no_ucode; | 2129 | goto err_no_ucode; |
| 2128 | err = b43_do_request_fw(ctx, filename, &fw->ucode); | 2130 | err = b43_do_request_fw(ctx, filename, &fw->ucode); |
| @@ -2165,7 +2167,9 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx) | |||
| 2165 | goto err_no_initvals; | 2167 | goto err_no_initvals; |
| 2166 | break; | 2168 | break; |
| 2167 | case B43_PHYTYPE_N: | 2169 | case B43_PHYTYPE_N: |
| 2168 | if ((rev >= 11) && (rev <= 12)) | 2170 | if (rev >= 16) |
| 2171 | filename = "n0initvals16"; | ||
| 2172 | else if ((rev >= 11) && (rev <= 12)) | ||
| 2169 | filename = "n0initvals11"; | 2173 | filename = "n0initvals11"; |
| 2170 | else | 2174 | else |
| 2171 | goto err_no_initvals; | 2175 | goto err_no_initvals; |
| @@ -2209,7 +2213,9 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx) | |||
| 2209 | goto err_no_initvals; | 2213 | goto err_no_initvals; |
| 2210 | break; | 2214 | break; |
| 2211 | case B43_PHYTYPE_N: | 2215 | case B43_PHYTYPE_N: |
| 2212 | if ((rev >= 11) && (rev <= 12)) | 2216 | if (rev >= 16) |
| 2217 | filename = "n0bsinitvals16"; | ||
| 2218 | else if ((rev >= 11) && (rev <= 12)) | ||
| 2213 | filename = "n0bsinitvals11"; | 2219 | filename = "n0bsinitvals11"; |
| 2214 | else | 2220 | else |
| 2215 | goto err_no_initvals; | 2221 | goto err_no_initvals; |
| @@ -4050,7 +4056,7 @@ static int b43_phy_versioning(struct b43_wldev *dev) | |||
| 4050 | break; | 4056 | break; |
| 4051 | #ifdef CONFIG_B43_PHY_N | 4057 | #ifdef CONFIG_B43_PHY_N |
| 4052 | case B43_PHYTYPE_N: | 4058 | case B43_PHYTYPE_N: |
| 4053 | if (phy_rev > 2) | 4059 | if (phy_rev > 9) |
| 4054 | unsupported = 1; | 4060 | unsupported = 1; |
| 4055 | break; | 4061 | break; |
| 4056 | #endif | 4062 | #endif |
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index a1aa5700b631..ab81ed8b19d7 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
| @@ -139,6 +139,99 @@ static void b43_chantab_radio_upload(struct b43_wldev *dev, | |||
| 139 | b43_radio_write(dev, B2055_C2_TX_MXBGTRIM, e->radio_c2_tx_mxbgtrim); | 139 | b43_radio_write(dev, B2055_C2_TX_MXBGTRIM, e->radio_c2_tx_mxbgtrim); |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | static void b43_chantab_radio_2056_upload(struct b43_wldev *dev, | ||
| 143 | const struct b43_nphy_channeltab_entry_rev3 *e) | ||
| 144 | { | ||
| 145 | b43_radio_write(dev, B2056_SYN_PLL_VCOCAL1, e->radio_syn_pll_vcocal1); | ||
| 146 | b43_radio_write(dev, B2056_SYN_PLL_VCOCAL2, e->radio_syn_pll_vcocal2); | ||
| 147 | b43_radio_write(dev, B2056_SYN_PLL_REFDIV, e->radio_syn_pll_refdiv); | ||
| 148 | b43_radio_write(dev, B2056_SYN_PLL_MMD2, e->radio_syn_pll_mmd2); | ||
| 149 | b43_radio_write(dev, B2056_SYN_PLL_MMD1, e->radio_syn_pll_mmd1); | ||
| 150 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, | ||
| 151 | e->radio_syn_pll_loopfilter1); | ||
| 152 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, | ||
| 153 | e->radio_syn_pll_loopfilter2); | ||
| 154 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER3, | ||
| 155 | e->radio_syn_pll_loopfilter3); | ||
| 156 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER4, | ||
| 157 | e->radio_syn_pll_loopfilter4); | ||
| 158 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER5, | ||
| 159 | e->radio_syn_pll_loopfilter5); | ||
| 160 | b43_radio_write(dev, B2056_SYN_RESERVED_ADDR27, | ||
| 161 | e->radio_syn_reserved_addr27); | ||
| 162 | b43_radio_write(dev, B2056_SYN_RESERVED_ADDR28, | ||
| 163 | e->radio_syn_reserved_addr28); | ||
| 164 | b43_radio_write(dev, B2056_SYN_RESERVED_ADDR29, | ||
| 165 | e->radio_syn_reserved_addr29); | ||
| 166 | b43_radio_write(dev, B2056_SYN_LOGEN_VCOBUF1, | ||
| 167 | e->radio_syn_logen_vcobuf1); | ||
| 168 | b43_radio_write(dev, B2056_SYN_LOGEN_MIXER2, e->radio_syn_logen_mixer2); | ||
| 169 | b43_radio_write(dev, B2056_SYN_LOGEN_BUF3, e->radio_syn_logen_buf3); | ||
| 170 | b43_radio_write(dev, B2056_SYN_LOGEN_BUF4, e->radio_syn_logen_buf4); | ||
| 171 | |||
| 172 | b43_radio_write(dev, B2056_RX0 | B2056_RX_LNAA_TUNE, | ||
| 173 | e->radio_rx0_lnaa_tune); | ||
| 174 | b43_radio_write(dev, B2056_RX0 | B2056_RX_LNAG_TUNE, | ||
| 175 | e->radio_rx0_lnag_tune); | ||
| 176 | |||
| 177 | b43_radio_write(dev, B2056_TX0 | B2056_TX_INTPAA_BOOST_TUNE, | ||
| 178 | e->radio_tx0_intpaa_boost_tune); | ||
| 179 | b43_radio_write(dev, B2056_TX0 | B2056_TX_INTPAG_BOOST_TUNE, | ||
| 180 | e->radio_tx0_intpag_boost_tune); | ||
| 181 | b43_radio_write(dev, B2056_TX0 | B2056_TX_PADA_BOOST_TUNE, | ||
| 182 | e->radio_tx0_pada_boost_tune); | ||
| 183 | b43_radio_write(dev, B2056_TX0 | B2056_TX_PADG_BOOST_TUNE, | ||
| 184 | e->radio_tx0_padg_boost_tune); | ||
| 185 | b43_radio_write(dev, B2056_TX0 | B2056_TX_PGAA_BOOST_TUNE, | ||
| 186 | e->radio_tx0_pgaa_boost_tune); | ||
| 187 | b43_radio_write(dev, B2056_TX0 | B2056_TX_PGAG_BOOST_TUNE, | ||
| 188 | e->radio_tx0_pgag_boost_tune); | ||
| 189 | b43_radio_write(dev, B2056_TX0 | B2056_TX_MIXA_BOOST_TUNE, | ||
| 190 | e->radio_tx0_mixa_boost_tune); | ||
| 191 | b43_radio_write(dev, B2056_TX0 | B2056_TX_MIXG_BOOST_TUNE, | ||
| 192 | e->radio_tx0_mixg_boost_tune); | ||
| 193 | |||
| 194 | b43_radio_write(dev, B2056_RX1 | B2056_RX_LNAA_TUNE, | ||
| 195 | e->radio_rx1_lnaa_tune); | ||
| 196 | b43_radio_write(dev, B2056_RX1 | B2056_RX_LNAG_TUNE, | ||
| 197 | e->radio_rx1_lnag_tune); | ||
| 198 | |||
| 199 | b43_radio_write(dev, B2056_TX1 | B2056_TX_INTPAA_BOOST_TUNE, | ||
| 200 | e->radio_tx1_intpaa_boost_tune); | ||
| 201 | b43_radio_write(dev, B2056_TX1 | B2056_TX_INTPAG_BOOST_TUNE, | ||
| 202 | e->radio_tx1_intpag_boost_tune); | ||
| 203 | b43_radio_write(dev, B2056_TX1 | B2056_TX_PADA_BOOST_TUNE, | ||
| 204 | e->radio_tx1_pada_boost_tune); | ||
| 205 | b43_radio_write(dev, B2056_TX1 | B2056_TX_PADG_BOOST_TUNE, | ||
| 206 | e->radio_tx1_padg_boost_tune); | ||
| 207 | b43_radio_write(dev, B2056_TX1 | B2056_TX_PGAA_BOOST_TUNE, | ||
| 208 | e->radio_tx1_pgaa_boost_tune); | ||
| 209 | b43_radio_write(dev, B2056_TX1 | B2056_TX_PGAG_BOOST_TUNE, | ||
| 210 | e->radio_tx1_pgag_boost_tune); | ||
| 211 | b43_radio_write(dev, B2056_TX1 | B2056_TX_MIXA_BOOST_TUNE, | ||
| 212 | e->radio_tx1_mixa_boost_tune); | ||
| 213 | b43_radio_write(dev, B2056_TX1 | B2056_TX_MIXG_BOOST_TUNE, | ||
| 214 | e->radio_tx1_mixg_boost_tune); | ||
| 215 | } | ||
| 216 | |||
| 217 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/Radio/2056Setup */ | ||
| 218 | static void b43_radio_2056_setup(struct b43_wldev *dev, | ||
| 219 | const struct b43_nphy_channeltab_entry_rev3 *e) | ||
| 220 | { | ||
| 221 | B43_WARN_ON(dev->phy.rev < 3); | ||
| 222 | |||
| 223 | b43_chantab_radio_2056_upload(dev, e); | ||
| 224 | /* TODO */ | ||
| 225 | udelay(50); | ||
| 226 | /* VCO calibration */ | ||
| 227 | b43_radio_write(dev, B2056_SYN_PLL_VCOCAL12, 0x00); | ||
| 228 | b43_radio_write(dev, B2056_TX_INTPAA_PA_MISC, 0x38); | ||
| 229 | b43_radio_write(dev, B2056_TX_INTPAA_PA_MISC, 0x18); | ||
| 230 | b43_radio_write(dev, B2056_TX_INTPAA_PA_MISC, 0x38); | ||
| 231 | b43_radio_write(dev, B2056_TX_INTPAA_PA_MISC, 0x39); | ||
| 232 | udelay(300); | ||
| 233 | } | ||
| 234 | |||
| 142 | static void b43_chantab_phy_upload(struct b43_wldev *dev, | 235 | static void b43_chantab_phy_upload(struct b43_wldev *dev, |
| 143 | const struct b43_phy_n_sfo_cfg *e) | 236 | const struct b43_phy_n_sfo_cfg *e) |
| 144 | { | 237 | { |
| @@ -401,16 +494,45 @@ static void b43_radio_init2055(struct b43_wldev *dev) | |||
| 401 | b43_radio_init2055_post(dev); | 494 | b43_radio_init2055_post(dev); |
| 402 | } | 495 | } |
| 403 | 496 | ||
| 497 | static void b43_radio_init2056_pre(struct b43_wldev *dev) | ||
| 498 | { | ||
| 499 | b43_phy_mask(dev, B43_NPHY_RFCTL_CMD, | ||
| 500 | ~B43_NPHY_RFCTL_CMD_CHIP0PU); | ||
| 501 | /* Maybe wl meant to reset and set (order?) RFCTL_CMD_OEPORFORCE? */ | ||
| 502 | b43_phy_mask(dev, B43_NPHY_RFCTL_CMD, | ||
| 503 | B43_NPHY_RFCTL_CMD_OEPORFORCE); | ||
| 504 | b43_phy_set(dev, B43_NPHY_RFCTL_CMD, | ||
| 505 | ~B43_NPHY_RFCTL_CMD_OEPORFORCE); | ||
| 506 | b43_phy_set(dev, B43_NPHY_RFCTL_CMD, | ||
| 507 | B43_NPHY_RFCTL_CMD_CHIP0PU); | ||
| 508 | } | ||
| 509 | |||
| 510 | static void b43_radio_init2056_post(struct b43_wldev *dev) | ||
| 511 | { | ||
| 512 | b43_radio_set(dev, B2056_SYN_COM_CTRL, 0xB); | ||
| 513 | b43_radio_set(dev, B2056_SYN_COM_PU, 0x2); | ||
| 514 | b43_radio_set(dev, B2056_SYN_COM_RESET, 0x2); | ||
| 515 | msleep(1); | ||
| 516 | b43_radio_mask(dev, B2056_SYN_COM_RESET, ~0x2); | ||
| 517 | b43_radio_mask(dev, B2056_SYN_PLL_MAST2, ~0xFC); | ||
| 518 | b43_radio_mask(dev, B2056_SYN_RCCAL_CTRL0, ~0x1); | ||
| 519 | /* | ||
| 520 | if (nphy->init_por) | ||
| 521 | Call Radio 2056 Recalibrate | ||
| 522 | */ | ||
| 523 | } | ||
| 524 | |||
| 404 | /* | 525 | /* |
| 405 | * Initialize a Broadcom 2056 N-radio | 526 | * Initialize a Broadcom 2056 N-radio |
| 406 | * http://bcm-v4.sipsolutions.net/802.11/Radio/2056/Init | 527 | * http://bcm-v4.sipsolutions.net/802.11/Radio/2056/Init |
| 407 | */ | 528 | */ |
| 408 | static void b43_radio_init2056(struct b43_wldev *dev) | 529 | static void b43_radio_init2056(struct b43_wldev *dev) |
| 409 | { | 530 | { |
| 410 | /* TODO */ | 531 | b43_radio_init2056_pre(dev); |
| 532 | b2056_upload_inittabs(dev, 0, 0); | ||
| 533 | b43_radio_init2056_post(dev); | ||
| 411 | } | 534 | } |
| 412 | 535 | ||
| 413 | |||
| 414 | /* | 536 | /* |
| 415 | * Upload the N-PHY tables. | 537 | * Upload the N-PHY tables. |
| 416 | * http://bcm-v4.sipsolutions.net/802.11/PHY/N/InitTables | 538 | * http://bcm-v4.sipsolutions.net/802.11/PHY/N/InitTables |
| @@ -3578,7 +3700,6 @@ static int b43_nphy_set_channel(struct b43_wldev *dev, | |||
| 3578 | if (dev->phy.rev >= 3) { | 3700 | if (dev->phy.rev >= 3) { |
| 3579 | tabent_r3 = b43_nphy_get_chantabent_rev3(dev, | 3701 | tabent_r3 = b43_nphy_get_chantabent_rev3(dev, |
| 3580 | channel->center_freq); | 3702 | channel->center_freq); |
| 3581 | tabent_r3 = NULL; | ||
| 3582 | if (!tabent_r3) | 3703 | if (!tabent_r3) |
| 3583 | return -ESRCH; | 3704 | return -ESRCH; |
| 3584 | } else { | 3705 | } else { |
| @@ -3607,7 +3728,7 @@ static int b43_nphy_set_channel(struct b43_wldev *dev, | |||
| 3607 | if (dev->phy.rev >= 3) { | 3728 | if (dev->phy.rev >= 3) { |
| 3608 | tmp = (channel->band == IEEE80211_BAND_5GHZ) ? 4 : 0; | 3729 | tmp = (channel->band == IEEE80211_BAND_5GHZ) ? 4 : 0; |
| 3609 | b43_radio_maskset(dev, 0x08, 0xFFFB, tmp); | 3730 | b43_radio_maskset(dev, 0x08, 0xFFFB, tmp); |
| 3610 | /* TODO: PHY Radio2056 Setup (dev, tabent_r3); */ | 3731 | b43_radio_2056_setup(dev, tabent_r3); |
| 3611 | b43_nphy_channel_setup(dev, &(tabent_r3->phy_regs), channel); | 3732 | b43_nphy_channel_setup(dev, &(tabent_r3->phy_regs), channel); |
| 3612 | } else { | 3733 | } else { |
| 3613 | tmp = (channel->band == IEEE80211_BAND_5GHZ) ? 0x0020 : 0x0050; | 3734 | tmp = (channel->band == IEEE80211_BAND_5GHZ) ? 0x0020 : 0x0050; |
| @@ -3638,6 +3759,7 @@ static void b43_nphy_op_prepare_structs(struct b43_wldev *dev) | |||
| 3638 | 3759 | ||
| 3639 | memset(nphy, 0, sizeof(*nphy)); | 3760 | memset(nphy, 0, sizeof(*nphy)); |
| 3640 | 3761 | ||
| 3762 | nphy->hang_avoid = (phy->rev == 3 || phy->rev == 4); | ||
| 3641 | nphy->gain_boost = true; /* this way we follow wl, assume it is true */ | 3763 | nphy->gain_boost = true; /* this way we follow wl, assume it is true */ |
| 3642 | nphy->txrx_chain = 2; /* sth different than 0 and 1 for now */ | 3764 | nphy->txrx_chain = 2; /* sth different than 0 and 1 for now */ |
| 3643 | nphy->phyrxchain = 3; /* to avoid b43_nphy_set_rx_core_state like wl */ | 3765 | nphy->phyrxchain = 3; /* to avoid b43_nphy_set_rx_core_state like wl */ |
diff --git a/drivers/net/wireless/b43/radio_2056.c b/drivers/net/wireless/b43/radio_2056.c index 0cdf6a46ba4b..8890df067029 100644 --- a/drivers/net/wireless/b43/radio_2056.c +++ b/drivers/net/wireless/b43/radio_2056.c | |||
| @@ -24,6 +24,2970 @@ | |||
| 24 | #include "radio_2056.h" | 24 | #include "radio_2056.h" |
| 25 | #include "phy_common.h" | 25 | #include "phy_common.h" |
| 26 | 26 | ||
| 27 | struct b2056_inittab_entry { | ||
| 28 | /* Value to write if we use the 5GHz band. */ | ||
| 29 | u16 ghz5; | ||
| 30 | /* Value to write if we use the 2.4GHz band. */ | ||
| 31 | u16 ghz2; | ||
| 32 | /* Flags */ | ||
| 33 | u8 flags; | ||
| 34 | }; | ||
| 35 | #define B2056_INITTAB_ENTRY_OK 0x01 | ||
| 36 | #define B2056_INITTAB_UPLOAD 0x02 | ||
| 37 | #define UPLOAD .flags = B2056_INITTAB_ENTRY_OK | B2056_INITTAB_UPLOAD | ||
| 38 | #define NOUPLOAD .flags = B2056_INITTAB_ENTRY_OK | ||
| 39 | |||
| 40 | struct b2056_inittabs_pts { | ||
| 41 | const struct b2056_inittab_entry *syn; | ||
| 42 | unsigned int syn_length; | ||
| 43 | const struct b2056_inittab_entry *tx; | ||
| 44 | unsigned int tx_length; | ||
| 45 | const struct b2056_inittab_entry *rx; | ||
| 46 | unsigned int rx_length; | ||
| 47 | }; | ||
| 48 | |||
| 49 | static const struct b2056_inittab_entry b2056_inittab_rev3_syn[] = { | ||
| 50 | [B2056_SYN_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 51 | [B2056_SYN_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 52 | [B2056_SYN_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 53 | [B2056_SYN_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 54 | [B2056_SYN_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 55 | [B2056_SYN_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 56 | [B2056_SYN_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 57 | [B2056_SYN_COM_PU] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 58 | [B2056_SYN_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 59 | [B2056_SYN_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 60 | [B2056_SYN_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 61 | [B2056_SYN_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 62 | [B2056_SYN_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 63 | [B2056_SYN_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 64 | [B2056_SYN_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 65 | [B2056_SYN_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 66 | [B2056_SYN_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 67 | [B2056_SYN_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 68 | [B2056_SYN_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 69 | [B2056_SYN_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 70 | [B2056_SYN_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 71 | [B2056_SYN_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 72 | [B2056_SYN_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 73 | [B2056_SYN_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 74 | [B2056_SYN_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 75 | [B2056_SYN_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 76 | [B2056_SYN_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 77 | [B2056_SYN_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 78 | [B2056_SYN_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 79 | [B2056_SYN_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 80 | [B2056_SYN_GPIO_MASTER1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 81 | [B2056_SYN_GPIO_MASTER2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 82 | [B2056_SYN_TOPBIAS_MASTER] = { .ghz5 = 0x0060, .ghz2 = 0x0060, NOUPLOAD, }, | ||
| 83 | [B2056_SYN_TOPBIAS_RCAL] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 84 | [B2056_SYN_AFEREG] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 85 | [B2056_SYN_TEMPPROCSENSE] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 86 | [B2056_SYN_TEMPPROCSENSEIDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 87 | [B2056_SYN_TEMPPROCSENSERCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 88 | [B2056_SYN_LPO] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 89 | [B2056_SYN_VDDCAL_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 90 | [B2056_SYN_VDDCAL_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 91 | [B2056_SYN_VDDCAL_STATUS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 92 | [B2056_SYN_RCAL_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 93 | [B2056_SYN_RCAL_CODE_OUT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 94 | [B2056_SYN_RCCAL_CTRL0] = { .ghz5 = 0x000d, .ghz2 = 0x000d, NOUPLOAD, }, | ||
| 95 | [B2056_SYN_RCCAL_CTRL1] = { .ghz5 = 0x001f, .ghz2 = 0x001f, NOUPLOAD, }, | ||
| 96 | [B2056_SYN_RCCAL_CTRL2] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 97 | [B2056_SYN_RCCAL_CTRL3] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 98 | [B2056_SYN_RCCAL_CTRL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 99 | [B2056_SYN_RCCAL_CTRL5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 100 | [B2056_SYN_RCCAL_CTRL6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 101 | [B2056_SYN_RCCAL_CTRL7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 102 | [B2056_SYN_RCCAL_CTRL8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 103 | [B2056_SYN_RCCAL_CTRL9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 104 | [B2056_SYN_RCCAL_CTRL10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 105 | [B2056_SYN_RCCAL_CTRL11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 106 | [B2056_SYN_ZCAL_SPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 107 | [B2056_SYN_ZCAL_SPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 108 | [B2056_SYN_PLL_MAST1] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 109 | [B2056_SYN_PLL_MAST2] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 110 | [B2056_SYN_PLL_MAST3] = { .ghz5 = 0x0018, .ghz2 = 0x0018, NOUPLOAD, }, | ||
| 111 | [B2056_SYN_PLL_BIAS_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 112 | [B2056_SYN_PLL_XTAL0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 113 | [B2056_SYN_PLL_XTAL1] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 114 | [B2056_SYN_PLL_XTAL3] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 115 | [B2056_SYN_PLL_XTAL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 116 | [B2056_SYN_PLL_XTAL5] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 117 | [B2056_SYN_PLL_XTAL6] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 118 | [B2056_SYN_PLL_REFDIV] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 119 | [B2056_SYN_PLL_PFD] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 120 | [B2056_SYN_PLL_CP1] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 121 | [B2056_SYN_PLL_CP2] = { .ghz5 = 0x0030, .ghz2 = 0x0030, NOUPLOAD, }, | ||
| 122 | [B2056_SYN_PLL_CP3] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 123 | [B2056_SYN_PLL_LOOPFILTER1] = { .ghz5 = 0x000d, .ghz2 = 0x000d, NOUPLOAD, }, | ||
| 124 | [B2056_SYN_PLL_LOOPFILTER2] = { .ghz5 = 0x000d, .ghz2 = 0x000d, NOUPLOAD, }, | ||
| 125 | [B2056_SYN_PLL_LOOPFILTER3] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 126 | [B2056_SYN_PLL_LOOPFILTER4] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 127 | [B2056_SYN_PLL_LOOPFILTER5] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 128 | [B2056_SYN_PLL_MMD1] = { .ghz5 = 0x001c, .ghz2 = 0x001c, NOUPLOAD, }, | ||
| 129 | [B2056_SYN_PLL_MMD2] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 130 | [B2056_SYN_PLL_VCO1] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 131 | [B2056_SYN_PLL_VCO2] = { .ghz5 = 0x00f7, .ghz2 = 0x00f7, UPLOAD, }, | ||
| 132 | [B2056_SYN_PLL_MONITOR1] = { .ghz5 = 0x00b4, .ghz2 = 0x00b4, NOUPLOAD, }, | ||
| 133 | [B2056_SYN_PLL_MONITOR2] = { .ghz5 = 0x00d2, .ghz2 = 0x00d2, NOUPLOAD, }, | ||
| 134 | [B2056_SYN_PLL_VCOCAL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 135 | [B2056_SYN_PLL_VCOCAL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 136 | [B2056_SYN_PLL_VCOCAL4] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 137 | [B2056_SYN_PLL_VCOCAL5] = { .ghz5 = 0x0096, .ghz2 = 0x0096, NOUPLOAD, }, | ||
| 138 | [B2056_SYN_PLL_VCOCAL6] = { .ghz5 = 0x003e, .ghz2 = 0x003e, NOUPLOAD, }, | ||
| 139 | [B2056_SYN_PLL_VCOCAL7] = { .ghz5 = 0x003e, .ghz2 = 0x003e, NOUPLOAD, }, | ||
| 140 | [B2056_SYN_PLL_VCOCAL8] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 141 | [B2056_SYN_PLL_VCOCAL9] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 142 | [B2056_SYN_PLL_VCOCAL10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 143 | [B2056_SYN_PLL_VCOCAL11] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 144 | [B2056_SYN_PLL_VCOCAL12] = { .ghz5 = 0x0007, .ghz2 = 0x0007, UPLOAD, }, | ||
| 145 | [B2056_SYN_PLL_VCOCAL13] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 146 | [B2056_SYN_PLL_VREG] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 147 | [B2056_SYN_PLL_STATUS1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 148 | [B2056_SYN_PLL_STATUS2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 149 | [B2056_SYN_PLL_STATUS3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 150 | [B2056_SYN_LOGEN_PU0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 151 | [B2056_SYN_LOGEN_PU1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 152 | [B2056_SYN_LOGEN_PU2] = { .ghz5 = 0x0040, .ghz2 = 0x0040, NOUPLOAD, }, | ||
| 153 | [B2056_SYN_LOGEN_PU3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 154 | [B2056_SYN_LOGEN_PU5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 155 | [B2056_SYN_LOGEN_PU6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 156 | [B2056_SYN_LOGEN_PU7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 157 | [B2056_SYN_LOGEN_PU8] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 158 | [B2056_SYN_LOGEN_BIAS_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 159 | [B2056_SYN_LOGEN_RCCR1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 160 | [B2056_SYN_LOGEN_VCOBUF1] = { .ghz5 = 0x0060, .ghz2 = 0x0060, NOUPLOAD, }, | ||
| 161 | [B2056_SYN_LOGEN_MIXER1] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 162 | [B2056_SYN_LOGEN_MIXER2] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 163 | [B2056_SYN_LOGEN_BUF1] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 164 | [B2056_SYN_LOGENBUF2] = { .ghz5 = 0x008f, .ghz2 = 0x008f, UPLOAD, }, | ||
| 165 | [B2056_SYN_LOGEN_BUF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 166 | [B2056_SYN_LOGEN_BUF4] = { .ghz5 = 0x00cc, .ghz2 = 0x00cc, NOUPLOAD, }, | ||
| 167 | [B2056_SYN_LOGEN_DIV1] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 168 | [B2056_SYN_LOGEN_DIV2] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 169 | [B2056_SYN_LOGEN_DIV3] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 170 | [B2056_SYN_LOGEN_ACL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 171 | [B2056_SYN_LOGEN_ACL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 172 | [B2056_SYN_LOGEN_ACL3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 173 | [B2056_SYN_LOGEN_ACL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 174 | [B2056_SYN_LOGEN_ACL5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 175 | [B2056_SYN_LOGEN_ACL6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 176 | [B2056_SYN_LOGEN_ACLOUT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 177 | [B2056_SYN_LOGEN_ACLCAL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 178 | [B2056_SYN_LOGEN_ACLCAL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 179 | [B2056_SYN_LOGEN_ACLCAL3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 180 | [B2056_SYN_CALEN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 181 | [B2056_SYN_LOGEN_PEAKDET1] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, NOUPLOAD, }, | ||
| 182 | [B2056_SYN_LOGEN_CORE_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 183 | [B2056_SYN_LOGEN_RX_DIFF_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 184 | [B2056_SYN_LOGEN_TX_DIFF_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 185 | [B2056_SYN_LOGEN_RX_CMOS_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 186 | [B2056_SYN_LOGEN_TX_CMOS_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 187 | [B2056_SYN_LOGEN_VCOBUF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 188 | [B2056_SYN_LOGEN_MIXER3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 189 | [B2056_SYN_LOGEN_BUF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 190 | [B2056_SYN_LOGEN_BUF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 191 | [B2056_SYN_LOGEN_CBUFRX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 192 | [B2056_SYN_LOGEN_CBUFRX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 193 | [B2056_SYN_LOGEN_CBUFRX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 194 | [B2056_SYN_LOGEN_CBUFRX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 195 | [B2056_SYN_LOGEN_CBUFTX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 196 | [B2056_SYN_LOGEN_CBUFTX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 197 | [B2056_SYN_LOGEN_CBUFTX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 198 | [B2056_SYN_LOGEN_CBUFTX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 199 | [B2056_SYN_LOGEN_CMOSRX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 200 | [B2056_SYN_LOGEN_CMOSRX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 201 | [B2056_SYN_LOGEN_CMOSRX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 202 | [B2056_SYN_LOGEN_CMOSRX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 203 | [B2056_SYN_LOGEN_CMOSTX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 204 | [B2056_SYN_LOGEN_CMOSTX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 205 | [B2056_SYN_LOGEN_CMOSTX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 206 | [B2056_SYN_LOGEN_CMOSTX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 207 | [B2056_SYN_LOGEN_VCOBUF2_OVRVAL]= { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 208 | [B2056_SYN_LOGEN_MIXER3_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 209 | [B2056_SYN_LOGEN_BUF5_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 210 | [B2056_SYN_LOGEN_BUF6_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 211 | [B2056_SYN_LOGEN_CBUFRX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 212 | [B2056_SYN_LOGEN_CBUFRX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 213 | [B2056_SYN_LOGEN_CBUFRX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 214 | [B2056_SYN_LOGEN_CBUFRX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 215 | [B2056_SYN_LOGEN_CBUFTX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 216 | [B2056_SYN_LOGEN_CBUFTX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 217 | [B2056_SYN_LOGEN_CBUFTX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 218 | [B2056_SYN_LOGEN_CBUFTX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 219 | [B2056_SYN_LOGEN_CMOSRX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 220 | [B2056_SYN_LOGEN_CMOSRX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 221 | [B2056_SYN_LOGEN_CMOSRX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 222 | [B2056_SYN_LOGEN_CMOSRX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 223 | [B2056_SYN_LOGEN_CMOSTX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 224 | [B2056_SYN_LOGEN_CMOSTX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 225 | [B2056_SYN_LOGEN_CMOSTX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 226 | [B2056_SYN_LOGEN_CMOSTX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 227 | [B2056_SYN_LOGEN_ACL_WAITCNT] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 228 | [B2056_SYN_LOGEN_CORE_CALVALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 229 | [B2056_SYN_LOGEN_RX_CMOS_CALVALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 230 | [B2056_SYN_LOGEN_TX_CMOS_VALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 231 | }; | ||
| 232 | |||
| 233 | static const struct b2056_inittab_entry b2056_inittab_rev3_tx[] = { | ||
| 234 | [B2056_TX_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 235 | [B2056_TX_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 236 | [B2056_TX_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 237 | [B2056_TX_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 238 | [B2056_TX_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 239 | [B2056_TX_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 240 | [B2056_TX_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 241 | [B2056_TX_COM_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 242 | [B2056_TX_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 243 | [B2056_TX_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 244 | [B2056_TX_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 245 | [B2056_TX_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 246 | [B2056_TX_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 247 | [B2056_TX_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 248 | [B2056_TX_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 249 | [B2056_TX_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 250 | [B2056_TX_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 251 | [B2056_TX_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 252 | [B2056_TX_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 253 | [B2056_TX_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 254 | [B2056_TX_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 255 | [B2056_TX_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 256 | [B2056_TX_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 257 | [B2056_TX_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 258 | [B2056_TX_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 259 | [B2056_TX_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 260 | [B2056_TX_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 261 | [B2056_TX_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 262 | [B2056_TX_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 263 | [B2056_TX_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 264 | [B2056_TX_IQCAL_GAIN_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 265 | [B2056_TX_LOFT_FINE_I] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 266 | [B2056_TX_LOFT_FINE_Q] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 267 | [B2056_TX_LOFT_COARSE_I] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 268 | [B2056_TX_LOFT_COARSE_Q] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 269 | [B2056_TX_TX_COM_MASTER1] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 270 | [B2056_TX_TX_COM_MASTER2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 271 | [B2056_TX_RXIQCAL_TXMUX] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 272 | [B2056_TX_TX_SSI_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 273 | [B2056_TX_IQCAL_VCM_HG] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 274 | [B2056_TX_IQCAL_IDAC] = { .ghz5 = 0x0037, .ghz2 = 0x0037, NOUPLOAD, }, | ||
| 275 | [B2056_TX_TSSI_VCM] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 276 | [B2056_TX_TX_AMP_DET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 277 | [B2056_TX_TX_SSI_MUX] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 278 | [B2056_TX_TSSIA] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 279 | [B2056_TX_TSSIG] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 280 | [B2056_TX_TSSI_MISC1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 281 | [B2056_TX_TSSI_MISC2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 282 | [B2056_TX_TSSI_MISC3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 283 | [B2056_TX_PA_SPARE1] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 284 | [B2056_TX_PA_SPARE2] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 285 | [B2056_TX_INTPAA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 286 | [B2056_TX_INTPAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 287 | [B2056_TX_INTPAA_BOOST_TUNE] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 288 | [B2056_TX_INTPAA_IAUX_STAT] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 289 | [B2056_TX_INTPAA_IAUX_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 290 | [B2056_TX_INTPAA_IMAIN_STAT] = { .ghz5 = 0x002d, .ghz2 = 0x002d, NOUPLOAD, }, | ||
| 291 | [B2056_TX_INTPAA_IMAIN_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 292 | [B2056_TX_INTPAA_CASCBIAS] = { .ghz5 = 0x006e, .ghz2 = 0x006e, NOUPLOAD, }, | ||
| 293 | [B2056_TX_INTPAA_PASLOPE] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 294 | [B2056_TX_INTPAA_PA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 295 | [B2056_TX_INTPAG_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 296 | [B2056_TX_INTPAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 297 | [B2056_TX_INTPAG_BOOST_TUNE] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 298 | [B2056_TX_INTPAG_IAUX_STAT] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 299 | [B2056_TX_INTPAG_IAUX_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 300 | [B2056_TX_INTPAG_IMAIN_STAT] = { .ghz5 = 0x001e, .ghz2 = 0x001e, NOUPLOAD, }, | ||
| 301 | [B2056_TX_INTPAG_IMAIN_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 302 | [B2056_TX_INTPAG_CASCBIAS] = { .ghz5 = 0x006e, .ghz2 = 0x006e, NOUPLOAD, }, | ||
| 303 | [B2056_TX_INTPAG_PASLOPE] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 304 | [B2056_TX_INTPAG_PA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 305 | [B2056_TX_PADA_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 306 | [B2056_TX_PADA_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 307 | [B2056_TX_PADA_CASCBIAS] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 308 | [B2056_TX_PADA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 309 | [B2056_TX_PADA_BOOST_TUNE] = { .ghz5 = 0x0038, .ghz2 = 0x0038, NOUPLOAD, }, | ||
| 310 | [B2056_TX_PADA_SLOPE] = { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, }, | ||
| 311 | [B2056_TX_PADG_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 312 | [B2056_TX_PADG_IDAC] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 313 | [B2056_TX_PADG_CASCBIAS] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 314 | [B2056_TX_PADG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 315 | [B2056_TX_PADG_BOOST_TUNE] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 316 | [B2056_TX_PADG_SLOPE] = { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, }, | ||
| 317 | [B2056_TX_PGAA_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 318 | [B2056_TX_PGAA_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 319 | [B2056_TX_PGAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 320 | [B2056_TX_PGAA_BOOST_TUNE] = { .ghz5 = 0x0083, .ghz2 = 0x0083, NOUPLOAD, }, | ||
| 321 | [B2056_TX_PGAA_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, }, | ||
| 322 | [B2056_TX_PGAA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 323 | [B2056_TX_PGAG_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 324 | [B2056_TX_PGAG_IDAC] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 325 | [B2056_TX_PGAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 326 | [B2056_TX_PGAG_BOOST_TUNE] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 327 | [B2056_TX_PGAG_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, }, | ||
| 328 | [B2056_TX_PGAG_MISC] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 329 | [B2056_TX_MIXA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 330 | [B2056_TX_MIXA_BOOST_TUNE] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 331 | [B2056_TX_MIXG] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 332 | [B2056_TX_MIXG_BOOST_TUNE] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 333 | [B2056_TX_BB_GM_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 334 | [B2056_TX_GMBB_GM] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 335 | [B2056_TX_GMBB_IDAC] = { .ghz5 = 0x0074, .ghz2 = 0x0074, UPLOAD, }, | ||
| 336 | [B2056_TX_TXLPF_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 337 | [B2056_TX_TXLPF_RCCAL] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 338 | [B2056_TX_TXLPF_RCCAL_OFF0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 339 | [B2056_TX_TXLPF_RCCAL_OFF1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 340 | [B2056_TX_TXLPF_RCCAL_OFF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 341 | [B2056_TX_TXLPF_RCCAL_OFF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 342 | [B2056_TX_TXLPF_RCCAL_OFF4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 343 | [B2056_TX_TXLPF_RCCAL_OFF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 344 | [B2056_TX_TXLPF_RCCAL_OFF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 345 | [B2056_TX_TXLPF_BW] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 346 | [B2056_TX_TXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 347 | [B2056_TX_TXLPF_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 348 | [B2056_TX_TXLPF_IDAC_0] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 349 | [B2056_TX_TXLPF_IDAC_1] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 350 | [B2056_TX_TXLPF_IDAC_2] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 351 | [B2056_TX_TXLPF_IDAC_3] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 352 | [B2056_TX_TXLPF_IDAC_4] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 353 | [B2056_TX_TXLPF_IDAC_5] = { .ghz5 = 0x001b, .ghz2 = 0x001b, NOUPLOAD, }, | ||
| 354 | [B2056_TX_TXLPF_IDAC_6] = { .ghz5 = 0x001b, .ghz2 = 0x001b, NOUPLOAD, }, | ||
| 355 | [B2056_TX_TXLPF_OPAMP_IDAC] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 356 | [B2056_TX_TXLPF_MISC] = { .ghz5 = 0x005b, .ghz2 = 0x005b, NOUPLOAD, }, | ||
| 357 | [B2056_TX_TXSPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 358 | [B2056_TX_TXSPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 359 | [B2056_TX_TXSPARE3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 360 | [B2056_TX_TXSPARE4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 361 | [B2056_TX_TXSPARE5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 362 | [B2056_TX_TXSPARE6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 363 | [B2056_TX_TXSPARE7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 364 | [B2056_TX_TXSPARE8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 365 | [B2056_TX_TXSPARE9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 366 | [B2056_TX_TXSPARE10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 367 | [B2056_TX_TXSPARE11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 368 | [B2056_TX_TXSPARE12] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 369 | [B2056_TX_TXSPARE13] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 370 | [B2056_TX_TXSPARE14] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 371 | [B2056_TX_TXSPARE15] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 372 | [B2056_TX_TXSPARE16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 373 | [B2056_TX_STATUS_INTPA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 374 | [B2056_TX_STATUS_PAD_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 375 | [B2056_TX_STATUS_PGA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 376 | [B2056_TX_STATUS_GM_TXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 377 | [B2056_TX_STATUS_TXLPF_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 378 | [B2056_TX_STATUS_TXLPF_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 379 | }; | ||
| 380 | |||
| 381 | static const struct b2056_inittab_entry b2056_inittab_rev3_rx[] = { | ||
| 382 | [B2056_RX_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 383 | [B2056_RX_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 384 | [B2056_RX_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 385 | [B2056_RX_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 386 | [B2056_RX_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 387 | [B2056_RX_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 388 | [B2056_RX_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 389 | [B2056_RX_COM_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 390 | [B2056_RX_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 391 | [B2056_RX_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 392 | [B2056_RX_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 393 | [B2056_RX_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 394 | [B2056_RX_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 395 | [B2056_RX_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 396 | [B2056_RX_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 397 | [B2056_RX_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 398 | [B2056_RX_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 399 | [B2056_RX_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 400 | [B2056_RX_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 401 | [B2056_RX_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 402 | [B2056_RX_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 403 | [B2056_RX_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 404 | [B2056_RX_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 405 | [B2056_RX_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 406 | [B2056_RX_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 407 | [B2056_RX_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 408 | [B2056_RX_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 409 | [B2056_RX_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 410 | [B2056_RX_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 411 | [B2056_RX_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 412 | [B2056_RX_RXIQCAL_RXMUX] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 413 | [B2056_RX_RSSI_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 414 | [B2056_RX_RSSI_SEL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 415 | [B2056_RX_RSSI_GAIN] = { .ghz5 = 0x0090, .ghz2 = 0x0090, NOUPLOAD, }, | ||
| 416 | [B2056_RX_RSSI_NB_IDAC] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 417 | [B2056_RX_RSSI_WB2I_IDAC_1] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 418 | [B2056_RX_RSSI_WB2I_IDAC_2] = { .ghz5 = 0x0005, .ghz2 = 0x0005, NOUPLOAD, }, | ||
| 419 | [B2056_RX_RSSI_WB2Q_IDAC_1] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 420 | [B2056_RX_RSSI_WB2Q_IDAC_2] = { .ghz5 = 0x0005, .ghz2 = 0x0005, NOUPLOAD, }, | ||
| 421 | [B2056_RX_RSSI_POLE] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 422 | [B2056_RX_RSSI_WB1_IDAC] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 423 | [B2056_RX_RSSI_MISC] = { .ghz5 = 0x0090, .ghz2 = 0x0090, NOUPLOAD, }, | ||
| 424 | [B2056_RX_LNAA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 425 | [B2056_RX_LNAA_TUNE] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 426 | [B2056_RX_LNAA_GAIN] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 427 | [B2056_RX_LNA_A_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 428 | [B2056_RX_BIASPOLE_LNAA1_IDAC] = { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, }, | ||
| 429 | [B2056_RX_LNAA2_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 430 | [B2056_RX_LNA1A_MISC] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 431 | [B2056_RX_LNAG_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 432 | [B2056_RX_LNAG_TUNE] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 433 | [B2056_RX_LNAG_GAIN] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 434 | [B2056_RX_LNA_G_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 435 | [B2056_RX_BIASPOLE_LNAG1_IDAC] = { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, }, | ||
| 436 | [B2056_RX_LNAG2_IDAC] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 437 | [B2056_RX_LNA1G_MISC] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 438 | [B2056_RX_MIXA_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 439 | [B2056_RX_MIXA_VCM] = { .ghz5 = 0x0099, .ghz2 = 0x0099, NOUPLOAD, }, | ||
| 440 | [B2056_RX_MIXA_CTRLPTAT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 441 | [B2056_RX_MIXA_LOB_BIAS] = { .ghz5 = 0x0044, .ghz2 = 0x0044, UPLOAD, }, | ||
| 442 | [B2056_RX_MIXA_CORE_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 443 | [B2056_RX_MIXA_CMFB_IDAC] = { .ghz5 = 0x0044, .ghz2 = 0x0044, NOUPLOAD, }, | ||
| 444 | [B2056_RX_MIXA_BIAS_AUX] = { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, }, | ||
| 445 | [B2056_RX_MIXA_BIAS_MAIN] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 446 | [B2056_RX_MIXA_BIAS_MISC] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 447 | [B2056_RX_MIXA_MAST_BIAS] = { .ghz5 = 0x0050, .ghz2 = 0x0050, UPLOAD, }, | ||
| 448 | [B2056_RX_MIXG_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 449 | [B2056_RX_MIXG_VCM] = { .ghz5 = 0x0099, .ghz2 = 0x0099, NOUPLOAD, }, | ||
| 450 | [B2056_RX_MIXG_CTRLPTAT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 451 | [B2056_RX_MIXG_LOB_BIAS] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 452 | [B2056_RX_MIXG_CORE_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 453 | [B2056_RX_MIXG_CMFB_IDAC] = { .ghz5 = 0x0044, .ghz2 = 0x0044, NOUPLOAD, }, | ||
| 454 | [B2056_RX_MIXG_BIAS_AUX] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 455 | [B2056_RX_MIXG_BIAS_MAIN] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 456 | [B2056_RX_MIXG_BIAS_MISC] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 457 | [B2056_RX_MIXG_MAST_BIAS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 458 | [B2056_RX_TIA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 459 | [B2056_RX_TIA_IOPAMP] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 460 | [B2056_RX_TIA_QOPAMP] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 461 | [B2056_RX_TIA_IMISC] = { .ghz5 = 0x0057, .ghz2 = 0x0057, NOUPLOAD, }, | ||
| 462 | [B2056_RX_TIA_QMISC] = { .ghz5 = 0x0057, .ghz2 = 0x0057, NOUPLOAD, }, | ||
| 463 | [B2056_RX_TIA_GAIN] = { .ghz5 = 0x0044, .ghz2 = 0x0044, NOUPLOAD, }, | ||
| 464 | [B2056_RX_TIA_SPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 465 | [B2056_RX_TIA_SPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 466 | [B2056_RX_BB_LPF_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 467 | [B2056_RX_AACI_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 468 | [B2056_RX_RXLPF_IDAC] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 469 | [B2056_RX_RXLPF_OPAMPBIAS_LOWQ] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 470 | [B2056_RX_RXLPF_OPAMPBIAS_HIGHQ]= { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 471 | [B2056_RX_RXLPF_BIAS_DCCANCEL] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 472 | [B2056_RX_RXLPF_OUTVCM] = { .ghz5 = 0x0023, .ghz2 = 0x0023, NOUPLOAD, }, | ||
| 473 | [B2056_RX_RXLPF_INVCM_BODY] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 474 | [B2056_RX_RXLPF_CC_OP] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 475 | [B2056_RX_RXLPF_GAIN] = { .ghz5 = 0x0023, .ghz2 = 0x0023, NOUPLOAD, }, | ||
| 476 | [B2056_RX_RXLPF_Q_BW] = { .ghz5 = 0x0041, .ghz2 = 0x0041, NOUPLOAD, }, | ||
| 477 | [B2056_RX_RXLPF_HP_CORNER_BW] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 478 | [B2056_RX_RXLPF_RCCAL_HPC] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 479 | [B2056_RX_RXHPF_OFF0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 480 | [B2056_RX_RXHPF_OFF1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 481 | [B2056_RX_RXHPF_OFF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 482 | [B2056_RX_RXHPF_OFF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 483 | [B2056_RX_RXHPF_OFF4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 484 | [B2056_RX_RXHPF_OFF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 485 | [B2056_RX_RXHPF_OFF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 486 | [B2056_RX_RXHPF_OFF7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 487 | [B2056_RX_RXLPF_RCCAL_LPC] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 488 | [B2056_RX_RXLPF_OFF_0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 489 | [B2056_RX_RXLPF_OFF_1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 490 | [B2056_RX_RXLPF_OFF_2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 491 | [B2056_RX_RXLPF_OFF_3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 492 | [B2056_RX_RXLPF_OFF_4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 493 | [B2056_RX_UNUSED] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 494 | [B2056_RX_VGA_MASTER] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 495 | [B2056_RX_VGA_BIAS] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 496 | [B2056_RX_VGA_BIAS_DCCANCEL] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 497 | [B2056_RX_VGA_GAIN] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 498 | [B2056_RX_VGA_HP_CORNER_BW] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 499 | [B2056_RX_VGABUF_BIAS] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 500 | [B2056_RX_VGABUF_GAIN_BW] = { .ghz5 = 0x0030, .ghz2 = 0x0030, NOUPLOAD, }, | ||
| 501 | [B2056_RX_TXFBMIX_A] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 502 | [B2056_RX_TXFBMIX_G] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 503 | [B2056_RX_RXSPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 504 | [B2056_RX_RXSPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 505 | [B2056_RX_RXSPARE3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 506 | [B2056_RX_RXSPARE4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 507 | [B2056_RX_RXSPARE5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 508 | [B2056_RX_RXSPARE6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 509 | [B2056_RX_RXSPARE7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 510 | [B2056_RX_RXSPARE8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 511 | [B2056_RX_RXSPARE9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 512 | [B2056_RX_RXSPARE10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 513 | [B2056_RX_RXSPARE11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 514 | [B2056_RX_RXSPARE12] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 515 | [B2056_RX_RXSPARE13] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 516 | [B2056_RX_RXSPARE14] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 517 | [B2056_RX_RXSPARE15] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 518 | [B2056_RX_RXSPARE16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 519 | [B2056_RX_STATUS_LNAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 520 | [B2056_RX_STATUS_LNAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 521 | [B2056_RX_STATUS_MIXTIA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 522 | [B2056_RX_STATUS_RXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 523 | [B2056_RX_STATUS_VGA_BUF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 524 | [B2056_RX_STATUS_RXLPF_Q] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 525 | [B2056_RX_STATUS_RXLPF_BUF_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 526 | [B2056_RX_STATUS_RXLPF_VGA_HPC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 527 | [B2056_RX_STATUS_RXLPF_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 528 | [B2056_RX_STATUS_HPC_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 529 | }; | ||
| 530 | |||
| 531 | static const struct b2056_inittab_entry b2056_inittab_rev4_syn[] = { | ||
| 532 | [B2056_SYN_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 533 | [B2056_SYN_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 534 | [B2056_SYN_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 535 | [B2056_SYN_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 536 | [B2056_SYN_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 537 | [B2056_SYN_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 538 | [B2056_SYN_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 539 | [B2056_SYN_COM_PU] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 540 | [B2056_SYN_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 541 | [B2056_SYN_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 542 | [B2056_SYN_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 543 | [B2056_SYN_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 544 | [B2056_SYN_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 545 | [B2056_SYN_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 546 | [B2056_SYN_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 547 | [B2056_SYN_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 548 | [B2056_SYN_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 549 | [B2056_SYN_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 550 | [B2056_SYN_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 551 | [B2056_SYN_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 552 | [B2056_SYN_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 553 | [B2056_SYN_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 554 | [B2056_SYN_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 555 | [B2056_SYN_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 556 | [B2056_SYN_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 557 | [B2056_SYN_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 558 | [B2056_SYN_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 559 | [B2056_SYN_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 560 | [B2056_SYN_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 561 | [B2056_SYN_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 562 | [B2056_SYN_GPIO_MASTER1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 563 | [B2056_SYN_GPIO_MASTER2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 564 | [B2056_SYN_TOPBIAS_MASTER] = { .ghz5 = 0x0060, .ghz2 = 0x0060, NOUPLOAD, }, | ||
| 565 | [B2056_SYN_TOPBIAS_RCAL] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 566 | [B2056_SYN_AFEREG] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 567 | [B2056_SYN_TEMPPROCSENSE] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 568 | [B2056_SYN_TEMPPROCSENSEIDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 569 | [B2056_SYN_TEMPPROCSENSERCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 570 | [B2056_SYN_LPO] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 571 | [B2056_SYN_VDDCAL_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 572 | [B2056_SYN_VDDCAL_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 573 | [B2056_SYN_VDDCAL_STATUS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 574 | [B2056_SYN_RCAL_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 575 | [B2056_SYN_RCAL_CODE_OUT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 576 | [B2056_SYN_RCCAL_CTRL0] = { .ghz5 = 0x000d, .ghz2 = 0x000d, NOUPLOAD, }, | ||
| 577 | [B2056_SYN_RCCAL_CTRL1] = { .ghz5 = 0x001f, .ghz2 = 0x001f, NOUPLOAD, }, | ||
| 578 | [B2056_SYN_RCCAL_CTRL2] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 579 | [B2056_SYN_RCCAL_CTRL3] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 580 | [B2056_SYN_RCCAL_CTRL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 581 | [B2056_SYN_RCCAL_CTRL5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 582 | [B2056_SYN_RCCAL_CTRL6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 583 | [B2056_SYN_RCCAL_CTRL7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 584 | [B2056_SYN_RCCAL_CTRL8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 585 | [B2056_SYN_RCCAL_CTRL9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 586 | [B2056_SYN_RCCAL_CTRL10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 587 | [B2056_SYN_RCCAL_CTRL11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 588 | [B2056_SYN_ZCAL_SPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 589 | [B2056_SYN_ZCAL_SPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 590 | [B2056_SYN_PLL_MAST1] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 591 | [B2056_SYN_PLL_MAST2] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 592 | [B2056_SYN_PLL_MAST3] = { .ghz5 = 0x0018, .ghz2 = 0x0018, NOUPLOAD, }, | ||
| 593 | [B2056_SYN_PLL_BIAS_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 594 | [B2056_SYN_PLL_XTAL0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 595 | [B2056_SYN_PLL_XTAL1] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 596 | [B2056_SYN_PLL_XTAL3] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 597 | [B2056_SYN_PLL_XTAL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 598 | [B2056_SYN_PLL_XTAL5] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 599 | [B2056_SYN_PLL_XTAL6] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 600 | [B2056_SYN_PLL_REFDIV] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 601 | [B2056_SYN_PLL_PFD] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 602 | [B2056_SYN_PLL_CP1] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 603 | [B2056_SYN_PLL_CP2] = { .ghz5 = 0x0030, .ghz2 = 0x0030, NOUPLOAD, }, | ||
| 604 | [B2056_SYN_PLL_CP3] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 605 | [B2056_SYN_PLL_LOOPFILTER1] = { .ghz5 = 0x000d, .ghz2 = 0x000d, NOUPLOAD, }, | ||
| 606 | [B2056_SYN_PLL_LOOPFILTER2] = { .ghz5 = 0x000d, .ghz2 = 0x000d, NOUPLOAD, }, | ||
| 607 | [B2056_SYN_PLL_LOOPFILTER3] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 608 | [B2056_SYN_PLL_LOOPFILTER4] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 609 | [B2056_SYN_PLL_LOOPFILTER5] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 610 | [B2056_SYN_PLL_MMD1] = { .ghz5 = 0x001c, .ghz2 = 0x001c, NOUPLOAD, }, | ||
| 611 | [B2056_SYN_PLL_MMD2] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 612 | [B2056_SYN_PLL_VCO1] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 613 | [B2056_SYN_PLL_VCO2] = { .ghz5 = 0x00f7, .ghz2 = 0x00f7, UPLOAD, }, | ||
| 614 | [B2056_SYN_PLL_MONITOR1] = { .ghz5 = 0x00b4, .ghz2 = 0x00b4, NOUPLOAD, }, | ||
| 615 | [B2056_SYN_PLL_MONITOR2] = { .ghz5 = 0x00d2, .ghz2 = 0x00d2, NOUPLOAD, }, | ||
| 616 | [B2056_SYN_PLL_VCOCAL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 617 | [B2056_SYN_PLL_VCOCAL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 618 | [B2056_SYN_PLL_VCOCAL4] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 619 | [B2056_SYN_PLL_VCOCAL5] = { .ghz5 = 0x0096, .ghz2 = 0x0096, NOUPLOAD, }, | ||
| 620 | [B2056_SYN_PLL_VCOCAL6] = { .ghz5 = 0x003e, .ghz2 = 0x003e, NOUPLOAD, }, | ||
| 621 | [B2056_SYN_PLL_VCOCAL7] = { .ghz5 = 0x003e, .ghz2 = 0x003e, NOUPLOAD, }, | ||
| 622 | [B2056_SYN_PLL_VCOCAL8] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 623 | [B2056_SYN_PLL_VCOCAL9] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 624 | [B2056_SYN_PLL_VCOCAL10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 625 | [B2056_SYN_PLL_VCOCAL11] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 626 | [B2056_SYN_PLL_VCOCAL12] = { .ghz5 = 0x0007, .ghz2 = 0x0007, UPLOAD, }, | ||
| 627 | [B2056_SYN_PLL_VCOCAL13] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 628 | [B2056_SYN_PLL_VREG] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 629 | [B2056_SYN_PLL_STATUS1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 630 | [B2056_SYN_PLL_STATUS2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 631 | [B2056_SYN_PLL_STATUS3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 632 | [B2056_SYN_LOGEN_PU0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 633 | [B2056_SYN_LOGEN_PU1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 634 | [B2056_SYN_LOGEN_PU2] = { .ghz5 = 0x0040, .ghz2 = 0x0040, NOUPLOAD, }, | ||
| 635 | [B2056_SYN_LOGEN_PU3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 636 | [B2056_SYN_LOGEN_PU5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 637 | [B2056_SYN_LOGEN_PU6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 638 | [B2056_SYN_LOGEN_PU7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 639 | [B2056_SYN_LOGEN_PU8] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 640 | [B2056_SYN_LOGEN_BIAS_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 641 | [B2056_SYN_LOGEN_RCCR1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 642 | [B2056_SYN_LOGEN_VCOBUF1] = { .ghz5 = 0x0060, .ghz2 = 0x0060, NOUPLOAD, }, | ||
| 643 | [B2056_SYN_LOGEN_MIXER1] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 644 | [B2056_SYN_LOGEN_MIXER2] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 645 | [B2056_SYN_LOGEN_BUF1] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 646 | [B2056_SYN_LOGENBUF2] = { .ghz5 = 0x008f, .ghz2 = 0x008f, UPLOAD, }, | ||
| 647 | [B2056_SYN_LOGEN_BUF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 648 | [B2056_SYN_LOGEN_BUF4] = { .ghz5 = 0x00cc, .ghz2 = 0x00cc, NOUPLOAD, }, | ||
| 649 | [B2056_SYN_LOGEN_DIV1] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 650 | [B2056_SYN_LOGEN_DIV2] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 651 | [B2056_SYN_LOGEN_DIV3] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 652 | [B2056_SYN_LOGEN_ACL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 653 | [B2056_SYN_LOGEN_ACL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 654 | [B2056_SYN_LOGEN_ACL3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 655 | [B2056_SYN_LOGEN_ACL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 656 | [B2056_SYN_LOGEN_ACL5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 657 | [B2056_SYN_LOGEN_ACL6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 658 | [B2056_SYN_LOGEN_ACLOUT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 659 | [B2056_SYN_LOGEN_ACLCAL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 660 | [B2056_SYN_LOGEN_ACLCAL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 661 | [B2056_SYN_LOGEN_ACLCAL3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 662 | [B2056_SYN_CALEN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 663 | [B2056_SYN_LOGEN_PEAKDET1] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, NOUPLOAD, }, | ||
| 664 | [B2056_SYN_LOGEN_CORE_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 665 | [B2056_SYN_LOGEN_RX_DIFF_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 666 | [B2056_SYN_LOGEN_TX_DIFF_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 667 | [B2056_SYN_LOGEN_RX_CMOS_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 668 | [B2056_SYN_LOGEN_TX_CMOS_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 669 | [B2056_SYN_LOGEN_VCOBUF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 670 | [B2056_SYN_LOGEN_MIXER3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 671 | [B2056_SYN_LOGEN_BUF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 672 | [B2056_SYN_LOGEN_BUF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 673 | [B2056_SYN_LOGEN_CBUFRX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 674 | [B2056_SYN_LOGEN_CBUFRX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 675 | [B2056_SYN_LOGEN_CBUFRX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 676 | [B2056_SYN_LOGEN_CBUFRX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 677 | [B2056_SYN_LOGEN_CBUFTX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 678 | [B2056_SYN_LOGEN_CBUFTX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 679 | [B2056_SYN_LOGEN_CBUFTX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 680 | [B2056_SYN_LOGEN_CBUFTX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 681 | [B2056_SYN_LOGEN_CMOSRX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 682 | [B2056_SYN_LOGEN_CMOSRX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 683 | [B2056_SYN_LOGEN_CMOSRX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 684 | [B2056_SYN_LOGEN_CMOSRX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 685 | [B2056_SYN_LOGEN_CMOSTX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 686 | [B2056_SYN_LOGEN_CMOSTX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 687 | [B2056_SYN_LOGEN_CMOSTX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 688 | [B2056_SYN_LOGEN_CMOSTX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 689 | [B2056_SYN_LOGEN_VCOBUF2_OVRVAL]= { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 690 | [B2056_SYN_LOGEN_MIXER3_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 691 | [B2056_SYN_LOGEN_BUF5_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 692 | [B2056_SYN_LOGEN_BUF6_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 693 | [B2056_SYN_LOGEN_CBUFRX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 694 | [B2056_SYN_LOGEN_CBUFRX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 695 | [B2056_SYN_LOGEN_CBUFRX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 696 | [B2056_SYN_LOGEN_CBUFRX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 697 | [B2056_SYN_LOGEN_CBUFTX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 698 | [B2056_SYN_LOGEN_CBUFTX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 699 | [B2056_SYN_LOGEN_CBUFTX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 700 | [B2056_SYN_LOGEN_CBUFTX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 701 | [B2056_SYN_LOGEN_CMOSRX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 702 | [B2056_SYN_LOGEN_CMOSRX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 703 | [B2056_SYN_LOGEN_CMOSRX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 704 | [B2056_SYN_LOGEN_CMOSRX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 705 | [B2056_SYN_LOGEN_CMOSTX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 706 | [B2056_SYN_LOGEN_CMOSTX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 707 | [B2056_SYN_LOGEN_CMOSTX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 708 | [B2056_SYN_LOGEN_CMOSTX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 709 | [B2056_SYN_LOGEN_ACL_WAITCNT] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 710 | [B2056_SYN_LOGEN_CORE_CALVALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 711 | [B2056_SYN_LOGEN_RX_CMOS_CALVALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 712 | [B2056_SYN_LOGEN_TX_CMOS_VALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 713 | }; | ||
| 714 | |||
| 715 | static const struct b2056_inittab_entry b2056_inittab_rev4_tx[] = { | ||
| 716 | [B2056_TX_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 717 | [B2056_TX_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 718 | [B2056_TX_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 719 | [B2056_TX_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 720 | [B2056_TX_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 721 | [B2056_TX_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 722 | [B2056_TX_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 723 | [B2056_TX_COM_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 724 | [B2056_TX_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 725 | [B2056_TX_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 726 | [B2056_TX_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 727 | [B2056_TX_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 728 | [B2056_TX_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 729 | [B2056_TX_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 730 | [B2056_TX_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 731 | [B2056_TX_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 732 | [B2056_TX_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 733 | [B2056_TX_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 734 | [B2056_TX_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 735 | [B2056_TX_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 736 | [B2056_TX_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 737 | [B2056_TX_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 738 | [B2056_TX_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 739 | [B2056_TX_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 740 | [B2056_TX_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 741 | [B2056_TX_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 742 | [B2056_TX_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 743 | [B2056_TX_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 744 | [B2056_TX_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 745 | [B2056_TX_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 746 | [B2056_TX_IQCAL_GAIN_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 747 | [B2056_TX_LOFT_FINE_I] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 748 | [B2056_TX_LOFT_FINE_Q] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 749 | [B2056_TX_LOFT_COARSE_I] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 750 | [B2056_TX_LOFT_COARSE_Q] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 751 | [B2056_TX_TX_COM_MASTER1] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 752 | [B2056_TX_TX_COM_MASTER2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 753 | [B2056_TX_RXIQCAL_TXMUX] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 754 | [B2056_TX_TX_SSI_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 755 | [B2056_TX_IQCAL_VCM_HG] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 756 | [B2056_TX_IQCAL_IDAC] = { .ghz5 = 0x0037, .ghz2 = 0x0037, NOUPLOAD, }, | ||
| 757 | [B2056_TX_TSSI_VCM] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 758 | [B2056_TX_TX_AMP_DET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 759 | [B2056_TX_TX_SSI_MUX] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 760 | [B2056_TX_TSSIA] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 761 | [B2056_TX_TSSIG] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 762 | [B2056_TX_TSSI_MISC1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 763 | [B2056_TX_TSSI_MISC2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 764 | [B2056_TX_TSSI_MISC3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 765 | [B2056_TX_PA_SPARE1] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 766 | [B2056_TX_PA_SPARE2] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 767 | [B2056_TX_INTPAA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 768 | [B2056_TX_INTPAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 769 | [B2056_TX_INTPAA_BOOST_TUNE] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 770 | [B2056_TX_INTPAA_IAUX_STAT] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 771 | [B2056_TX_INTPAA_IAUX_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 772 | [B2056_TX_INTPAA_IMAIN_STAT] = { .ghz5 = 0x002d, .ghz2 = 0x002d, NOUPLOAD, }, | ||
| 773 | [B2056_TX_INTPAA_IMAIN_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 774 | [B2056_TX_INTPAA_CASCBIAS] = { .ghz5 = 0x006e, .ghz2 = 0x006e, NOUPLOAD, }, | ||
| 775 | [B2056_TX_INTPAA_PASLOPE] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 776 | [B2056_TX_INTPAA_PA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 777 | [B2056_TX_INTPAG_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 778 | [B2056_TX_INTPAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 779 | [B2056_TX_INTPAG_BOOST_TUNE] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 780 | [B2056_TX_INTPAG_IAUX_STAT] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 781 | [B2056_TX_INTPAG_IAUX_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 782 | [B2056_TX_INTPAG_IMAIN_STAT] = { .ghz5 = 0x001e, .ghz2 = 0x001e, NOUPLOAD, }, | ||
| 783 | [B2056_TX_INTPAG_IMAIN_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 784 | [B2056_TX_INTPAG_CASCBIAS] = { .ghz5 = 0x006e, .ghz2 = 0x006e, NOUPLOAD, }, | ||
| 785 | [B2056_TX_INTPAG_PASLOPE] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 786 | [B2056_TX_INTPAG_PA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 787 | [B2056_TX_PADA_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 788 | [B2056_TX_PADA_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 789 | [B2056_TX_PADA_CASCBIAS] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 790 | [B2056_TX_PADA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 791 | [B2056_TX_PADA_BOOST_TUNE] = { .ghz5 = 0x0038, .ghz2 = 0x0038, NOUPLOAD, }, | ||
| 792 | [B2056_TX_PADA_SLOPE] = { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, }, | ||
| 793 | [B2056_TX_PADG_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 794 | [B2056_TX_PADG_IDAC] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 795 | [B2056_TX_PADG_CASCBIAS] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 796 | [B2056_TX_PADG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 797 | [B2056_TX_PADG_BOOST_TUNE] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 798 | [B2056_TX_PADG_SLOPE] = { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, }, | ||
| 799 | [B2056_TX_PGAA_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 800 | [B2056_TX_PGAA_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 801 | [B2056_TX_PGAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 802 | [B2056_TX_PGAA_BOOST_TUNE] = { .ghz5 = 0x0083, .ghz2 = 0x0083, NOUPLOAD, }, | ||
| 803 | [B2056_TX_PGAA_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, }, | ||
| 804 | [B2056_TX_PGAA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 805 | [B2056_TX_PGAG_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 806 | [B2056_TX_PGAG_IDAC] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 807 | [B2056_TX_PGAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 808 | [B2056_TX_PGAG_BOOST_TUNE] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 809 | [B2056_TX_PGAG_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, }, | ||
| 810 | [B2056_TX_PGAG_MISC] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 811 | [B2056_TX_MIXA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 812 | [B2056_TX_MIXA_BOOST_TUNE] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 813 | [B2056_TX_MIXG] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 814 | [B2056_TX_MIXG_BOOST_TUNE] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 815 | [B2056_TX_BB_GM_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 816 | [B2056_TX_GMBB_GM] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 817 | [B2056_TX_GMBB_IDAC] = { .ghz5 = 0x0072, .ghz2 = 0x0072, UPLOAD, }, | ||
| 818 | [B2056_TX_TXLPF_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 819 | [B2056_TX_TXLPF_RCCAL] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 820 | [B2056_TX_TXLPF_RCCAL_OFF0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 821 | [B2056_TX_TXLPF_RCCAL_OFF1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 822 | [B2056_TX_TXLPF_RCCAL_OFF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 823 | [B2056_TX_TXLPF_RCCAL_OFF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 824 | [B2056_TX_TXLPF_RCCAL_OFF4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 825 | [B2056_TX_TXLPF_RCCAL_OFF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 826 | [B2056_TX_TXLPF_RCCAL_OFF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 827 | [B2056_TX_TXLPF_BW] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 828 | [B2056_TX_TXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 829 | [B2056_TX_TXLPF_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 830 | [B2056_TX_TXLPF_IDAC_0] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 831 | [B2056_TX_TXLPF_IDAC_1] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 832 | [B2056_TX_TXLPF_IDAC_2] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 833 | [B2056_TX_TXLPF_IDAC_3] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 834 | [B2056_TX_TXLPF_IDAC_4] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 835 | [B2056_TX_TXLPF_IDAC_5] = { .ghz5 = 0x001b, .ghz2 = 0x001b, NOUPLOAD, }, | ||
| 836 | [B2056_TX_TXLPF_IDAC_6] = { .ghz5 = 0x001b, .ghz2 = 0x001b, NOUPLOAD, }, | ||
| 837 | [B2056_TX_TXLPF_OPAMP_IDAC] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 838 | [B2056_TX_TXLPF_MISC] = { .ghz5 = 0x005b, .ghz2 = 0x005b, NOUPLOAD, }, | ||
| 839 | [B2056_TX_TXSPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 840 | [B2056_TX_TXSPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 841 | [B2056_TX_TXSPARE3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 842 | [B2056_TX_TXSPARE4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 843 | [B2056_TX_TXSPARE5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 844 | [B2056_TX_TXSPARE6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 845 | [B2056_TX_TXSPARE7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 846 | [B2056_TX_TXSPARE8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 847 | [B2056_TX_TXSPARE9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 848 | [B2056_TX_TXSPARE10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 849 | [B2056_TX_TXSPARE11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 850 | [B2056_TX_TXSPARE12] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 851 | [B2056_TX_TXSPARE13] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 852 | [B2056_TX_TXSPARE14] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 853 | [B2056_TX_TXSPARE15] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 854 | [B2056_TX_TXSPARE16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 855 | [B2056_TX_STATUS_INTPA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 856 | [B2056_TX_STATUS_PAD_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 857 | [B2056_TX_STATUS_PGA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 858 | [B2056_TX_STATUS_GM_TXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 859 | [B2056_TX_STATUS_TXLPF_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 860 | [B2056_TX_STATUS_TXLPF_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 861 | }; | ||
| 862 | |||
| 863 | static const struct b2056_inittab_entry b2056_inittab_rev4_rx[] = { | ||
| 864 | [B2056_RX_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 865 | [B2056_RX_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 866 | [B2056_RX_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 867 | [B2056_RX_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 868 | [B2056_RX_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 869 | [B2056_RX_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 870 | [B2056_RX_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 871 | [B2056_RX_COM_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 872 | [B2056_RX_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 873 | [B2056_RX_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 874 | [B2056_RX_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 875 | [B2056_RX_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 876 | [B2056_RX_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 877 | [B2056_RX_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 878 | [B2056_RX_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 879 | [B2056_RX_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 880 | [B2056_RX_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 881 | [B2056_RX_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 882 | [B2056_RX_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 883 | [B2056_RX_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 884 | [B2056_RX_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 885 | [B2056_RX_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 886 | [B2056_RX_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 887 | [B2056_RX_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 888 | [B2056_RX_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 889 | [B2056_RX_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 890 | [B2056_RX_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 891 | [B2056_RX_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 892 | [B2056_RX_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 893 | [B2056_RX_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 894 | [B2056_RX_RXIQCAL_RXMUX] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 895 | [B2056_RX_RSSI_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 896 | [B2056_RX_RSSI_SEL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 897 | [B2056_RX_RSSI_GAIN] = { .ghz5 = 0x0090, .ghz2 = 0x0090, NOUPLOAD, }, | ||
| 898 | [B2056_RX_RSSI_NB_IDAC] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 899 | [B2056_RX_RSSI_WB2I_IDAC_1] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 900 | [B2056_RX_RSSI_WB2I_IDAC_2] = { .ghz5 = 0x0005, .ghz2 = 0x0005, NOUPLOAD, }, | ||
| 901 | [B2056_RX_RSSI_WB2Q_IDAC_1] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 902 | [B2056_RX_RSSI_WB2Q_IDAC_2] = { .ghz5 = 0x0005, .ghz2 = 0x0005, NOUPLOAD, }, | ||
| 903 | [B2056_RX_RSSI_POLE] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 904 | [B2056_RX_RSSI_WB1_IDAC] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 905 | [B2056_RX_RSSI_MISC] = { .ghz5 = 0x0090, .ghz2 = 0x0090, NOUPLOAD, }, | ||
| 906 | [B2056_RX_LNAA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 907 | [B2056_RX_LNAA_TUNE] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 908 | [B2056_RX_LNAA_GAIN] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 909 | [B2056_RX_LNA_A_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 910 | [B2056_RX_BIASPOLE_LNAA1_IDAC] = { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, }, | ||
| 911 | [B2056_RX_LNAA2_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 912 | [B2056_RX_LNA1A_MISC] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 913 | [B2056_RX_LNAG_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 914 | [B2056_RX_LNAG_TUNE] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 915 | [B2056_RX_LNAG_GAIN] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 916 | [B2056_RX_LNA_G_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 917 | [B2056_RX_BIASPOLE_LNAG1_IDAC] = { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, }, | ||
| 918 | [B2056_RX_LNAG2_IDAC] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 919 | [B2056_RX_LNA1G_MISC] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 920 | [B2056_RX_MIXA_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 921 | [B2056_RX_MIXA_VCM] = { .ghz5 = 0x0055, .ghz2 = 0x0055, UPLOAD, }, | ||
| 922 | [B2056_RX_MIXA_CTRLPTAT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 923 | [B2056_RX_MIXA_LOB_BIAS] = { .ghz5 = 0x0044, .ghz2 = 0x0044, UPLOAD, }, | ||
| 924 | [B2056_RX_MIXA_CORE_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 925 | [B2056_RX_MIXA_CMFB_IDAC] = { .ghz5 = 0x0044, .ghz2 = 0x0044, NOUPLOAD, }, | ||
| 926 | [B2056_RX_MIXA_BIAS_AUX] = { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, }, | ||
| 927 | [B2056_RX_MIXA_BIAS_MAIN] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 928 | [B2056_RX_MIXA_BIAS_MISC] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 929 | [B2056_RX_MIXA_MAST_BIAS] = { .ghz5 = 0x0050, .ghz2 = 0x0050, UPLOAD, }, | ||
| 930 | [B2056_RX_MIXG_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 931 | [B2056_RX_MIXG_VCM] = { .ghz5 = 0x0055, .ghz2 = 0x0055, UPLOAD, }, | ||
| 932 | [B2056_RX_MIXG_CTRLPTAT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 933 | [B2056_RX_MIXG_LOB_BIAS] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 934 | [B2056_RX_MIXG_CORE_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 935 | [B2056_RX_MIXG_CMFB_IDAC] = { .ghz5 = 0x0044, .ghz2 = 0x0044, NOUPLOAD, }, | ||
| 936 | [B2056_RX_MIXG_BIAS_AUX] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 937 | [B2056_RX_MIXG_BIAS_MAIN] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 938 | [B2056_RX_MIXG_BIAS_MISC] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 939 | [B2056_RX_MIXG_MAST_BIAS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 940 | [B2056_RX_TIA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 941 | [B2056_RX_TIA_IOPAMP] = { .ghz5 = 0x0026, .ghz2 = 0x0026, UPLOAD, }, | ||
| 942 | [B2056_RX_TIA_QOPAMP] = { .ghz5 = 0x0026, .ghz2 = 0x0026, UPLOAD, }, | ||
| 943 | [B2056_RX_TIA_IMISC] = { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, }, | ||
| 944 | [B2056_RX_TIA_QMISC] = { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, }, | ||
| 945 | [B2056_RX_TIA_GAIN] = { .ghz5 = 0x0044, .ghz2 = 0x0044, NOUPLOAD, }, | ||
| 946 | [B2056_RX_TIA_SPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 947 | [B2056_RX_TIA_SPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 948 | [B2056_RX_BB_LPF_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 949 | [B2056_RX_AACI_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 950 | [B2056_RX_RXLPF_IDAC] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 951 | [B2056_RX_RXLPF_OPAMPBIAS_LOWQ] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 952 | [B2056_RX_RXLPF_OPAMPBIAS_HIGHQ]= { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 953 | [B2056_RX_RXLPF_BIAS_DCCANCEL] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 954 | [B2056_RX_RXLPF_OUTVCM] = { .ghz5 = 0x002f, .ghz2 = 0x002f, UPLOAD, }, | ||
| 955 | [B2056_RX_RXLPF_INVCM_BODY] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 956 | [B2056_RX_RXLPF_CC_OP] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 957 | [B2056_RX_RXLPF_GAIN] = { .ghz5 = 0x0023, .ghz2 = 0x0023, NOUPLOAD, }, | ||
| 958 | [B2056_RX_RXLPF_Q_BW] = { .ghz5 = 0x0041, .ghz2 = 0x0041, NOUPLOAD, }, | ||
| 959 | [B2056_RX_RXLPF_HP_CORNER_BW] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 960 | [B2056_RX_RXLPF_RCCAL_HPC] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 961 | [B2056_RX_RXHPF_OFF0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 962 | [B2056_RX_RXHPF_OFF1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 963 | [B2056_RX_RXHPF_OFF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 964 | [B2056_RX_RXHPF_OFF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 965 | [B2056_RX_RXHPF_OFF4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 966 | [B2056_RX_RXHPF_OFF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 967 | [B2056_RX_RXHPF_OFF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 968 | [B2056_RX_RXHPF_OFF7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 969 | [B2056_RX_RXLPF_RCCAL_LPC] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 970 | [B2056_RX_RXLPF_OFF_0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 971 | [B2056_RX_RXLPF_OFF_1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 972 | [B2056_RX_RXLPF_OFF_2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 973 | [B2056_RX_RXLPF_OFF_3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 974 | [B2056_RX_RXLPF_OFF_4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 975 | [B2056_RX_UNUSED] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 976 | [B2056_RX_VGA_MASTER] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 977 | [B2056_RX_VGA_BIAS] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 978 | [B2056_RX_VGA_BIAS_DCCANCEL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, | ||
| 979 | [B2056_RX_VGA_GAIN] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 980 | [B2056_RX_VGA_HP_CORNER_BW] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 981 | [B2056_RX_VGABUF_BIAS] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 982 | [B2056_RX_VGABUF_GAIN_BW] = { .ghz5 = 0x0030, .ghz2 = 0x0030, NOUPLOAD, }, | ||
| 983 | [B2056_RX_TXFBMIX_A] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 984 | [B2056_RX_TXFBMIX_G] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 985 | [B2056_RX_RXSPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 986 | [B2056_RX_RXSPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 987 | [B2056_RX_RXSPARE3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 988 | [B2056_RX_RXSPARE4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 989 | [B2056_RX_RXSPARE5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 990 | [B2056_RX_RXSPARE6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 991 | [B2056_RX_RXSPARE7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 992 | [B2056_RX_RXSPARE8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 993 | [B2056_RX_RXSPARE9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 994 | [B2056_RX_RXSPARE10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 995 | [B2056_RX_RXSPARE11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 996 | [B2056_RX_RXSPARE12] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 997 | [B2056_RX_RXSPARE13] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 998 | [B2056_RX_RXSPARE14] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 999 | [B2056_RX_RXSPARE15] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1000 | [B2056_RX_RXSPARE16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1001 | [B2056_RX_STATUS_LNAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1002 | [B2056_RX_STATUS_LNAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1003 | [B2056_RX_STATUS_MIXTIA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1004 | [B2056_RX_STATUS_RXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1005 | [B2056_RX_STATUS_VGA_BUF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1006 | [B2056_RX_STATUS_RXLPF_Q] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1007 | [B2056_RX_STATUS_RXLPF_BUF_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1008 | [B2056_RX_STATUS_RXLPF_VGA_HPC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1009 | [B2056_RX_STATUS_RXLPF_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1010 | [B2056_RX_STATUS_HPC_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1011 | }; | ||
| 1012 | |||
| 1013 | static const struct b2056_inittab_entry b2056_inittab_rev5_syn[] = { | ||
| 1014 | [B2056_SYN_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1015 | [B2056_SYN_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1016 | [B2056_SYN_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1017 | [B2056_SYN_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1018 | [B2056_SYN_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1019 | [B2056_SYN_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1020 | [B2056_SYN_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1021 | [B2056_SYN_COM_PU] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1022 | [B2056_SYN_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1023 | [B2056_SYN_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1024 | [B2056_SYN_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1025 | [B2056_SYN_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1026 | [B2056_SYN_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1027 | [B2056_SYN_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1028 | [B2056_SYN_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1029 | [B2056_SYN_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1030 | [B2056_SYN_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1031 | [B2056_SYN_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1032 | [B2056_SYN_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1033 | [B2056_SYN_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1034 | [B2056_SYN_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1035 | [B2056_SYN_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1036 | [B2056_SYN_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1037 | [B2056_SYN_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1038 | [B2056_SYN_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1039 | [B2056_SYN_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1040 | [B2056_SYN_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1041 | [B2056_SYN_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1042 | [B2056_SYN_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1043 | [B2056_SYN_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1044 | [B2056_SYN_GPIO_MASTER1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1045 | [B2056_SYN_GPIO_MASTER2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1046 | [B2056_SYN_TOPBIAS_MASTER] = { .ghz5 = 0x0060, .ghz2 = 0x0060, NOUPLOAD, }, | ||
| 1047 | [B2056_SYN_TOPBIAS_RCAL] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 1048 | [B2056_SYN_AFEREG] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 1049 | [B2056_SYN_TEMPPROCSENSE] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1050 | [B2056_SYN_TEMPPROCSENSEIDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1051 | [B2056_SYN_TEMPPROCSENSERCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1052 | [B2056_SYN_LPO] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1053 | [B2056_SYN_VDDCAL_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1054 | [B2056_SYN_VDDCAL_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1055 | [B2056_SYN_VDDCAL_STATUS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1056 | [B2056_SYN_RCAL_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1057 | [B2056_SYN_RCAL_CODE_OUT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1058 | [B2056_SYN_RCCAL_CTRL0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1059 | [B2056_SYN_RCCAL_CTRL1] = { .ghz5 = 0x001f, .ghz2 = 0x001f, NOUPLOAD, }, | ||
| 1060 | [B2056_SYN_RCCAL_CTRL2] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 1061 | [B2056_SYN_RCCAL_CTRL3] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 1062 | [B2056_SYN_RCCAL_CTRL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1063 | [B2056_SYN_RCCAL_CTRL5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1064 | [B2056_SYN_RCCAL_CTRL6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1065 | [B2056_SYN_RCCAL_CTRL7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1066 | [B2056_SYN_RCCAL_CTRL8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1067 | [B2056_SYN_RCCAL_CTRL9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1068 | [B2056_SYN_RCCAL_CTRL10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1069 | [B2056_SYN_RCCAL_CTRL11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1070 | [B2056_SYN_ZCAL_SPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1071 | [B2056_SYN_ZCAL_SPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1072 | [B2056_SYN_PLL_MAST1] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 1073 | [B2056_SYN_PLL_MAST2] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 1074 | [B2056_SYN_PLL_MAST3] = { .ghz5 = 0x0018, .ghz2 = 0x0018, NOUPLOAD, }, | ||
| 1075 | [B2056_SYN_PLL_BIAS_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1076 | [B2056_SYN_PLL_XTAL0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1077 | [B2056_SYN_PLL_XTAL1] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 1078 | [B2056_SYN_PLL_XTAL3] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 1079 | [B2056_SYN_PLL_XTAL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1080 | [B2056_SYN_PLL_XTAL5] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 1081 | [B2056_SYN_PLL_XTAL6] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 1082 | [B2056_SYN_PLL_REFDIV] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1083 | [B2056_SYN_PLL_PFD] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 1084 | [B2056_SYN_PLL_CP1] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 1085 | [B2056_SYN_PLL_CP2] = { .ghz5 = 0x0030, .ghz2 = 0x0030, NOUPLOAD, }, | ||
| 1086 | [B2056_SYN_PLL_CP3] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 1087 | [B2056_SYN_PLL_LOOPFILTER1] = { .ghz5 = 0x000d, .ghz2 = 0x000d, NOUPLOAD, }, | ||
| 1088 | [B2056_SYN_PLL_LOOPFILTER2] = { .ghz5 = 0x000d, .ghz2 = 0x000d, NOUPLOAD, }, | ||
| 1089 | [B2056_SYN_PLL_LOOPFILTER3] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 1090 | [B2056_SYN_PLL_LOOPFILTER4] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 1091 | [B2056_SYN_PLL_LOOPFILTER5] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1092 | [B2056_SYN_PLL_MMD1] = { .ghz5 = 0x001c, .ghz2 = 0x001c, NOUPLOAD, }, | ||
| 1093 | [B2056_SYN_PLL_MMD2] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1094 | [B2056_SYN_PLL_VCO1] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1095 | [B2056_SYN_PLL_VCO2] = { .ghz5 = 0x00f7, .ghz2 = 0x00f7, UPLOAD, }, | ||
| 1096 | [B2056_SYN_PLL_MONITOR1] = { .ghz5 = 0x00b4, .ghz2 = 0x00b4, NOUPLOAD, }, | ||
| 1097 | [B2056_SYN_PLL_MONITOR2] = { .ghz5 = 0x00d2, .ghz2 = 0x00d2, NOUPLOAD, }, | ||
| 1098 | [B2056_SYN_PLL_VCOCAL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1099 | [B2056_SYN_PLL_VCOCAL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1100 | [B2056_SYN_PLL_VCOCAL4] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 1101 | [B2056_SYN_PLL_VCOCAL5] = { .ghz5 = 0x0096, .ghz2 = 0x0096, NOUPLOAD, }, | ||
| 1102 | [B2056_SYN_PLL_VCOCAL6] = { .ghz5 = 0x003e, .ghz2 = 0x003e, NOUPLOAD, }, | ||
| 1103 | [B2056_SYN_PLL_VCOCAL7] = { .ghz5 = 0x003e, .ghz2 = 0x003e, NOUPLOAD, }, | ||
| 1104 | [B2056_SYN_PLL_VCOCAL8] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 1105 | [B2056_SYN_PLL_VCOCAL9] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1106 | [B2056_SYN_PLL_VCOCAL10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1107 | [B2056_SYN_PLL_VCOCAL11] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 1108 | [B2056_SYN_PLL_VCOCAL12] = { .ghz5 = 0x0007, .ghz2 = 0x0007, UPLOAD, }, | ||
| 1109 | [B2056_SYN_PLL_VCOCAL13] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 1110 | [B2056_SYN_PLL_VREG] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1111 | [B2056_SYN_PLL_STATUS1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1112 | [B2056_SYN_PLL_STATUS2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1113 | [B2056_SYN_PLL_STATUS3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1114 | [B2056_SYN_LOGEN_PU0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1115 | [B2056_SYN_LOGEN_PU1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1116 | [B2056_SYN_LOGEN_PU2] = { .ghz5 = 0x0040, .ghz2 = 0x0040, NOUPLOAD, }, | ||
| 1117 | [B2056_SYN_LOGEN_PU3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1118 | [B2056_SYN_LOGEN_PU5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1119 | [B2056_SYN_LOGEN_PU6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1120 | [B2056_SYN_LOGEN_PU7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1121 | [B2056_SYN_LOGEN_PU8] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1122 | [B2056_SYN_LOGEN_BIAS_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1123 | [B2056_SYN_LOGEN_RCCR1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1124 | [B2056_SYN_LOGEN_VCOBUF1] = { .ghz5 = 0x0060, .ghz2 = 0x0060, NOUPLOAD, }, | ||
| 1125 | [B2056_SYN_LOGEN_MIXER1] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1126 | [B2056_SYN_LOGEN_MIXER2] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 1127 | [B2056_SYN_LOGEN_BUF1] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1128 | [B2056_SYN_LOGENBUF2] = { .ghz5 = 0x008f, .ghz2 = 0x008f, UPLOAD, }, | ||
| 1129 | [B2056_SYN_LOGEN_BUF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1130 | [B2056_SYN_LOGEN_BUF4] = { .ghz5 = 0x00cc, .ghz2 = 0x00cc, NOUPLOAD, }, | ||
| 1131 | [B2056_SYN_LOGEN_DIV1] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1132 | [B2056_SYN_LOGEN_DIV2] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1133 | [B2056_SYN_LOGEN_DIV3] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1134 | [B2056_SYN_LOGEN_ACL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1135 | [B2056_SYN_LOGEN_ACL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1136 | [B2056_SYN_LOGEN_ACL3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1137 | [B2056_SYN_LOGEN_ACL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1138 | [B2056_SYN_LOGEN_ACL5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1139 | [B2056_SYN_LOGEN_ACL6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1140 | [B2056_SYN_LOGEN_ACLOUT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1141 | [B2056_SYN_LOGEN_ACLCAL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1142 | [B2056_SYN_LOGEN_ACLCAL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1143 | [B2056_SYN_LOGEN_ACLCAL3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1144 | [B2056_SYN_CALEN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1145 | [B2056_SYN_LOGEN_PEAKDET1] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, NOUPLOAD, }, | ||
| 1146 | [B2056_SYN_LOGEN_CORE_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1147 | [B2056_SYN_LOGEN_RX_DIFF_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1148 | [B2056_SYN_LOGEN_TX_DIFF_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1149 | [B2056_SYN_LOGEN_RX_CMOS_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1150 | [B2056_SYN_LOGEN_TX_CMOS_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1151 | [B2056_SYN_LOGEN_VCOBUF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1152 | [B2056_SYN_LOGEN_MIXER3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1153 | [B2056_SYN_LOGEN_BUF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1154 | [B2056_SYN_LOGEN_BUF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1155 | [B2056_SYN_LOGEN_CBUFRX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1156 | [B2056_SYN_LOGEN_CBUFRX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1157 | [B2056_SYN_LOGEN_CBUFRX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1158 | [B2056_SYN_LOGEN_CBUFRX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1159 | [B2056_SYN_LOGEN_CBUFTX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1160 | [B2056_SYN_LOGEN_CBUFTX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1161 | [B2056_SYN_LOGEN_CBUFTX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1162 | [B2056_SYN_LOGEN_CBUFTX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1163 | [B2056_SYN_LOGEN_CMOSRX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1164 | [B2056_SYN_LOGEN_CMOSRX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1165 | [B2056_SYN_LOGEN_CMOSRX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1166 | [B2056_SYN_LOGEN_CMOSRX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1167 | [B2056_SYN_LOGEN_CMOSTX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1168 | [B2056_SYN_LOGEN_CMOSTX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1169 | [B2056_SYN_LOGEN_CMOSTX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1170 | [B2056_SYN_LOGEN_CMOSTX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1171 | [B2056_SYN_LOGEN_VCOBUF2_OVRVAL]= { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 1172 | [B2056_SYN_LOGEN_MIXER3_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1173 | [B2056_SYN_LOGEN_BUF5_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1174 | [B2056_SYN_LOGEN_BUF6_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1175 | [B2056_SYN_LOGEN_CBUFRX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1176 | [B2056_SYN_LOGEN_CBUFRX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1177 | [B2056_SYN_LOGEN_CBUFRX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1178 | [B2056_SYN_LOGEN_CBUFRX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1179 | [B2056_SYN_LOGEN_CBUFTX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1180 | [B2056_SYN_LOGEN_CBUFTX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1181 | [B2056_SYN_LOGEN_CBUFTX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1182 | [B2056_SYN_LOGEN_CBUFTX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1183 | [B2056_SYN_LOGEN_CMOSRX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1184 | [B2056_SYN_LOGEN_CMOSRX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1185 | [B2056_SYN_LOGEN_CMOSRX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1186 | [B2056_SYN_LOGEN_CMOSRX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1187 | [B2056_SYN_LOGEN_CMOSTX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1188 | [B2056_SYN_LOGEN_CMOSTX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1189 | [B2056_SYN_LOGEN_CMOSTX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1190 | [B2056_SYN_LOGEN_CMOSTX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1191 | [B2056_SYN_LOGEN_ACL_WAITCNT] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 1192 | [B2056_SYN_LOGEN_CORE_CALVALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1193 | [B2056_SYN_LOGEN_RX_CMOS_CALVALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1194 | [B2056_SYN_LOGEN_TX_CMOS_VALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1195 | }; | ||
| 1196 | |||
| 1197 | static const struct b2056_inittab_entry b2056_inittab_rev5_tx[] = { | ||
| 1198 | [B2056_TX_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1199 | [B2056_TX_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1200 | [B2056_TX_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1201 | [B2056_TX_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1202 | [B2056_TX_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1203 | [B2056_TX_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1204 | [B2056_TX_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1205 | [B2056_TX_COM_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1206 | [B2056_TX_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1207 | [B2056_TX_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1208 | [B2056_TX_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1209 | [B2056_TX_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1210 | [B2056_TX_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1211 | [B2056_TX_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1212 | [B2056_TX_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1213 | [B2056_TX_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1214 | [B2056_TX_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1215 | [B2056_TX_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1216 | [B2056_TX_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1217 | [B2056_TX_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1218 | [B2056_TX_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1219 | [B2056_TX_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1220 | [B2056_TX_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1221 | [B2056_TX_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1222 | [B2056_TX_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1223 | [B2056_TX_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1224 | [B2056_TX_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1225 | [B2056_TX_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1226 | [B2056_TX_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1227 | [B2056_TX_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1228 | [B2056_TX_IQCAL_GAIN_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1229 | [B2056_TX_LOFT_FINE_I] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1230 | [B2056_TX_LOFT_FINE_Q] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1231 | [B2056_TX_LOFT_COARSE_I] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1232 | [B2056_TX_LOFT_COARSE_Q] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1233 | [B2056_TX_TX_COM_MASTER1] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 1234 | [B2056_TX_TX_COM_MASTER2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1235 | [B2056_TX_RXIQCAL_TXMUX] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1236 | [B2056_TX_TX_SSI_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1237 | [B2056_TX_IQCAL_VCM_HG] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1238 | [B2056_TX_IQCAL_IDAC] = { .ghz5 = 0x0037, .ghz2 = 0x0037, NOUPLOAD, }, | ||
| 1239 | [B2056_TX_TSSI_VCM] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1240 | [B2056_TX_TX_AMP_DET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1241 | [B2056_TX_TX_SSI_MUX] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1242 | [B2056_TX_TSSIA] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1243 | [B2056_TX_TSSIG] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1244 | [B2056_TX_TSSI_MISC1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1245 | [B2056_TX_TSSI_MISC2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1246 | [B2056_TX_TSSI_MISC3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1247 | [B2056_TX_PA_SPARE1] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 1248 | [B2056_TX_PA_SPARE2] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 1249 | [B2056_TX_INTPAA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1250 | [B2056_TX_INTPAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1251 | [B2056_TX_INTPAA_BOOST_TUNE] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1252 | [B2056_TX_INTPAA_IAUX_STAT] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 1253 | [B2056_TX_INTPAA_IAUX_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1254 | [B2056_TX_INTPAA_IMAIN_STAT] = { .ghz5 = 0x002d, .ghz2 = 0x002d, NOUPLOAD, }, | ||
| 1255 | [B2056_TX_INTPAA_IMAIN_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1256 | [B2056_TX_INTPAA_CASCBIAS] = { .ghz5 = 0x006e, .ghz2 = 0x006e, NOUPLOAD, }, | ||
| 1257 | [B2056_TX_INTPAA_PASLOPE] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 1258 | [B2056_TX_INTPAA_PA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1259 | [B2056_TX_INTPAG_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1260 | [B2056_TX_INTPAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1261 | [B2056_TX_INTPAG_BOOST_TUNE] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1262 | [B2056_TX_INTPAG_IAUX_STAT] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1263 | [B2056_TX_INTPAG_IAUX_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1264 | [B2056_TX_INTPAG_IMAIN_STAT] = { .ghz5 = 0x001e, .ghz2 = 0x001e, NOUPLOAD, }, | ||
| 1265 | [B2056_TX_INTPAG_IMAIN_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1266 | [B2056_TX_INTPAG_CASCBIAS] = { .ghz5 = 0x006e, .ghz2 = 0x006e, NOUPLOAD, }, | ||
| 1267 | [B2056_TX_INTPAG_PASLOPE] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 1268 | [B2056_TX_INTPAG_PA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1269 | [B2056_TX_PADA_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1270 | [B2056_TX_PADA_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 1271 | [B2056_TX_PADA_CASCBIAS] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 1272 | [B2056_TX_PADA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1273 | [B2056_TX_PADA_BOOST_TUNE] = { .ghz5 = 0x0038, .ghz2 = 0x0038, NOUPLOAD, }, | ||
| 1274 | [B2056_TX_PADA_SLOPE] = { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, }, | ||
| 1275 | [B2056_TX_PADG_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1276 | [B2056_TX_PADG_IDAC] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1277 | [B2056_TX_PADG_CASCBIAS] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 1278 | [B2056_TX_PADG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1279 | [B2056_TX_PADG_BOOST_TUNE] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 1280 | [B2056_TX_PADG_SLOPE] = { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, }, | ||
| 1281 | [B2056_TX_PGAA_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1282 | [B2056_TX_PGAA_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 1283 | [B2056_TX_PGAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1284 | [B2056_TX_PGAA_BOOST_TUNE] = { .ghz5 = 0x0083, .ghz2 = 0x0083, NOUPLOAD, }, | ||
| 1285 | [B2056_TX_PGAA_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, }, | ||
| 1286 | [B2056_TX_PGAA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1287 | [B2056_TX_PGAG_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1288 | [B2056_TX_PGAG_IDAC] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1289 | [B2056_TX_PGAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1290 | [B2056_TX_PGAG_BOOST_TUNE] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 1291 | [B2056_TX_PGAG_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, }, | ||
| 1292 | [B2056_TX_PGAG_MISC] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1293 | [B2056_TX_MIXA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1294 | [B2056_TX_MIXA_BOOST_TUNE] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 1295 | [B2056_TX_MIXG] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1296 | [B2056_TX_MIXG_BOOST_TUNE] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 1297 | [B2056_TX_BB_GM_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1298 | [B2056_TX_GMBB_GM] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1299 | [B2056_TX_GMBB_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, | ||
| 1300 | [B2056_TX_TXLPF_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1301 | [B2056_TX_TXLPF_RCCAL] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 1302 | [B2056_TX_TXLPF_RCCAL_OFF0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1303 | [B2056_TX_TXLPF_RCCAL_OFF1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1304 | [B2056_TX_TXLPF_RCCAL_OFF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1305 | [B2056_TX_TXLPF_RCCAL_OFF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1306 | [B2056_TX_TXLPF_RCCAL_OFF4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1307 | [B2056_TX_TXLPF_RCCAL_OFF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1308 | [B2056_TX_TXLPF_RCCAL_OFF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1309 | [B2056_TX_TXLPF_BW] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1310 | [B2056_TX_TXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1311 | [B2056_TX_TXLPF_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1312 | [B2056_TX_TXLPF_IDAC_0] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 1313 | [B2056_TX_TXLPF_IDAC_1] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 1314 | [B2056_TX_TXLPF_IDAC_2] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 1315 | [B2056_TX_TXLPF_IDAC_3] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 1316 | [B2056_TX_TXLPF_IDAC_4] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 1317 | [B2056_TX_TXLPF_IDAC_5] = { .ghz5 = 0x001b, .ghz2 = 0x001b, NOUPLOAD, }, | ||
| 1318 | [B2056_TX_TXLPF_IDAC_6] = { .ghz5 = 0x001b, .ghz2 = 0x001b, NOUPLOAD, }, | ||
| 1319 | [B2056_TX_TXLPF_OPAMP_IDAC] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 1320 | [B2056_TX_TXLPF_MISC] = { .ghz5 = 0x005b, .ghz2 = 0x005b, NOUPLOAD, }, | ||
| 1321 | [B2056_TX_TXSPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1322 | [B2056_TX_TXSPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1323 | [B2056_TX_TXSPARE3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1324 | [B2056_TX_TXSPARE4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1325 | [B2056_TX_TXSPARE5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1326 | [B2056_TX_TXSPARE6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1327 | [B2056_TX_TXSPARE7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1328 | [B2056_TX_TXSPARE8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1329 | [B2056_TX_TXSPARE9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1330 | [B2056_TX_TXSPARE10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1331 | [B2056_TX_TXSPARE11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1332 | [B2056_TX_TXSPARE12] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1333 | [B2056_TX_TXSPARE13] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1334 | [B2056_TX_TXSPARE14] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1335 | [B2056_TX_TXSPARE15] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1336 | [B2056_TX_TXSPARE16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1337 | [B2056_TX_STATUS_INTPA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1338 | [B2056_TX_STATUS_PAD_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1339 | [B2056_TX_STATUS_PGA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1340 | [B2056_TX_STATUS_GM_TXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1341 | [B2056_TX_STATUS_TXLPF_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1342 | [B2056_TX_STATUS_TXLPF_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1343 | [B2056_TX_GMBB_IDAC0] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 1344 | [B2056_TX_GMBB_IDAC1] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 1345 | [B2056_TX_GMBB_IDAC2] = { .ghz5 = 0x0071, .ghz2 = 0x0071, UPLOAD, }, | ||
| 1346 | [B2056_TX_GMBB_IDAC3] = { .ghz5 = 0x0071, .ghz2 = 0x0071, UPLOAD, }, | ||
| 1347 | [B2056_TX_GMBB_IDAC4] = { .ghz5 = 0x0072, .ghz2 = 0x0072, UPLOAD, }, | ||
| 1348 | [B2056_TX_GMBB_IDAC5] = { .ghz5 = 0x0073, .ghz2 = 0x0073, UPLOAD, }, | ||
| 1349 | [B2056_TX_GMBB_IDAC6] = { .ghz5 = 0x0074, .ghz2 = 0x0074, UPLOAD, }, | ||
| 1350 | [B2056_TX_GMBB_IDAC7] = { .ghz5 = 0x0075, .ghz2 = 0x0075, UPLOAD, }, | ||
| 1351 | }; | ||
| 1352 | |||
| 1353 | static const struct b2056_inittab_entry b2056_inittab_rev5_rx[] = { | ||
| 1354 | [B2056_RX_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1355 | [B2056_RX_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1356 | [B2056_RX_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1357 | [B2056_RX_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1358 | [B2056_RX_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1359 | [B2056_RX_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1360 | [B2056_RX_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1361 | [B2056_RX_COM_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1362 | [B2056_RX_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1363 | [B2056_RX_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1364 | [B2056_RX_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1365 | [B2056_RX_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1366 | [B2056_RX_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1367 | [B2056_RX_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1368 | [B2056_RX_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1369 | [B2056_RX_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1370 | [B2056_RX_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1371 | [B2056_RX_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1372 | [B2056_RX_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1373 | [B2056_RX_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1374 | [B2056_RX_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1375 | [B2056_RX_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1376 | [B2056_RX_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1377 | [B2056_RX_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1378 | [B2056_RX_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1379 | [B2056_RX_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1380 | [B2056_RX_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1381 | [B2056_RX_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1382 | [B2056_RX_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1383 | [B2056_RX_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1384 | [B2056_RX_RXIQCAL_RXMUX] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1385 | [B2056_RX_RSSI_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1386 | [B2056_RX_RSSI_SEL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1387 | [B2056_RX_RSSI_GAIN] = { .ghz5 = 0x0090, .ghz2 = 0x0090, NOUPLOAD, }, | ||
| 1388 | [B2056_RX_RSSI_NB_IDAC] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 1389 | [B2056_RX_RSSI_WB2I_IDAC_1] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 1390 | [B2056_RX_RSSI_WB2I_IDAC_2] = { .ghz5 = 0x0005, .ghz2 = 0x0005, NOUPLOAD, }, | ||
| 1391 | [B2056_RX_RSSI_WB2Q_IDAC_1] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 1392 | [B2056_RX_RSSI_WB2Q_IDAC_2] = { .ghz5 = 0x0005, .ghz2 = 0x0005, NOUPLOAD, }, | ||
| 1393 | [B2056_RX_RSSI_POLE] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 1394 | [B2056_RX_RSSI_WB1_IDAC] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 1395 | [B2056_RX_RSSI_MISC] = { .ghz5 = 0x0090, .ghz2 = 0x0090, NOUPLOAD, }, | ||
| 1396 | [B2056_RX_LNAA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1397 | [B2056_RX_LNAA_TUNE] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1398 | [B2056_RX_LNAA_GAIN] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 1399 | [B2056_RX_LNA_A_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 1400 | [B2056_RX_BIASPOLE_LNAA1_IDAC] = { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, }, | ||
| 1401 | [B2056_RX_LNAA2_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 1402 | [B2056_RX_LNA1A_MISC] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 1403 | [B2056_RX_LNAG_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1404 | [B2056_RX_LNAG_TUNE] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1405 | [B2056_RX_LNAG_GAIN] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 1406 | [B2056_RX_LNA_G_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 1407 | [B2056_RX_BIASPOLE_LNAG1_IDAC] = { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, }, | ||
| 1408 | [B2056_RX_LNAG2_IDAC] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 1409 | [B2056_RX_LNA1G_MISC] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 1410 | [B2056_RX_MIXA_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 1411 | [B2056_RX_MIXA_VCM] = { .ghz5 = 0x0055, .ghz2 = 0x0055, UPLOAD, }, | ||
| 1412 | [B2056_RX_MIXA_CTRLPTAT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1413 | [B2056_RX_MIXA_LOB_BIAS] = { .ghz5 = 0x0088, .ghz2 = 0x0088, UPLOAD, }, | ||
| 1414 | [B2056_RX_MIXA_CORE_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1415 | [B2056_RX_MIXA_CMFB_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, | ||
| 1416 | [B2056_RX_MIXA_BIAS_AUX] = { .ghz5 = 0x0007, .ghz2 = 0x0007, UPLOAD, }, | ||
| 1417 | [B2056_RX_MIXA_BIAS_MAIN] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 1418 | [B2056_RX_MIXA_BIAS_MISC] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 1419 | [B2056_RX_MIXA_MAST_BIAS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1420 | [B2056_RX_MIXG_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 1421 | [B2056_RX_MIXG_VCM] = { .ghz5 = 0x0055, .ghz2 = 0x0055, UPLOAD, }, | ||
| 1422 | [B2056_RX_MIXG_CTRLPTAT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1423 | [B2056_RX_MIXG_LOB_BIAS] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 1424 | [B2056_RX_MIXG_CORE_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1425 | [B2056_RX_MIXG_CMFB_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, | ||
| 1426 | [B2056_RX_MIXG_BIAS_AUX] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 1427 | [B2056_RX_MIXG_BIAS_MAIN] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 1428 | [B2056_RX_MIXG_BIAS_MISC] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 1429 | [B2056_RX_MIXG_MAST_BIAS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1430 | [B2056_RX_TIA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1431 | [B2056_RX_TIA_IOPAMP] = { .ghz5 = 0x0026, .ghz2 = 0x0026, UPLOAD, }, | ||
| 1432 | [B2056_RX_TIA_QOPAMP] = { .ghz5 = 0x0026, .ghz2 = 0x0026, UPLOAD, }, | ||
| 1433 | [B2056_RX_TIA_IMISC] = { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, }, | ||
| 1434 | [B2056_RX_TIA_QMISC] = { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, }, | ||
| 1435 | [B2056_RX_TIA_GAIN] = { .ghz5 = 0x0044, .ghz2 = 0x0044, NOUPLOAD, }, | ||
| 1436 | [B2056_RX_TIA_SPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1437 | [B2056_RX_TIA_SPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1438 | [B2056_RX_BB_LPF_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 1439 | [B2056_RX_AACI_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 1440 | [B2056_RX_RXLPF_IDAC] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 1441 | [B2056_RX_RXLPF_OPAMPBIAS_LOWQ] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 1442 | [B2056_RX_RXLPF_OPAMPBIAS_HIGHQ]= { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 1443 | [B2056_RX_RXLPF_BIAS_DCCANCEL] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1444 | [B2056_RX_RXLPF_OUTVCM] = { .ghz5 = 0x0004, .ghz2 = 0x0004, UPLOAD, }, | ||
| 1445 | [B2056_RX_RXLPF_INVCM_BODY] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 1446 | [B2056_RX_RXLPF_CC_OP] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 1447 | [B2056_RX_RXLPF_GAIN] = { .ghz5 = 0x0023, .ghz2 = 0x0023, NOUPLOAD, }, | ||
| 1448 | [B2056_RX_RXLPF_Q_BW] = { .ghz5 = 0x0041, .ghz2 = 0x0041, NOUPLOAD, }, | ||
| 1449 | [B2056_RX_RXLPF_HP_CORNER_BW] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1450 | [B2056_RX_RXLPF_RCCAL_HPC] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 1451 | [B2056_RX_RXHPF_OFF0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1452 | [B2056_RX_RXHPF_OFF1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1453 | [B2056_RX_RXHPF_OFF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1454 | [B2056_RX_RXHPF_OFF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1455 | [B2056_RX_RXHPF_OFF4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1456 | [B2056_RX_RXHPF_OFF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1457 | [B2056_RX_RXHPF_OFF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1458 | [B2056_RX_RXHPF_OFF7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1459 | [B2056_RX_RXLPF_RCCAL_LPC] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 1460 | [B2056_RX_RXLPF_OFF_0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1461 | [B2056_RX_RXLPF_OFF_1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1462 | [B2056_RX_RXLPF_OFF_2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1463 | [B2056_RX_RXLPF_OFF_3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1464 | [B2056_RX_RXLPF_OFF_4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1465 | [B2056_RX_UNUSED] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1466 | [B2056_RX_VGA_MASTER] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 1467 | [B2056_RX_VGA_BIAS] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 1468 | [B2056_RX_VGA_BIAS_DCCANCEL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, | ||
| 1469 | [B2056_RX_VGA_GAIN] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 1470 | [B2056_RX_VGA_HP_CORNER_BW] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1471 | [B2056_RX_VGABUF_BIAS] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 1472 | [B2056_RX_VGABUF_GAIN_BW] = { .ghz5 = 0x0030, .ghz2 = 0x0030, NOUPLOAD, }, | ||
| 1473 | [B2056_RX_TXFBMIX_A] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1474 | [B2056_RX_TXFBMIX_G] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1475 | [B2056_RX_RXSPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1476 | [B2056_RX_RXSPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1477 | [B2056_RX_RXSPARE3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1478 | [B2056_RX_RXSPARE4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1479 | [B2056_RX_RXSPARE5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1480 | [B2056_RX_RXSPARE6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1481 | [B2056_RX_RXSPARE7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1482 | [B2056_RX_RXSPARE8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1483 | [B2056_RX_RXSPARE9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1484 | [B2056_RX_RXSPARE10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1485 | [B2056_RX_RXSPARE11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1486 | [B2056_RX_RXSPARE12] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1487 | [B2056_RX_RXSPARE13] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1488 | [B2056_RX_RXSPARE14] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1489 | [B2056_RX_RXSPARE15] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1490 | [B2056_RX_RXSPARE16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1491 | [B2056_RX_STATUS_LNAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1492 | [B2056_RX_STATUS_LNAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1493 | [B2056_RX_STATUS_MIXTIA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1494 | [B2056_RX_STATUS_RXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1495 | [B2056_RX_STATUS_VGA_BUF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1496 | [B2056_RX_STATUS_RXLPF_Q] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1497 | [B2056_RX_STATUS_RXLPF_BUF_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1498 | [B2056_RX_STATUS_RXLPF_VGA_HPC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1499 | [B2056_RX_STATUS_RXLPF_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1500 | [B2056_RX_STATUS_HPC_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1501 | }; | ||
| 1502 | |||
| 1503 | static const struct b2056_inittab_entry b2056_inittab_rev6_syn[] = { | ||
| 1504 | [B2056_SYN_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1505 | [B2056_SYN_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1506 | [B2056_SYN_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1507 | [B2056_SYN_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1508 | [B2056_SYN_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1509 | [B2056_SYN_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1510 | [B2056_SYN_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1511 | [B2056_SYN_COM_PU] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1512 | [B2056_SYN_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1513 | [B2056_SYN_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1514 | [B2056_SYN_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1515 | [B2056_SYN_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1516 | [B2056_SYN_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1517 | [B2056_SYN_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1518 | [B2056_SYN_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1519 | [B2056_SYN_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1520 | [B2056_SYN_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1521 | [B2056_SYN_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1522 | [B2056_SYN_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1523 | [B2056_SYN_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1524 | [B2056_SYN_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1525 | [B2056_SYN_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1526 | [B2056_SYN_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1527 | [B2056_SYN_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1528 | [B2056_SYN_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1529 | [B2056_SYN_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1530 | [B2056_SYN_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1531 | [B2056_SYN_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1532 | [B2056_SYN_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1533 | [B2056_SYN_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1534 | [B2056_SYN_GPIO_MASTER1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1535 | [B2056_SYN_GPIO_MASTER2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1536 | [B2056_SYN_TOPBIAS_MASTER] = { .ghz5 = 0x0060, .ghz2 = 0x0060, NOUPLOAD, }, | ||
| 1537 | [B2056_SYN_TOPBIAS_RCAL] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 1538 | [B2056_SYN_AFEREG] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 1539 | [B2056_SYN_TEMPPROCSENSE] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1540 | [B2056_SYN_TEMPPROCSENSEIDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1541 | [B2056_SYN_TEMPPROCSENSERCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1542 | [B2056_SYN_LPO] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1543 | [B2056_SYN_VDDCAL_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1544 | [B2056_SYN_VDDCAL_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1545 | [B2056_SYN_VDDCAL_STATUS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1546 | [B2056_SYN_RCAL_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1547 | [B2056_SYN_RCAL_CODE_OUT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1548 | [B2056_SYN_RCCAL_CTRL0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1549 | [B2056_SYN_RCCAL_CTRL1] = { .ghz5 = 0x001f, .ghz2 = 0x001f, NOUPLOAD, }, | ||
| 1550 | [B2056_SYN_RCCAL_CTRL2] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 1551 | [B2056_SYN_RCCAL_CTRL3] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 1552 | [B2056_SYN_RCCAL_CTRL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1553 | [B2056_SYN_RCCAL_CTRL5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1554 | [B2056_SYN_RCCAL_CTRL6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1555 | [B2056_SYN_RCCAL_CTRL7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1556 | [B2056_SYN_RCCAL_CTRL8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1557 | [B2056_SYN_RCCAL_CTRL9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1558 | [B2056_SYN_RCCAL_CTRL10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1559 | [B2056_SYN_RCCAL_CTRL11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1560 | [B2056_SYN_ZCAL_SPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1561 | [B2056_SYN_ZCAL_SPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1562 | [B2056_SYN_PLL_MAST1] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 1563 | [B2056_SYN_PLL_MAST2] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 1564 | [B2056_SYN_PLL_MAST3] = { .ghz5 = 0x0018, .ghz2 = 0x0018, NOUPLOAD, }, | ||
| 1565 | [B2056_SYN_PLL_BIAS_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1566 | [B2056_SYN_PLL_XTAL0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1567 | [B2056_SYN_PLL_XTAL1] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 1568 | [B2056_SYN_PLL_XTAL3] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 1569 | [B2056_SYN_PLL_XTAL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1570 | [B2056_SYN_PLL_XTAL5] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 1571 | [B2056_SYN_PLL_XTAL6] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 1572 | [B2056_SYN_PLL_REFDIV] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1573 | [B2056_SYN_PLL_PFD] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 1574 | [B2056_SYN_PLL_CP1] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 1575 | [B2056_SYN_PLL_CP2] = { .ghz5 = 0x0030, .ghz2 = 0x0030, NOUPLOAD, }, | ||
| 1576 | [B2056_SYN_PLL_CP3] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 1577 | [B2056_SYN_PLL_LOOPFILTER1] = { .ghz5 = 0x000d, .ghz2 = 0x000d, NOUPLOAD, }, | ||
| 1578 | [B2056_SYN_PLL_LOOPFILTER2] = { .ghz5 = 0x000d, .ghz2 = 0x000d, NOUPLOAD, }, | ||
| 1579 | [B2056_SYN_PLL_LOOPFILTER3] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 1580 | [B2056_SYN_PLL_LOOPFILTER4] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 1581 | [B2056_SYN_PLL_LOOPFILTER5] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1582 | [B2056_SYN_PLL_MMD1] = { .ghz5 = 0x001c, .ghz2 = 0x001c, NOUPLOAD, }, | ||
| 1583 | [B2056_SYN_PLL_MMD2] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1584 | [B2056_SYN_PLL_VCO1] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1585 | [B2056_SYN_PLL_VCO2] = { .ghz5 = 0x00f7, .ghz2 = 0x00f7, UPLOAD, }, | ||
| 1586 | [B2056_SYN_PLL_MONITOR1] = { .ghz5 = 0x00b4, .ghz2 = 0x00b4, NOUPLOAD, }, | ||
| 1587 | [B2056_SYN_PLL_MONITOR2] = { .ghz5 = 0x00d2, .ghz2 = 0x00d2, NOUPLOAD, }, | ||
| 1588 | [B2056_SYN_PLL_VCOCAL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1589 | [B2056_SYN_PLL_VCOCAL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1590 | [B2056_SYN_PLL_VCOCAL4] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 1591 | [B2056_SYN_PLL_VCOCAL5] = { .ghz5 = 0x0096, .ghz2 = 0x0096, NOUPLOAD, }, | ||
| 1592 | [B2056_SYN_PLL_VCOCAL6] = { .ghz5 = 0x003e, .ghz2 = 0x003e, NOUPLOAD, }, | ||
| 1593 | [B2056_SYN_PLL_VCOCAL7] = { .ghz5 = 0x003e, .ghz2 = 0x003e, NOUPLOAD, }, | ||
| 1594 | [B2056_SYN_PLL_VCOCAL8] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 1595 | [B2056_SYN_PLL_VCOCAL9] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1596 | [B2056_SYN_PLL_VCOCAL10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1597 | [B2056_SYN_PLL_VCOCAL11] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 1598 | [B2056_SYN_PLL_VCOCAL12] = { .ghz5 = 0x0007, .ghz2 = 0x0007, UPLOAD, }, | ||
| 1599 | [B2056_SYN_PLL_VCOCAL13] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 1600 | [B2056_SYN_PLL_VREG] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1601 | [B2056_SYN_PLL_STATUS1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1602 | [B2056_SYN_PLL_STATUS2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1603 | [B2056_SYN_PLL_STATUS3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1604 | [B2056_SYN_LOGEN_PU0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1605 | [B2056_SYN_LOGEN_PU1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1606 | [B2056_SYN_LOGEN_PU2] = { .ghz5 = 0x0040, .ghz2 = 0x0040, NOUPLOAD, }, | ||
| 1607 | [B2056_SYN_LOGEN_PU3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1608 | [B2056_SYN_LOGEN_PU5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1609 | [B2056_SYN_LOGEN_PU6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1610 | [B2056_SYN_LOGEN_PU7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1611 | [B2056_SYN_LOGEN_PU8] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1612 | [B2056_SYN_LOGEN_BIAS_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1613 | [B2056_SYN_LOGEN_RCCR1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1614 | [B2056_SYN_LOGEN_VCOBUF1] = { .ghz5 = 0x0060, .ghz2 = 0x0060, NOUPLOAD, }, | ||
| 1615 | [B2056_SYN_LOGEN_MIXER1] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1616 | [B2056_SYN_LOGEN_MIXER2] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 1617 | [B2056_SYN_LOGEN_BUF1] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1618 | [B2056_SYN_LOGENBUF2] = { .ghz5 = 0x008f, .ghz2 = 0x008f, UPLOAD, }, | ||
| 1619 | [B2056_SYN_LOGEN_BUF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1620 | [B2056_SYN_LOGEN_BUF4] = { .ghz5 = 0x00cc, .ghz2 = 0x00cc, NOUPLOAD, }, | ||
| 1621 | [B2056_SYN_LOGEN_DIV1] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1622 | [B2056_SYN_LOGEN_DIV2] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1623 | [B2056_SYN_LOGEN_DIV3] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1624 | [B2056_SYN_LOGEN_ACL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1625 | [B2056_SYN_LOGEN_ACL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1626 | [B2056_SYN_LOGEN_ACL3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1627 | [B2056_SYN_LOGEN_ACL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1628 | [B2056_SYN_LOGEN_ACL5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1629 | [B2056_SYN_LOGEN_ACL6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1630 | [B2056_SYN_LOGEN_ACLOUT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1631 | [B2056_SYN_LOGEN_ACLCAL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1632 | [B2056_SYN_LOGEN_ACLCAL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1633 | [B2056_SYN_LOGEN_ACLCAL3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1634 | [B2056_SYN_CALEN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1635 | [B2056_SYN_LOGEN_PEAKDET1] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, NOUPLOAD, }, | ||
| 1636 | [B2056_SYN_LOGEN_CORE_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1637 | [B2056_SYN_LOGEN_RX_DIFF_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1638 | [B2056_SYN_LOGEN_TX_DIFF_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1639 | [B2056_SYN_LOGEN_RX_CMOS_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1640 | [B2056_SYN_LOGEN_TX_CMOS_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1641 | [B2056_SYN_LOGEN_VCOBUF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1642 | [B2056_SYN_LOGEN_MIXER3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1643 | [B2056_SYN_LOGEN_BUF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1644 | [B2056_SYN_LOGEN_BUF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1645 | [B2056_SYN_LOGEN_CBUFRX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1646 | [B2056_SYN_LOGEN_CBUFRX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1647 | [B2056_SYN_LOGEN_CBUFRX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1648 | [B2056_SYN_LOGEN_CBUFRX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1649 | [B2056_SYN_LOGEN_CBUFTX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1650 | [B2056_SYN_LOGEN_CBUFTX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1651 | [B2056_SYN_LOGEN_CBUFTX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1652 | [B2056_SYN_LOGEN_CBUFTX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1653 | [B2056_SYN_LOGEN_CMOSRX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1654 | [B2056_SYN_LOGEN_CMOSRX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1655 | [B2056_SYN_LOGEN_CMOSRX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1656 | [B2056_SYN_LOGEN_CMOSRX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1657 | [B2056_SYN_LOGEN_CMOSTX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1658 | [B2056_SYN_LOGEN_CMOSTX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1659 | [B2056_SYN_LOGEN_CMOSTX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1660 | [B2056_SYN_LOGEN_CMOSTX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1661 | [B2056_SYN_LOGEN_VCOBUF2_OVRVAL]= { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 1662 | [B2056_SYN_LOGEN_MIXER3_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1663 | [B2056_SYN_LOGEN_BUF5_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1664 | [B2056_SYN_LOGEN_BUF6_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1665 | [B2056_SYN_LOGEN_CBUFRX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1666 | [B2056_SYN_LOGEN_CBUFRX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1667 | [B2056_SYN_LOGEN_CBUFRX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1668 | [B2056_SYN_LOGEN_CBUFRX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1669 | [B2056_SYN_LOGEN_CBUFTX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1670 | [B2056_SYN_LOGEN_CBUFTX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1671 | [B2056_SYN_LOGEN_CBUFTX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1672 | [B2056_SYN_LOGEN_CBUFTX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1673 | [B2056_SYN_LOGEN_CMOSRX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1674 | [B2056_SYN_LOGEN_CMOSRX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1675 | [B2056_SYN_LOGEN_CMOSRX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1676 | [B2056_SYN_LOGEN_CMOSRX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1677 | [B2056_SYN_LOGEN_CMOSTX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1678 | [B2056_SYN_LOGEN_CMOSTX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1679 | [B2056_SYN_LOGEN_CMOSTX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1680 | [B2056_SYN_LOGEN_CMOSTX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 1681 | [B2056_SYN_LOGEN_ACL_WAITCNT] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 1682 | [B2056_SYN_LOGEN_CORE_CALVALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1683 | [B2056_SYN_LOGEN_RX_CMOS_CALVALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1684 | [B2056_SYN_LOGEN_TX_CMOS_VALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1685 | }; | ||
| 1686 | |||
| 1687 | static const struct b2056_inittab_entry b2056_inittab_rev6_tx[] = { | ||
| 1688 | [B2056_TX_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1689 | [B2056_TX_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1690 | [B2056_TX_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1691 | [B2056_TX_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1692 | [B2056_TX_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1693 | [B2056_TX_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1694 | [B2056_TX_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1695 | [B2056_TX_COM_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1696 | [B2056_TX_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1697 | [B2056_TX_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1698 | [B2056_TX_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1699 | [B2056_TX_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1700 | [B2056_TX_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1701 | [B2056_TX_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1702 | [B2056_TX_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1703 | [B2056_TX_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1704 | [B2056_TX_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1705 | [B2056_TX_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1706 | [B2056_TX_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1707 | [B2056_TX_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1708 | [B2056_TX_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1709 | [B2056_TX_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1710 | [B2056_TX_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1711 | [B2056_TX_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1712 | [B2056_TX_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1713 | [B2056_TX_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1714 | [B2056_TX_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1715 | [B2056_TX_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1716 | [B2056_TX_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1717 | [B2056_TX_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1718 | [B2056_TX_IQCAL_GAIN_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1719 | [B2056_TX_LOFT_FINE_I] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1720 | [B2056_TX_LOFT_FINE_Q] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1721 | [B2056_TX_LOFT_COARSE_I] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1722 | [B2056_TX_LOFT_COARSE_Q] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1723 | [B2056_TX_TX_COM_MASTER1] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 1724 | [B2056_TX_TX_COM_MASTER2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1725 | [B2056_TX_RXIQCAL_TXMUX] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1726 | [B2056_TX_TX_SSI_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1727 | [B2056_TX_IQCAL_VCM_HG] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1728 | [B2056_TX_IQCAL_IDAC] = { .ghz5 = 0x0037, .ghz2 = 0x0037, NOUPLOAD, }, | ||
| 1729 | [B2056_TX_TSSI_VCM] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1730 | [B2056_TX_TX_AMP_DET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1731 | [B2056_TX_TX_SSI_MUX] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1732 | [B2056_TX_TSSIA] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1733 | [B2056_TX_TSSIG] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1734 | [B2056_TX_TSSI_MISC1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1735 | [B2056_TX_TSSI_MISC2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1736 | [B2056_TX_TSSI_MISC3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1737 | [B2056_TX_PA_SPARE1] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 1738 | [B2056_TX_PA_SPARE2] = { .ghz5 = 0x00ee, .ghz2 = 0x00ee, UPLOAD, }, | ||
| 1739 | [B2056_TX_INTPAA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1740 | [B2056_TX_INTPAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1741 | [B2056_TX_INTPAA_BOOST_TUNE] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1742 | [B2056_TX_INTPAA_IAUX_STAT] = { .ghz5 = 0x0050, .ghz2 = 0x0050, UPLOAD, }, | ||
| 1743 | [B2056_TX_INTPAA_IAUX_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1744 | [B2056_TX_INTPAA_IMAIN_STAT] = { .ghz5 = 0x0050, .ghz2 = 0x0050, UPLOAD, }, | ||
| 1745 | [B2056_TX_INTPAA_IMAIN_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1746 | [B2056_TX_INTPAA_CASCBIAS] = { .ghz5 = 0x006e, .ghz2 = 0x006e, NOUPLOAD, }, | ||
| 1747 | [B2056_TX_INTPAA_PASLOPE] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 1748 | [B2056_TX_INTPAA_PA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1749 | [B2056_TX_INTPAG_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1750 | [B2056_TX_INTPAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1751 | [B2056_TX_INTPAG_BOOST_TUNE] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1752 | [B2056_TX_INTPAG_IAUX_STAT] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1753 | [B2056_TX_INTPAG_IAUX_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1754 | [B2056_TX_INTPAG_IMAIN_STAT] = { .ghz5 = 0x001e, .ghz2 = 0x001e, NOUPLOAD, }, | ||
| 1755 | [B2056_TX_INTPAG_IMAIN_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1756 | [B2056_TX_INTPAG_CASCBIAS] = { .ghz5 = 0x006e, .ghz2 = 0x006e, NOUPLOAD, }, | ||
| 1757 | [B2056_TX_INTPAG_PASLOPE] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 1758 | [B2056_TX_INTPAG_PA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1759 | [B2056_TX_PADA_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1760 | [B2056_TX_PADA_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 1761 | [B2056_TX_PADA_CASCBIAS] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 1762 | [B2056_TX_PADA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1763 | [B2056_TX_PADA_BOOST_TUNE] = { .ghz5 = 0x0038, .ghz2 = 0x0038, NOUPLOAD, }, | ||
| 1764 | [B2056_TX_PADA_SLOPE] = { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, }, | ||
| 1765 | [B2056_TX_PADG_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1766 | [B2056_TX_PADG_IDAC] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1767 | [B2056_TX_PADG_CASCBIAS] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 1768 | [B2056_TX_PADG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1769 | [B2056_TX_PADG_BOOST_TUNE] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 1770 | [B2056_TX_PADG_SLOPE] = { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, }, | ||
| 1771 | [B2056_TX_PGAA_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1772 | [B2056_TX_PGAA_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 1773 | [B2056_TX_PGAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1774 | [B2056_TX_PGAA_BOOST_TUNE] = { .ghz5 = 0x0083, .ghz2 = 0x0083, NOUPLOAD, }, | ||
| 1775 | [B2056_TX_PGAA_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, }, | ||
| 1776 | [B2056_TX_PGAA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1777 | [B2056_TX_PGAG_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1778 | [B2056_TX_PGAG_IDAC] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1779 | [B2056_TX_PGAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1780 | [B2056_TX_PGAG_BOOST_TUNE] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 1781 | [B2056_TX_PGAG_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, }, | ||
| 1782 | [B2056_TX_PGAG_MISC] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1783 | [B2056_TX_MIXA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1784 | [B2056_TX_MIXA_BOOST_TUNE] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 1785 | [B2056_TX_MIXG] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1786 | [B2056_TX_MIXG_BOOST_TUNE] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 1787 | [B2056_TX_BB_GM_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1788 | [B2056_TX_GMBB_GM] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1789 | [B2056_TX_GMBB_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, | ||
| 1790 | [B2056_TX_TXLPF_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1791 | [B2056_TX_TXLPF_RCCAL] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 1792 | [B2056_TX_TXLPF_RCCAL_OFF0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1793 | [B2056_TX_TXLPF_RCCAL_OFF1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1794 | [B2056_TX_TXLPF_RCCAL_OFF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1795 | [B2056_TX_TXLPF_RCCAL_OFF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1796 | [B2056_TX_TXLPF_RCCAL_OFF4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1797 | [B2056_TX_TXLPF_RCCAL_OFF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1798 | [B2056_TX_TXLPF_RCCAL_OFF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1799 | [B2056_TX_TXLPF_BW] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1800 | [B2056_TX_TXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1801 | [B2056_TX_TXLPF_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1802 | [B2056_TX_TXLPF_IDAC_0] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 1803 | [B2056_TX_TXLPF_IDAC_1] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 1804 | [B2056_TX_TXLPF_IDAC_2] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 1805 | [B2056_TX_TXLPF_IDAC_3] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 1806 | [B2056_TX_TXLPF_IDAC_4] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 1807 | [B2056_TX_TXLPF_IDAC_5] = { .ghz5 = 0x001b, .ghz2 = 0x001b, NOUPLOAD, }, | ||
| 1808 | [B2056_TX_TXLPF_IDAC_6] = { .ghz5 = 0x001b, .ghz2 = 0x001b, NOUPLOAD, }, | ||
| 1809 | [B2056_TX_TXLPF_OPAMP_IDAC] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 1810 | [B2056_TX_TXLPF_MISC] = { .ghz5 = 0x005b, .ghz2 = 0x005b, NOUPLOAD, }, | ||
| 1811 | [B2056_TX_TXSPARE1] = { .ghz5 = 0x0030, .ghz2 = 0x0030, UPLOAD, }, | ||
| 1812 | [B2056_TX_TXSPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1813 | [B2056_TX_TXSPARE3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1814 | [B2056_TX_TXSPARE4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1815 | [B2056_TX_TXSPARE5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1816 | [B2056_TX_TXSPARE6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1817 | [B2056_TX_TXSPARE7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1818 | [B2056_TX_TXSPARE8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1819 | [B2056_TX_TXSPARE9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1820 | [B2056_TX_TXSPARE10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1821 | [B2056_TX_TXSPARE11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1822 | [B2056_TX_TXSPARE12] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1823 | [B2056_TX_TXSPARE13] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1824 | [B2056_TX_TXSPARE14] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1825 | [B2056_TX_TXSPARE15] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1826 | [B2056_TX_TXSPARE16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1827 | [B2056_TX_STATUS_INTPA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1828 | [B2056_TX_STATUS_PAD_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1829 | [B2056_TX_STATUS_PGA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1830 | [B2056_TX_STATUS_GM_TXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1831 | [B2056_TX_STATUS_TXLPF_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1832 | [B2056_TX_STATUS_TXLPF_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1833 | [B2056_TX_GMBB_IDAC0] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 1834 | [B2056_TX_GMBB_IDAC1] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 1835 | [B2056_TX_GMBB_IDAC2] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 1836 | [B2056_TX_GMBB_IDAC3] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 1837 | [B2056_TX_GMBB_IDAC4] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 1838 | [B2056_TX_GMBB_IDAC5] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 1839 | [B2056_TX_GMBB_IDAC6] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 1840 | [B2056_TX_GMBB_IDAC7] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 1841 | }; | ||
| 1842 | |||
| 1843 | static const struct b2056_inittab_entry b2056_inittab_rev6_rx[] = { | ||
| 1844 | [B2056_RX_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1845 | [B2056_RX_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1846 | [B2056_RX_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1847 | [B2056_RX_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1848 | [B2056_RX_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1849 | [B2056_RX_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1850 | [B2056_RX_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1851 | [B2056_RX_COM_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1852 | [B2056_RX_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1853 | [B2056_RX_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1854 | [B2056_RX_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1855 | [B2056_RX_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1856 | [B2056_RX_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1857 | [B2056_RX_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1858 | [B2056_RX_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1859 | [B2056_RX_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1860 | [B2056_RX_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1861 | [B2056_RX_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1862 | [B2056_RX_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1863 | [B2056_RX_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1864 | [B2056_RX_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1865 | [B2056_RX_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1866 | [B2056_RX_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1867 | [B2056_RX_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1868 | [B2056_RX_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1869 | [B2056_RX_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1870 | [B2056_RX_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1871 | [B2056_RX_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1872 | [B2056_RX_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1873 | [B2056_RX_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1874 | [B2056_RX_RXIQCAL_RXMUX] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 1875 | [B2056_RX_RSSI_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1876 | [B2056_RX_RSSI_SEL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1877 | [B2056_RX_RSSI_GAIN] = { .ghz5 = 0x0090, .ghz2 = 0x0090, NOUPLOAD, }, | ||
| 1878 | [B2056_RX_RSSI_NB_IDAC] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 1879 | [B2056_RX_RSSI_WB2I_IDAC_1] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 1880 | [B2056_RX_RSSI_WB2I_IDAC_2] = { .ghz5 = 0x0005, .ghz2 = 0x0005, NOUPLOAD, }, | ||
| 1881 | [B2056_RX_RSSI_WB2Q_IDAC_1] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 1882 | [B2056_RX_RSSI_WB2Q_IDAC_2] = { .ghz5 = 0x0005, .ghz2 = 0x0005, NOUPLOAD, }, | ||
| 1883 | [B2056_RX_RSSI_POLE] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 1884 | [B2056_RX_RSSI_WB1_IDAC] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 1885 | [B2056_RX_RSSI_MISC] = { .ghz5 = 0x0090, .ghz2 = 0x0090, NOUPLOAD, }, | ||
| 1886 | [B2056_RX_LNAA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1887 | [B2056_RX_LNAA_TUNE] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1888 | [B2056_RX_LNAA_GAIN] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 1889 | [B2056_RX_LNA_A_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 1890 | [B2056_RX_BIASPOLE_LNAA1_IDAC] = { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, }, | ||
| 1891 | [B2056_RX_LNAA2_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 1892 | [B2056_RX_LNA1A_MISC] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 1893 | [B2056_RX_LNAG_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1894 | [B2056_RX_LNAG_TUNE] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 1895 | [B2056_RX_LNAG_GAIN] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 1896 | [B2056_RX_LNA_G_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 1897 | [B2056_RX_BIASPOLE_LNAG1_IDAC] = { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, }, | ||
| 1898 | [B2056_RX_LNAG2_IDAC] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 1899 | [B2056_RX_LNA1G_MISC] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 1900 | [B2056_RX_MIXA_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 1901 | [B2056_RX_MIXA_VCM] = { .ghz5 = 0x0055, .ghz2 = 0x0055, UPLOAD, }, | ||
| 1902 | [B2056_RX_MIXA_CTRLPTAT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1903 | [B2056_RX_MIXA_LOB_BIAS] = { .ghz5 = 0x0088, .ghz2 = 0x0088, UPLOAD, }, | ||
| 1904 | [B2056_RX_MIXA_CORE_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1905 | [B2056_RX_MIXA_CMFB_IDAC] = { .ghz5 = 0x0044, .ghz2 = 0x0044, NOUPLOAD, }, | ||
| 1906 | [B2056_RX_MIXA_BIAS_AUX] = { .ghz5 = 0x0007, .ghz2 = 0x0007, UPLOAD, }, | ||
| 1907 | [B2056_RX_MIXA_BIAS_MAIN] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 1908 | [B2056_RX_MIXA_BIAS_MISC] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 1909 | [B2056_RX_MIXA_MAST_BIAS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1910 | [B2056_RX_MIXG_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 1911 | [B2056_RX_MIXG_VCM] = { .ghz5 = 0x0055, .ghz2 = 0x0055, UPLOAD, }, | ||
| 1912 | [B2056_RX_MIXG_CTRLPTAT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1913 | [B2056_RX_MIXG_LOB_BIAS] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 1914 | [B2056_RX_MIXG_CORE_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1915 | [B2056_RX_MIXG_CMFB_IDAC] = { .ghz5 = 0x0044, .ghz2 = 0x0044, NOUPLOAD, }, | ||
| 1916 | [B2056_RX_MIXG_BIAS_AUX] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 1917 | [B2056_RX_MIXG_BIAS_MAIN] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 1918 | [B2056_RX_MIXG_BIAS_MISC] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 1919 | [B2056_RX_MIXG_MAST_BIAS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1920 | [B2056_RX_TIA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1921 | [B2056_RX_TIA_IOPAMP] = { .ghz5 = 0x0026, .ghz2 = 0x0026, UPLOAD, }, | ||
| 1922 | [B2056_RX_TIA_QOPAMP] = { .ghz5 = 0x0026, .ghz2 = 0x0026, UPLOAD, }, | ||
| 1923 | [B2056_RX_TIA_IMISC] = { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, }, | ||
| 1924 | [B2056_RX_TIA_QMISC] = { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, }, | ||
| 1925 | [B2056_RX_TIA_GAIN] = { .ghz5 = 0x0044, .ghz2 = 0x0044, NOUPLOAD, }, | ||
| 1926 | [B2056_RX_TIA_SPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1927 | [B2056_RX_TIA_SPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1928 | [B2056_RX_BB_LPF_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 1929 | [B2056_RX_AACI_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 1930 | [B2056_RX_RXLPF_IDAC] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 1931 | [B2056_RX_RXLPF_OPAMPBIAS_LOWQ] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 1932 | [B2056_RX_RXLPF_OPAMPBIAS_HIGHQ]= { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 1933 | [B2056_RX_RXLPF_BIAS_DCCANCEL] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 1934 | [B2056_RX_RXLPF_OUTVCM] = { .ghz5 = 0x0004, .ghz2 = 0x0004, UPLOAD, }, | ||
| 1935 | [B2056_RX_RXLPF_INVCM_BODY] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 1936 | [B2056_RX_RXLPF_CC_OP] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 1937 | [B2056_RX_RXLPF_GAIN] = { .ghz5 = 0x0023, .ghz2 = 0x0023, NOUPLOAD, }, | ||
| 1938 | [B2056_RX_RXLPF_Q_BW] = { .ghz5 = 0x0041, .ghz2 = 0x0041, NOUPLOAD, }, | ||
| 1939 | [B2056_RX_RXLPF_HP_CORNER_BW] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1940 | [B2056_RX_RXLPF_RCCAL_HPC] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 1941 | [B2056_RX_RXHPF_OFF0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1942 | [B2056_RX_RXHPF_OFF1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1943 | [B2056_RX_RXHPF_OFF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1944 | [B2056_RX_RXHPF_OFF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1945 | [B2056_RX_RXHPF_OFF4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1946 | [B2056_RX_RXHPF_OFF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1947 | [B2056_RX_RXHPF_OFF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1948 | [B2056_RX_RXHPF_OFF7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1949 | [B2056_RX_RXLPF_RCCAL_LPC] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 1950 | [B2056_RX_RXLPF_OFF_0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1951 | [B2056_RX_RXLPF_OFF_1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1952 | [B2056_RX_RXLPF_OFF_2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1953 | [B2056_RX_RXLPF_OFF_3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1954 | [B2056_RX_RXLPF_OFF_4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1955 | [B2056_RX_UNUSED] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1956 | [B2056_RX_VGA_MASTER] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 1957 | [B2056_RX_VGA_BIAS] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 1958 | [B2056_RX_VGA_BIAS_DCCANCEL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, | ||
| 1959 | [B2056_RX_VGA_GAIN] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 1960 | [B2056_RX_VGA_HP_CORNER_BW] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 1961 | [B2056_RX_VGABUF_BIAS] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 1962 | [B2056_RX_VGABUF_GAIN_BW] = { .ghz5 = 0x0030, .ghz2 = 0x0030, NOUPLOAD, }, | ||
| 1963 | [B2056_RX_TXFBMIX_A] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1964 | [B2056_RX_TXFBMIX_G] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1965 | [B2056_RX_RXSPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1966 | [B2056_RX_RXSPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1967 | [B2056_RX_RXSPARE3] = { .ghz5 = 0x0005, .ghz2 = 0x0005, UPLOAD, }, | ||
| 1968 | [B2056_RX_RXSPARE4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1969 | [B2056_RX_RXSPARE5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1970 | [B2056_RX_RXSPARE6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1971 | [B2056_RX_RXSPARE7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1972 | [B2056_RX_RXSPARE8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1973 | [B2056_RX_RXSPARE9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1974 | [B2056_RX_RXSPARE10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1975 | [B2056_RX_RXSPARE11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1976 | [B2056_RX_RXSPARE12] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1977 | [B2056_RX_RXSPARE13] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1978 | [B2056_RX_RXSPARE14] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1979 | [B2056_RX_RXSPARE15] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1980 | [B2056_RX_RXSPARE16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1981 | [B2056_RX_STATUS_LNAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1982 | [B2056_RX_STATUS_LNAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1983 | [B2056_RX_STATUS_MIXTIA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1984 | [B2056_RX_STATUS_RXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1985 | [B2056_RX_STATUS_VGA_BUF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1986 | [B2056_RX_STATUS_RXLPF_Q] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1987 | [B2056_RX_STATUS_RXLPF_BUF_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1988 | [B2056_RX_STATUS_RXLPF_VGA_HPC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1989 | [B2056_RX_STATUS_RXLPF_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1990 | [B2056_RX_STATUS_HPC_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1991 | }; | ||
| 1992 | |||
| 1993 | static const struct b2056_inittab_entry b2056_inittab_rev7_syn[] = { | ||
| 1994 | [B2056_SYN_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1995 | [B2056_SYN_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1996 | [B2056_SYN_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1997 | [B2056_SYN_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1998 | [B2056_SYN_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 1999 | [B2056_SYN_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2000 | [B2056_SYN_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2001 | [B2056_SYN_COM_PU] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2002 | [B2056_SYN_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2003 | [B2056_SYN_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2004 | [B2056_SYN_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2005 | [B2056_SYN_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2006 | [B2056_SYN_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2007 | [B2056_SYN_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2008 | [B2056_SYN_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2009 | [B2056_SYN_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2010 | [B2056_SYN_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2011 | [B2056_SYN_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2012 | [B2056_SYN_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2013 | [B2056_SYN_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2014 | [B2056_SYN_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2015 | [B2056_SYN_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2016 | [B2056_SYN_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2017 | [B2056_SYN_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2018 | [B2056_SYN_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2019 | [B2056_SYN_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2020 | [B2056_SYN_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2021 | [B2056_SYN_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2022 | [B2056_SYN_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2023 | [B2056_SYN_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2024 | [B2056_SYN_GPIO_MASTER1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2025 | [B2056_SYN_GPIO_MASTER2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2026 | [B2056_SYN_TOPBIAS_MASTER] = { .ghz5 = 0x0060, .ghz2 = 0x0060, NOUPLOAD, }, | ||
| 2027 | [B2056_SYN_TOPBIAS_RCAL] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 2028 | [B2056_SYN_AFEREG] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 2029 | [B2056_SYN_TEMPPROCSENSE] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2030 | [B2056_SYN_TEMPPROCSENSEIDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2031 | [B2056_SYN_TEMPPROCSENSERCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2032 | [B2056_SYN_LPO] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2033 | [B2056_SYN_VDDCAL_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2034 | [B2056_SYN_VDDCAL_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2035 | [B2056_SYN_VDDCAL_STATUS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2036 | [B2056_SYN_RCAL_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2037 | [B2056_SYN_RCAL_CODE_OUT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2038 | [B2056_SYN_RCCAL_CTRL0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2039 | [B2056_SYN_RCCAL_CTRL1] = { .ghz5 = 0x001f, .ghz2 = 0x001f, NOUPLOAD, }, | ||
| 2040 | [B2056_SYN_RCCAL_CTRL2] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 2041 | [B2056_SYN_RCCAL_CTRL3] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 2042 | [B2056_SYN_RCCAL_CTRL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2043 | [B2056_SYN_RCCAL_CTRL5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2044 | [B2056_SYN_RCCAL_CTRL6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2045 | [B2056_SYN_RCCAL_CTRL7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2046 | [B2056_SYN_RCCAL_CTRL8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2047 | [B2056_SYN_RCCAL_CTRL9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2048 | [B2056_SYN_RCCAL_CTRL10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2049 | [B2056_SYN_RCCAL_CTRL11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2050 | [B2056_SYN_ZCAL_SPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2051 | [B2056_SYN_ZCAL_SPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2052 | [B2056_SYN_PLL_MAST1] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 2053 | [B2056_SYN_PLL_MAST2] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 2054 | [B2056_SYN_PLL_MAST3] = { .ghz5 = 0x0018, .ghz2 = 0x0018, NOUPLOAD, }, | ||
| 2055 | [B2056_SYN_PLL_BIAS_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2056 | [B2056_SYN_PLL_XTAL0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2057 | [B2056_SYN_PLL_XTAL1] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 2058 | [B2056_SYN_PLL_XTAL3] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 2059 | [B2056_SYN_PLL_XTAL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2060 | [B2056_SYN_PLL_XTAL5] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 2061 | [B2056_SYN_PLL_XTAL6] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 2062 | [B2056_SYN_PLL_REFDIV] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2063 | [B2056_SYN_PLL_PFD] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 2064 | [B2056_SYN_PLL_CP1] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 2065 | [B2056_SYN_PLL_CP2] = { .ghz5 = 0x0030, .ghz2 = 0x0030, NOUPLOAD, }, | ||
| 2066 | [B2056_SYN_PLL_CP3] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 2067 | [B2056_SYN_PLL_LOOPFILTER1] = { .ghz5 = 0x000d, .ghz2 = 0x000d, NOUPLOAD, }, | ||
| 2068 | [B2056_SYN_PLL_LOOPFILTER2] = { .ghz5 = 0x000d, .ghz2 = 0x000d, NOUPLOAD, }, | ||
| 2069 | [B2056_SYN_PLL_LOOPFILTER3] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 2070 | [B2056_SYN_PLL_LOOPFILTER4] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 2071 | [B2056_SYN_PLL_LOOPFILTER5] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2072 | [B2056_SYN_PLL_MMD1] = { .ghz5 = 0x001c, .ghz2 = 0x001c, NOUPLOAD, }, | ||
| 2073 | [B2056_SYN_PLL_MMD2] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2074 | [B2056_SYN_PLL_VCO1] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2075 | [B2056_SYN_PLL_VCO2] = { .ghz5 = 0x00f7, .ghz2 = 0x00f7, UPLOAD, }, | ||
| 2076 | [B2056_SYN_PLL_MONITOR1] = { .ghz5 = 0x00b4, .ghz2 = 0x00b4, NOUPLOAD, }, | ||
| 2077 | [B2056_SYN_PLL_MONITOR2] = { .ghz5 = 0x00d2, .ghz2 = 0x00d2, NOUPLOAD, }, | ||
| 2078 | [B2056_SYN_PLL_VCOCAL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2079 | [B2056_SYN_PLL_VCOCAL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2080 | [B2056_SYN_PLL_VCOCAL4] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 2081 | [B2056_SYN_PLL_VCOCAL5] = { .ghz5 = 0x0096, .ghz2 = 0x0096, NOUPLOAD, }, | ||
| 2082 | [B2056_SYN_PLL_VCOCAL6] = { .ghz5 = 0x003e, .ghz2 = 0x003e, NOUPLOAD, }, | ||
| 2083 | [B2056_SYN_PLL_VCOCAL7] = { .ghz5 = 0x003e, .ghz2 = 0x003e, NOUPLOAD, }, | ||
| 2084 | [B2056_SYN_PLL_VCOCAL8] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 2085 | [B2056_SYN_PLL_VCOCAL9] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2086 | [B2056_SYN_PLL_VCOCAL10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2087 | [B2056_SYN_PLL_VCOCAL11] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 2088 | [B2056_SYN_PLL_VCOCAL12] = { .ghz5 = 0x0007, .ghz2 = 0x0007, UPLOAD, }, | ||
| 2089 | [B2056_SYN_PLL_VCOCAL13] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 2090 | [B2056_SYN_PLL_VREG] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2091 | [B2056_SYN_PLL_STATUS1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2092 | [B2056_SYN_PLL_STATUS2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2093 | [B2056_SYN_PLL_STATUS3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2094 | [B2056_SYN_LOGEN_PU0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2095 | [B2056_SYN_LOGEN_PU1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2096 | [B2056_SYN_LOGEN_PU2] = { .ghz5 = 0x0040, .ghz2 = 0x0040, NOUPLOAD, }, | ||
| 2097 | [B2056_SYN_LOGEN_PU3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2098 | [B2056_SYN_LOGEN_PU5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2099 | [B2056_SYN_LOGEN_PU6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2100 | [B2056_SYN_LOGEN_PU7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2101 | [B2056_SYN_LOGEN_PU8] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2102 | [B2056_SYN_LOGEN_BIAS_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2103 | [B2056_SYN_LOGEN_RCCR1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2104 | [B2056_SYN_LOGEN_VCOBUF1] = { .ghz5 = 0x0060, .ghz2 = 0x0060, NOUPLOAD, }, | ||
| 2105 | [B2056_SYN_LOGEN_MIXER1] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2106 | [B2056_SYN_LOGEN_MIXER2] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 2107 | [B2056_SYN_LOGEN_BUF1] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2108 | [B2056_SYN_LOGENBUF2] = { .ghz5 = 0x008f, .ghz2 = 0x008f, UPLOAD, }, | ||
| 2109 | [B2056_SYN_LOGEN_BUF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2110 | [B2056_SYN_LOGEN_BUF4] = { .ghz5 = 0x00cc, .ghz2 = 0x00cc, NOUPLOAD, }, | ||
| 2111 | [B2056_SYN_LOGEN_DIV1] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2112 | [B2056_SYN_LOGEN_DIV2] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2113 | [B2056_SYN_LOGEN_DIV3] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2114 | [B2056_SYN_LOGEN_ACL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2115 | [B2056_SYN_LOGEN_ACL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2116 | [B2056_SYN_LOGEN_ACL3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2117 | [B2056_SYN_LOGEN_ACL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2118 | [B2056_SYN_LOGEN_ACL5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2119 | [B2056_SYN_LOGEN_ACL6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2120 | [B2056_SYN_LOGEN_ACLOUT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2121 | [B2056_SYN_LOGEN_ACLCAL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2122 | [B2056_SYN_LOGEN_ACLCAL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2123 | [B2056_SYN_LOGEN_ACLCAL3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2124 | [B2056_SYN_CALEN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2125 | [B2056_SYN_LOGEN_PEAKDET1] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, NOUPLOAD, }, | ||
| 2126 | [B2056_SYN_LOGEN_CORE_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2127 | [B2056_SYN_LOGEN_RX_DIFF_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2128 | [B2056_SYN_LOGEN_TX_DIFF_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2129 | [B2056_SYN_LOGEN_RX_CMOS_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2130 | [B2056_SYN_LOGEN_TX_CMOS_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2131 | [B2056_SYN_LOGEN_VCOBUF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2132 | [B2056_SYN_LOGEN_MIXER3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2133 | [B2056_SYN_LOGEN_BUF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2134 | [B2056_SYN_LOGEN_BUF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2135 | [B2056_SYN_LOGEN_CBUFRX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2136 | [B2056_SYN_LOGEN_CBUFRX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2137 | [B2056_SYN_LOGEN_CBUFRX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2138 | [B2056_SYN_LOGEN_CBUFRX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2139 | [B2056_SYN_LOGEN_CBUFTX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2140 | [B2056_SYN_LOGEN_CBUFTX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2141 | [B2056_SYN_LOGEN_CBUFTX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2142 | [B2056_SYN_LOGEN_CBUFTX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2143 | [B2056_SYN_LOGEN_CMOSRX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2144 | [B2056_SYN_LOGEN_CMOSRX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2145 | [B2056_SYN_LOGEN_CMOSRX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2146 | [B2056_SYN_LOGEN_CMOSRX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2147 | [B2056_SYN_LOGEN_CMOSTX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2148 | [B2056_SYN_LOGEN_CMOSTX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2149 | [B2056_SYN_LOGEN_CMOSTX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2150 | [B2056_SYN_LOGEN_CMOSTX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2151 | [B2056_SYN_LOGEN_VCOBUF2_OVRVAL]= { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 2152 | [B2056_SYN_LOGEN_MIXER3_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2153 | [B2056_SYN_LOGEN_BUF5_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2154 | [B2056_SYN_LOGEN_BUF6_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2155 | [B2056_SYN_LOGEN_CBUFRX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2156 | [B2056_SYN_LOGEN_CBUFRX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2157 | [B2056_SYN_LOGEN_CBUFRX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2158 | [B2056_SYN_LOGEN_CBUFRX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2159 | [B2056_SYN_LOGEN_CBUFTX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2160 | [B2056_SYN_LOGEN_CBUFTX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2161 | [B2056_SYN_LOGEN_CBUFTX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2162 | [B2056_SYN_LOGEN_CBUFTX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2163 | [B2056_SYN_LOGEN_CMOSRX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2164 | [B2056_SYN_LOGEN_CMOSRX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2165 | [B2056_SYN_LOGEN_CMOSRX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2166 | [B2056_SYN_LOGEN_CMOSRX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2167 | [B2056_SYN_LOGEN_CMOSTX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2168 | [B2056_SYN_LOGEN_CMOSTX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2169 | [B2056_SYN_LOGEN_CMOSTX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2170 | [B2056_SYN_LOGEN_CMOSTX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2171 | [B2056_SYN_LOGEN_ACL_WAITCNT] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 2172 | [B2056_SYN_LOGEN_CORE_CALVALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2173 | [B2056_SYN_LOGEN_RX_CMOS_CALVALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2174 | [B2056_SYN_LOGEN_TX_CMOS_VALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2175 | }; | ||
| 2176 | |||
| 2177 | static const struct b2056_inittab_entry b2056_inittab_rev7_tx[] = { | ||
| 2178 | [B2056_TX_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2179 | [B2056_TX_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2180 | [B2056_TX_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2181 | [B2056_TX_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2182 | [B2056_TX_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2183 | [B2056_TX_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2184 | [B2056_TX_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2185 | [B2056_TX_COM_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2186 | [B2056_TX_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2187 | [B2056_TX_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2188 | [B2056_TX_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2189 | [B2056_TX_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2190 | [B2056_TX_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2191 | [B2056_TX_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2192 | [B2056_TX_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2193 | [B2056_TX_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2194 | [B2056_TX_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2195 | [B2056_TX_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2196 | [B2056_TX_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2197 | [B2056_TX_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2198 | [B2056_TX_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2199 | [B2056_TX_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2200 | [B2056_TX_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2201 | [B2056_TX_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2202 | [B2056_TX_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2203 | [B2056_TX_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2204 | [B2056_TX_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2205 | [B2056_TX_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2206 | [B2056_TX_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2207 | [B2056_TX_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2208 | [B2056_TX_IQCAL_GAIN_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2209 | [B2056_TX_LOFT_FINE_I] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2210 | [B2056_TX_LOFT_FINE_Q] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2211 | [B2056_TX_LOFT_COARSE_I] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2212 | [B2056_TX_LOFT_COARSE_Q] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2213 | [B2056_TX_TX_COM_MASTER1] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 2214 | [B2056_TX_TX_COM_MASTER2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2215 | [B2056_TX_RXIQCAL_TXMUX] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2216 | [B2056_TX_TX_SSI_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2217 | [B2056_TX_IQCAL_VCM_HG] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2218 | [B2056_TX_IQCAL_IDAC] = { .ghz5 = 0x0037, .ghz2 = 0x0037, NOUPLOAD, }, | ||
| 2219 | [B2056_TX_TSSI_VCM] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2220 | [B2056_TX_TX_AMP_DET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2221 | [B2056_TX_TX_SSI_MUX] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2222 | [B2056_TX_TSSIA] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2223 | [B2056_TX_TSSIG] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2224 | [B2056_TX_TSSI_MISC1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2225 | [B2056_TX_TSSI_MISC2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2226 | [B2056_TX_TSSI_MISC3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2227 | [B2056_TX_PA_SPARE1] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 2228 | [B2056_TX_PA_SPARE2] = { .ghz5 = 0x00ee, .ghz2 = 0x00ee, UPLOAD, }, | ||
| 2229 | [B2056_TX_INTPAA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2230 | [B2056_TX_INTPAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2231 | [B2056_TX_INTPAA_BOOST_TUNE] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2232 | [B2056_TX_INTPAA_IAUX_STAT] = { .ghz5 = 0x0050, .ghz2 = 0x0050, UPLOAD, }, | ||
| 2233 | [B2056_TX_INTPAA_IAUX_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2234 | [B2056_TX_INTPAA_IMAIN_STAT] = { .ghz5 = 0x0050, .ghz2 = 0x0050, UPLOAD, }, | ||
| 2235 | [B2056_TX_INTPAA_IMAIN_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2236 | [B2056_TX_INTPAA_CASCBIAS] = { .ghz5 = 0x006e, .ghz2 = 0x006e, NOUPLOAD, }, | ||
| 2237 | [B2056_TX_INTPAA_PASLOPE] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 2238 | [B2056_TX_INTPAA_PA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2239 | [B2056_TX_INTPAG_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2240 | [B2056_TX_INTPAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2241 | [B2056_TX_INTPAG_BOOST_TUNE] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2242 | [B2056_TX_INTPAG_IAUX_STAT] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2243 | [B2056_TX_INTPAG_IAUX_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2244 | [B2056_TX_INTPAG_IMAIN_STAT] = { .ghz5 = 0x001e, .ghz2 = 0x001e, NOUPLOAD, }, | ||
| 2245 | [B2056_TX_INTPAG_IMAIN_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2246 | [B2056_TX_INTPAG_CASCBIAS] = { .ghz5 = 0x006e, .ghz2 = 0x006e, NOUPLOAD, }, | ||
| 2247 | [B2056_TX_INTPAG_PASLOPE] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 2248 | [B2056_TX_INTPAG_PA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2249 | [B2056_TX_PADA_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2250 | [B2056_TX_PADA_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 2251 | [B2056_TX_PADA_CASCBIAS] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 2252 | [B2056_TX_PADA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2253 | [B2056_TX_PADA_BOOST_TUNE] = { .ghz5 = 0x0038, .ghz2 = 0x0038, NOUPLOAD, }, | ||
| 2254 | [B2056_TX_PADA_SLOPE] = { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, }, | ||
| 2255 | [B2056_TX_PADG_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2256 | [B2056_TX_PADG_IDAC] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2257 | [B2056_TX_PADG_CASCBIAS] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 2258 | [B2056_TX_PADG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2259 | [B2056_TX_PADG_BOOST_TUNE] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 2260 | [B2056_TX_PADG_SLOPE] = { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, }, | ||
| 2261 | [B2056_TX_PGAA_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2262 | [B2056_TX_PGAA_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 2263 | [B2056_TX_PGAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2264 | [B2056_TX_PGAA_BOOST_TUNE] = { .ghz5 = 0x0083, .ghz2 = 0x0083, NOUPLOAD, }, | ||
| 2265 | [B2056_TX_PGAA_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, }, | ||
| 2266 | [B2056_TX_PGAA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2267 | [B2056_TX_PGAG_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2268 | [B2056_TX_PGAG_IDAC] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2269 | [B2056_TX_PGAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2270 | [B2056_TX_PGAG_BOOST_TUNE] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 2271 | [B2056_TX_PGAG_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, }, | ||
| 2272 | [B2056_TX_PGAG_MISC] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2273 | [B2056_TX_MIXA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2274 | [B2056_TX_MIXA_BOOST_TUNE] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 2275 | [B2056_TX_MIXG] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2276 | [B2056_TX_MIXG_BOOST_TUNE] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 2277 | [B2056_TX_BB_GM_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2278 | [B2056_TX_GMBB_GM] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2279 | [B2056_TX_GMBB_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, | ||
| 2280 | [B2056_TX_TXLPF_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2281 | [B2056_TX_TXLPF_RCCAL] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 2282 | [B2056_TX_TXLPF_RCCAL_OFF0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2283 | [B2056_TX_TXLPF_RCCAL_OFF1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2284 | [B2056_TX_TXLPF_RCCAL_OFF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2285 | [B2056_TX_TXLPF_RCCAL_OFF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2286 | [B2056_TX_TXLPF_RCCAL_OFF4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2287 | [B2056_TX_TXLPF_RCCAL_OFF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2288 | [B2056_TX_TXLPF_RCCAL_OFF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2289 | [B2056_TX_TXLPF_BW] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2290 | [B2056_TX_TXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2291 | [B2056_TX_TXLPF_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2292 | [B2056_TX_TXLPF_IDAC_0] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 2293 | [B2056_TX_TXLPF_IDAC_1] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 2294 | [B2056_TX_TXLPF_IDAC_2] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 2295 | [B2056_TX_TXLPF_IDAC_3] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 2296 | [B2056_TX_TXLPF_IDAC_4] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 2297 | [B2056_TX_TXLPF_IDAC_5] = { .ghz5 = 0x001b, .ghz2 = 0x001b, NOUPLOAD, }, | ||
| 2298 | [B2056_TX_TXLPF_IDAC_6] = { .ghz5 = 0x001b, .ghz2 = 0x001b, NOUPLOAD, }, | ||
| 2299 | [B2056_TX_TXLPF_OPAMP_IDAC] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 2300 | [B2056_TX_TXLPF_MISC] = { .ghz5 = 0x005b, .ghz2 = 0x005b, NOUPLOAD, }, | ||
| 2301 | [B2056_TX_TXSPARE1] = { .ghz5 = 0x0030, .ghz2 = 0x0030, UPLOAD, }, | ||
| 2302 | [B2056_TX_TXSPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2303 | [B2056_TX_TXSPARE3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2304 | [B2056_TX_TXSPARE4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2305 | [B2056_TX_TXSPARE5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2306 | [B2056_TX_TXSPARE6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2307 | [B2056_TX_TXSPARE7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2308 | [B2056_TX_TXSPARE8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2309 | [B2056_TX_TXSPARE9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2310 | [B2056_TX_TXSPARE10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2311 | [B2056_TX_TXSPARE11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2312 | [B2056_TX_TXSPARE12] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2313 | [B2056_TX_TXSPARE13] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2314 | [B2056_TX_TXSPARE14] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2315 | [B2056_TX_TXSPARE15] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2316 | [B2056_TX_TXSPARE16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2317 | [B2056_TX_STATUS_INTPA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2318 | [B2056_TX_STATUS_PAD_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2319 | [B2056_TX_STATUS_PGA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2320 | [B2056_TX_STATUS_GM_TXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2321 | [B2056_TX_STATUS_TXLPF_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2322 | [B2056_TX_STATUS_TXLPF_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2323 | [B2056_TX_GMBB_IDAC0] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 2324 | [B2056_TX_GMBB_IDAC1] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 2325 | [B2056_TX_GMBB_IDAC2] = { .ghz5 = 0x0071, .ghz2 = 0x0071, UPLOAD, }, | ||
| 2326 | [B2056_TX_GMBB_IDAC3] = { .ghz5 = 0x0071, .ghz2 = 0x0071, UPLOAD, }, | ||
| 2327 | [B2056_TX_GMBB_IDAC4] = { .ghz5 = 0x0072, .ghz2 = 0x0072, UPLOAD, }, | ||
| 2328 | [B2056_TX_GMBB_IDAC5] = { .ghz5 = 0x0073, .ghz2 = 0x0073, UPLOAD, }, | ||
| 2329 | [B2056_TX_GMBB_IDAC6] = { .ghz5 = 0x0074, .ghz2 = 0x0074, UPLOAD, }, | ||
| 2330 | [B2056_TX_GMBB_IDAC7] = { .ghz5 = 0x0075, .ghz2 = 0x0075, UPLOAD, }, | ||
| 2331 | }; | ||
| 2332 | |||
| 2333 | static const struct b2056_inittab_entry b2056_inittab_rev7_rx[] = { | ||
| 2334 | [B2056_RX_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2335 | [B2056_RX_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2336 | [B2056_RX_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2337 | [B2056_RX_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2338 | [B2056_RX_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2339 | [B2056_RX_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2340 | [B2056_RX_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2341 | [B2056_RX_COM_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2342 | [B2056_RX_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2343 | [B2056_RX_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2344 | [B2056_RX_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2345 | [B2056_RX_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2346 | [B2056_RX_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2347 | [B2056_RX_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2348 | [B2056_RX_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2349 | [B2056_RX_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2350 | [B2056_RX_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2351 | [B2056_RX_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2352 | [B2056_RX_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2353 | [B2056_RX_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2354 | [B2056_RX_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2355 | [B2056_RX_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2356 | [B2056_RX_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2357 | [B2056_RX_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2358 | [B2056_RX_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2359 | [B2056_RX_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2360 | [B2056_RX_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2361 | [B2056_RX_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2362 | [B2056_RX_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2363 | [B2056_RX_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2364 | [B2056_RX_RXIQCAL_RXMUX] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2365 | [B2056_RX_RSSI_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2366 | [B2056_RX_RSSI_SEL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2367 | [B2056_RX_RSSI_GAIN] = { .ghz5 = 0x0090, .ghz2 = 0x0090, NOUPLOAD, }, | ||
| 2368 | [B2056_RX_RSSI_NB_IDAC] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 2369 | [B2056_RX_RSSI_WB2I_IDAC_1] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 2370 | [B2056_RX_RSSI_WB2I_IDAC_2] = { .ghz5 = 0x0005, .ghz2 = 0x0005, NOUPLOAD, }, | ||
| 2371 | [B2056_RX_RSSI_WB2Q_IDAC_1] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 2372 | [B2056_RX_RSSI_WB2Q_IDAC_2] = { .ghz5 = 0x0005, .ghz2 = 0x0005, NOUPLOAD, }, | ||
| 2373 | [B2056_RX_RSSI_POLE] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 2374 | [B2056_RX_RSSI_WB1_IDAC] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 2375 | [B2056_RX_RSSI_MISC] = { .ghz5 = 0x0090, .ghz2 = 0x0090, NOUPLOAD, }, | ||
| 2376 | [B2056_RX_LNAA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2377 | [B2056_RX_LNAA_TUNE] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2378 | [B2056_RX_LNAA_GAIN] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 2379 | [B2056_RX_LNA_A_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 2380 | [B2056_RX_BIASPOLE_LNAA1_IDAC] = { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, }, | ||
| 2381 | [B2056_RX_LNAA2_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 2382 | [B2056_RX_LNA1A_MISC] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 2383 | [B2056_RX_LNAG_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2384 | [B2056_RX_LNAG_TUNE] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2385 | [B2056_RX_LNAG_GAIN] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 2386 | [B2056_RX_LNA_G_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 2387 | [B2056_RX_BIASPOLE_LNAG1_IDAC] = { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, }, | ||
| 2388 | [B2056_RX_LNAG2_IDAC] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 2389 | [B2056_RX_LNA1G_MISC] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 2390 | [B2056_RX_MIXA_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 2391 | [B2056_RX_MIXA_VCM] = { .ghz5 = 0x0055, .ghz2 = 0x0055, UPLOAD, }, | ||
| 2392 | [B2056_RX_MIXA_CTRLPTAT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2393 | [B2056_RX_MIXA_LOB_BIAS] = { .ghz5 = 0x0088, .ghz2 = 0x0088, UPLOAD, }, | ||
| 2394 | [B2056_RX_MIXA_CORE_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2395 | [B2056_RX_MIXA_CMFB_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, | ||
| 2396 | [B2056_RX_MIXA_BIAS_AUX] = { .ghz5 = 0x0007, .ghz2 = 0x0007, UPLOAD, }, | ||
| 2397 | [B2056_RX_MIXA_BIAS_MAIN] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 2398 | [B2056_RX_MIXA_BIAS_MISC] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 2399 | [B2056_RX_MIXA_MAST_BIAS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2400 | [B2056_RX_MIXG_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 2401 | [B2056_RX_MIXG_VCM] = { .ghz5 = 0x0055, .ghz2 = 0x0055, UPLOAD, }, | ||
| 2402 | [B2056_RX_MIXG_CTRLPTAT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2403 | [B2056_RX_MIXG_LOB_BIAS] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 2404 | [B2056_RX_MIXG_CORE_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2405 | [B2056_RX_MIXG_CMFB_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, | ||
| 2406 | [B2056_RX_MIXG_BIAS_AUX] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 2407 | [B2056_RX_MIXG_BIAS_MAIN] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 2408 | [B2056_RX_MIXG_BIAS_MISC] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 2409 | [B2056_RX_MIXG_MAST_BIAS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2410 | [B2056_RX_TIA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2411 | [B2056_RX_TIA_IOPAMP] = { .ghz5 = 0x0026, .ghz2 = 0x0026, UPLOAD, }, | ||
| 2412 | [B2056_RX_TIA_QOPAMP] = { .ghz5 = 0x0026, .ghz2 = 0x0026, UPLOAD, }, | ||
| 2413 | [B2056_RX_TIA_IMISC] = { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, }, | ||
| 2414 | [B2056_RX_TIA_QMISC] = { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, }, | ||
| 2415 | [B2056_RX_TIA_GAIN] = { .ghz5 = 0x0044, .ghz2 = 0x0044, NOUPLOAD, }, | ||
| 2416 | [B2056_RX_TIA_SPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2417 | [B2056_RX_TIA_SPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2418 | [B2056_RX_BB_LPF_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 2419 | [B2056_RX_AACI_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 2420 | [B2056_RX_RXLPF_IDAC] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 2421 | [B2056_RX_RXLPF_OPAMPBIAS_LOWQ] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 2422 | [B2056_RX_RXLPF_OPAMPBIAS_HIGHQ]= { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 2423 | [B2056_RX_RXLPF_BIAS_DCCANCEL] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2424 | [B2056_RX_RXLPF_OUTVCM] = { .ghz5 = 0x0004, .ghz2 = 0x0004, UPLOAD, }, | ||
| 2425 | [B2056_RX_RXLPF_INVCM_BODY] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 2426 | [B2056_RX_RXLPF_CC_OP] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 2427 | [B2056_RX_RXLPF_GAIN] = { .ghz5 = 0x0023, .ghz2 = 0x0023, NOUPLOAD, }, | ||
| 2428 | [B2056_RX_RXLPF_Q_BW] = { .ghz5 = 0x0041, .ghz2 = 0x0041, NOUPLOAD, }, | ||
| 2429 | [B2056_RX_RXLPF_HP_CORNER_BW] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2430 | [B2056_RX_RXLPF_RCCAL_HPC] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 2431 | [B2056_RX_RXHPF_OFF0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2432 | [B2056_RX_RXHPF_OFF1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2433 | [B2056_RX_RXHPF_OFF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2434 | [B2056_RX_RXHPF_OFF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2435 | [B2056_RX_RXHPF_OFF4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2436 | [B2056_RX_RXHPF_OFF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2437 | [B2056_RX_RXHPF_OFF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2438 | [B2056_RX_RXHPF_OFF7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2439 | [B2056_RX_RXLPF_RCCAL_LPC] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 2440 | [B2056_RX_RXLPF_OFF_0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2441 | [B2056_RX_RXLPF_OFF_1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2442 | [B2056_RX_RXLPF_OFF_2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2443 | [B2056_RX_RXLPF_OFF_3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2444 | [B2056_RX_RXLPF_OFF_4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2445 | [B2056_RX_UNUSED] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2446 | [B2056_RX_VGA_MASTER] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 2447 | [B2056_RX_VGA_BIAS] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 2448 | [B2056_RX_VGA_BIAS_DCCANCEL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, | ||
| 2449 | [B2056_RX_VGA_GAIN] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 2450 | [B2056_RX_VGA_HP_CORNER_BW] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2451 | [B2056_RX_VGABUF_BIAS] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 2452 | [B2056_RX_VGABUF_GAIN_BW] = { .ghz5 = 0x0030, .ghz2 = 0x0030, NOUPLOAD, }, | ||
| 2453 | [B2056_RX_TXFBMIX_A] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2454 | [B2056_RX_TXFBMIX_G] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2455 | [B2056_RX_RXSPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2456 | [B2056_RX_RXSPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2457 | [B2056_RX_RXSPARE3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2458 | [B2056_RX_RXSPARE4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2459 | [B2056_RX_RXSPARE5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2460 | [B2056_RX_RXSPARE6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2461 | [B2056_RX_RXSPARE7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2462 | [B2056_RX_RXSPARE8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2463 | [B2056_RX_RXSPARE9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2464 | [B2056_RX_RXSPARE10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2465 | [B2056_RX_RXSPARE11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2466 | [B2056_RX_RXSPARE12] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2467 | [B2056_RX_RXSPARE13] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2468 | [B2056_RX_RXSPARE14] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2469 | [B2056_RX_RXSPARE15] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2470 | [B2056_RX_RXSPARE16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2471 | [B2056_RX_STATUS_LNAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2472 | [B2056_RX_STATUS_LNAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2473 | [B2056_RX_STATUS_MIXTIA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2474 | [B2056_RX_STATUS_RXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2475 | [B2056_RX_STATUS_VGA_BUF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2476 | [B2056_RX_STATUS_RXLPF_Q] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2477 | [B2056_RX_STATUS_RXLPF_BUF_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2478 | [B2056_RX_STATUS_RXLPF_VGA_HPC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2479 | [B2056_RX_STATUS_RXLPF_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2480 | [B2056_RX_STATUS_HPC_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2481 | }; | ||
| 2482 | |||
| 2483 | static const struct b2056_inittab_entry b2056_inittab_rev8_syn[] = { | ||
| 2484 | [B2056_SYN_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2485 | [B2056_SYN_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2486 | [B2056_SYN_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2487 | [B2056_SYN_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2488 | [B2056_SYN_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2489 | [B2056_SYN_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2490 | [B2056_SYN_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2491 | [B2056_SYN_COM_PU] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2492 | [B2056_SYN_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2493 | [B2056_SYN_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2494 | [B2056_SYN_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2495 | [B2056_SYN_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2496 | [B2056_SYN_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2497 | [B2056_SYN_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2498 | [B2056_SYN_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2499 | [B2056_SYN_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2500 | [B2056_SYN_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2501 | [B2056_SYN_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2502 | [B2056_SYN_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2503 | [B2056_SYN_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2504 | [B2056_SYN_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2505 | [B2056_SYN_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2506 | [B2056_SYN_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2507 | [B2056_SYN_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2508 | [B2056_SYN_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2509 | [B2056_SYN_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2510 | [B2056_SYN_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2511 | [B2056_SYN_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2512 | [B2056_SYN_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2513 | [B2056_SYN_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2514 | [B2056_SYN_GPIO_MASTER1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2515 | [B2056_SYN_GPIO_MASTER2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2516 | [B2056_SYN_TOPBIAS_MASTER] = { .ghz5 = 0x0060, .ghz2 = 0x0060, NOUPLOAD, }, | ||
| 2517 | [B2056_SYN_TOPBIAS_RCAL] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 2518 | [B2056_SYN_AFEREG] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 2519 | [B2056_SYN_TEMPPROCSENSE] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2520 | [B2056_SYN_TEMPPROCSENSEIDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2521 | [B2056_SYN_TEMPPROCSENSERCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2522 | [B2056_SYN_LPO] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2523 | [B2056_SYN_VDDCAL_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2524 | [B2056_SYN_VDDCAL_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2525 | [B2056_SYN_VDDCAL_STATUS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2526 | [B2056_SYN_RCAL_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2527 | [B2056_SYN_RCAL_CODE_OUT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2528 | [B2056_SYN_RCCAL_CTRL0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2529 | [B2056_SYN_RCCAL_CTRL1] = { .ghz5 = 0x001f, .ghz2 = 0x001f, NOUPLOAD, }, | ||
| 2530 | [B2056_SYN_RCCAL_CTRL2] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 2531 | [B2056_SYN_RCCAL_CTRL3] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 2532 | [B2056_SYN_RCCAL_CTRL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2533 | [B2056_SYN_RCCAL_CTRL5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2534 | [B2056_SYN_RCCAL_CTRL6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2535 | [B2056_SYN_RCCAL_CTRL7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2536 | [B2056_SYN_RCCAL_CTRL8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2537 | [B2056_SYN_RCCAL_CTRL9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2538 | [B2056_SYN_RCCAL_CTRL10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2539 | [B2056_SYN_RCCAL_CTRL11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2540 | [B2056_SYN_ZCAL_SPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2541 | [B2056_SYN_ZCAL_SPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2542 | [B2056_SYN_PLL_MAST1] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 2543 | [B2056_SYN_PLL_MAST2] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 2544 | [B2056_SYN_PLL_MAST3] = { .ghz5 = 0x0018, .ghz2 = 0x0018, NOUPLOAD, }, | ||
| 2545 | [B2056_SYN_PLL_BIAS_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2546 | [B2056_SYN_PLL_XTAL0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2547 | [B2056_SYN_PLL_XTAL1] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 2548 | [B2056_SYN_PLL_XTAL3] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 2549 | [B2056_SYN_PLL_XTAL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2550 | [B2056_SYN_PLL_XTAL5] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 2551 | [B2056_SYN_PLL_XTAL6] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 2552 | [B2056_SYN_PLL_REFDIV] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2553 | [B2056_SYN_PLL_PFD] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 2554 | [B2056_SYN_PLL_CP1] = { .ghz5 = 0x000f, .ghz2 = 0x000f, NOUPLOAD, }, | ||
| 2555 | [B2056_SYN_PLL_CP2] = { .ghz5 = 0x0030, .ghz2 = 0x0030, NOUPLOAD, }, | ||
| 2556 | [B2056_SYN_PLL_CP3] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 2557 | [B2056_SYN_PLL_LOOPFILTER1] = { .ghz5 = 0x000d, .ghz2 = 0x000d, NOUPLOAD, }, | ||
| 2558 | [B2056_SYN_PLL_LOOPFILTER2] = { .ghz5 = 0x000d, .ghz2 = 0x000d, NOUPLOAD, }, | ||
| 2559 | [B2056_SYN_PLL_LOOPFILTER3] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 2560 | [B2056_SYN_PLL_LOOPFILTER4] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 2561 | [B2056_SYN_PLL_LOOPFILTER5] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2562 | [B2056_SYN_PLL_MMD1] = { .ghz5 = 0x001c, .ghz2 = 0x001c, NOUPLOAD, }, | ||
| 2563 | [B2056_SYN_PLL_MMD2] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2564 | [B2056_SYN_PLL_VCO1] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2565 | [B2056_SYN_PLL_VCO2] = { .ghz5 = 0x00f7, .ghz2 = 0x00f7, UPLOAD, }, | ||
| 2566 | [B2056_SYN_PLL_MONITOR1] = { .ghz5 = 0x00b4, .ghz2 = 0x00b4, NOUPLOAD, }, | ||
| 2567 | [B2056_SYN_PLL_MONITOR2] = { .ghz5 = 0x00d2, .ghz2 = 0x00d2, NOUPLOAD, }, | ||
| 2568 | [B2056_SYN_PLL_VCOCAL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2569 | [B2056_SYN_PLL_VCOCAL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2570 | [B2056_SYN_PLL_VCOCAL4] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 2571 | [B2056_SYN_PLL_VCOCAL5] = { .ghz5 = 0x0096, .ghz2 = 0x0096, NOUPLOAD, }, | ||
| 2572 | [B2056_SYN_PLL_VCOCAL6] = { .ghz5 = 0x003e, .ghz2 = 0x003e, NOUPLOAD, }, | ||
| 2573 | [B2056_SYN_PLL_VCOCAL7] = { .ghz5 = 0x003e, .ghz2 = 0x003e, NOUPLOAD, }, | ||
| 2574 | [B2056_SYN_PLL_VCOCAL8] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 2575 | [B2056_SYN_PLL_VCOCAL9] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2576 | [B2056_SYN_PLL_VCOCAL10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2577 | [B2056_SYN_PLL_VCOCAL11] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 2578 | [B2056_SYN_PLL_VCOCAL12] = { .ghz5 = 0x0007, .ghz2 = 0x0007, UPLOAD, }, | ||
| 2579 | [B2056_SYN_PLL_VCOCAL13] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 2580 | [B2056_SYN_PLL_VREG] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2581 | [B2056_SYN_PLL_STATUS1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2582 | [B2056_SYN_PLL_STATUS2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2583 | [B2056_SYN_PLL_STATUS3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2584 | [B2056_SYN_LOGEN_PU0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2585 | [B2056_SYN_LOGEN_PU1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2586 | [B2056_SYN_LOGEN_PU2] = { .ghz5 = 0x0040, .ghz2 = 0x0040, NOUPLOAD, }, | ||
| 2587 | [B2056_SYN_LOGEN_PU3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2588 | [B2056_SYN_LOGEN_PU5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2589 | [B2056_SYN_LOGEN_PU6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2590 | [B2056_SYN_LOGEN_PU7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2591 | [B2056_SYN_LOGEN_PU8] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2592 | [B2056_SYN_LOGEN_BIAS_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2593 | [B2056_SYN_LOGEN_RCCR1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2594 | [B2056_SYN_LOGEN_VCOBUF1] = { .ghz5 = 0x0060, .ghz2 = 0x0060, NOUPLOAD, }, | ||
| 2595 | [B2056_SYN_LOGEN_MIXER1] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2596 | [B2056_SYN_LOGEN_MIXER2] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 2597 | [B2056_SYN_LOGEN_BUF1] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2598 | [B2056_SYN_LOGENBUF2] = { .ghz5 = 0x008f, .ghz2 = 0x008f, UPLOAD, }, | ||
| 2599 | [B2056_SYN_LOGEN_BUF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2600 | [B2056_SYN_LOGEN_BUF4] = { .ghz5 = 0x00cc, .ghz2 = 0x00cc, NOUPLOAD, }, | ||
| 2601 | [B2056_SYN_LOGEN_DIV1] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2602 | [B2056_SYN_LOGEN_DIV2] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2603 | [B2056_SYN_LOGEN_DIV3] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2604 | [B2056_SYN_LOGEN_ACL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2605 | [B2056_SYN_LOGEN_ACL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2606 | [B2056_SYN_LOGEN_ACL3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2607 | [B2056_SYN_LOGEN_ACL4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2608 | [B2056_SYN_LOGEN_ACL5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2609 | [B2056_SYN_LOGEN_ACL6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2610 | [B2056_SYN_LOGEN_ACLOUT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2611 | [B2056_SYN_LOGEN_ACLCAL1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2612 | [B2056_SYN_LOGEN_ACLCAL2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2613 | [B2056_SYN_LOGEN_ACLCAL3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2614 | [B2056_SYN_CALEN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2615 | [B2056_SYN_LOGEN_PEAKDET1] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, NOUPLOAD, }, | ||
| 2616 | [B2056_SYN_LOGEN_CORE_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2617 | [B2056_SYN_LOGEN_RX_DIFF_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2618 | [B2056_SYN_LOGEN_TX_DIFF_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2619 | [B2056_SYN_LOGEN_RX_CMOS_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2620 | [B2056_SYN_LOGEN_TX_CMOS_ACL_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2621 | [B2056_SYN_LOGEN_VCOBUF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2622 | [B2056_SYN_LOGEN_MIXER3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2623 | [B2056_SYN_LOGEN_BUF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2624 | [B2056_SYN_LOGEN_BUF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2625 | [B2056_SYN_LOGEN_CBUFRX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2626 | [B2056_SYN_LOGEN_CBUFRX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2627 | [B2056_SYN_LOGEN_CBUFRX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2628 | [B2056_SYN_LOGEN_CBUFRX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2629 | [B2056_SYN_LOGEN_CBUFTX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2630 | [B2056_SYN_LOGEN_CBUFTX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2631 | [B2056_SYN_LOGEN_CBUFTX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2632 | [B2056_SYN_LOGEN_CBUFTX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2633 | [B2056_SYN_LOGEN_CMOSRX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2634 | [B2056_SYN_LOGEN_CMOSRX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2635 | [B2056_SYN_LOGEN_CMOSRX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2636 | [B2056_SYN_LOGEN_CMOSRX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2637 | [B2056_SYN_LOGEN_CMOSTX1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2638 | [B2056_SYN_LOGEN_CMOSTX2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2639 | [B2056_SYN_LOGEN_CMOSTX3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2640 | [B2056_SYN_LOGEN_CMOSTX4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2641 | [B2056_SYN_LOGEN_VCOBUF2_OVRVAL]= { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 2642 | [B2056_SYN_LOGEN_MIXER3_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2643 | [B2056_SYN_LOGEN_BUF5_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2644 | [B2056_SYN_LOGEN_BUF6_OVRVAL] = { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2645 | [B2056_SYN_LOGEN_CBUFRX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2646 | [B2056_SYN_LOGEN_CBUFRX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2647 | [B2056_SYN_LOGEN_CBUFRX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2648 | [B2056_SYN_LOGEN_CBUFRX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2649 | [B2056_SYN_LOGEN_CBUFTX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2650 | [B2056_SYN_LOGEN_CBUFTX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2651 | [B2056_SYN_LOGEN_CBUFTX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2652 | [B2056_SYN_LOGEN_CBUFTX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2653 | [B2056_SYN_LOGEN_CMOSRX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2654 | [B2056_SYN_LOGEN_CMOSRX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2655 | [B2056_SYN_LOGEN_CMOSRX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2656 | [B2056_SYN_LOGEN_CMOSRX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2657 | [B2056_SYN_LOGEN_CMOSTX1_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2658 | [B2056_SYN_LOGEN_CMOSTX2_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2659 | [B2056_SYN_LOGEN_CMOSTX3_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2660 | [B2056_SYN_LOGEN_CMOSTX4_OVRVAL]= { .ghz5 = 0x0066, .ghz2 = 0x0066, NOUPLOAD, }, | ||
| 2661 | [B2056_SYN_LOGEN_ACL_WAITCNT] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 2662 | [B2056_SYN_LOGEN_CORE_CALVALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2663 | [B2056_SYN_LOGEN_RX_CMOS_CALVALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2664 | [B2056_SYN_LOGEN_TX_CMOS_VALID] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2665 | }; | ||
| 2666 | |||
| 2667 | static const struct b2056_inittab_entry b2056_inittab_rev8_tx[] = { | ||
| 2668 | [B2056_TX_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2669 | [B2056_TX_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2670 | [B2056_TX_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2671 | [B2056_TX_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2672 | [B2056_TX_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2673 | [B2056_TX_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2674 | [B2056_TX_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2675 | [B2056_TX_COM_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2676 | [B2056_TX_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2677 | [B2056_TX_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2678 | [B2056_TX_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2679 | [B2056_TX_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2680 | [B2056_TX_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2681 | [B2056_TX_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2682 | [B2056_TX_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2683 | [B2056_TX_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2684 | [B2056_TX_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2685 | [B2056_TX_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2686 | [B2056_TX_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2687 | [B2056_TX_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2688 | [B2056_TX_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2689 | [B2056_TX_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2690 | [B2056_TX_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2691 | [B2056_TX_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2692 | [B2056_TX_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2693 | [B2056_TX_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2694 | [B2056_TX_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2695 | [B2056_TX_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2696 | [B2056_TX_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2697 | [B2056_TX_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2698 | [B2056_TX_IQCAL_GAIN_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2699 | [B2056_TX_LOFT_FINE_I] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2700 | [B2056_TX_LOFT_FINE_Q] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2701 | [B2056_TX_LOFT_COARSE_I] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2702 | [B2056_TX_LOFT_COARSE_Q] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2703 | [B2056_TX_TX_COM_MASTER1] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 2704 | [B2056_TX_TX_COM_MASTER2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2705 | [B2056_TX_RXIQCAL_TXMUX] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2706 | [B2056_TX_TX_SSI_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2707 | [B2056_TX_IQCAL_VCM_HG] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2708 | [B2056_TX_IQCAL_IDAC] = { .ghz5 = 0x0037, .ghz2 = 0x0037, NOUPLOAD, }, | ||
| 2709 | [B2056_TX_TSSI_VCM] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2710 | [B2056_TX_TX_AMP_DET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2711 | [B2056_TX_TX_SSI_MUX] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2712 | [B2056_TX_TSSIA] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2713 | [B2056_TX_TSSIG] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2714 | [B2056_TX_TSSI_MISC1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2715 | [B2056_TX_TSSI_MISC2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2716 | [B2056_TX_TSSI_MISC3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2717 | [B2056_TX_PA_SPARE1] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 2718 | [B2056_TX_PA_SPARE2] = { .ghz5 = 0x00ee, .ghz2 = 0x00ee, UPLOAD, }, | ||
| 2719 | [B2056_TX_INTPAA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2720 | [B2056_TX_INTPAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2721 | [B2056_TX_INTPAA_BOOST_TUNE] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2722 | [B2056_TX_INTPAA_IAUX_STAT] = { .ghz5 = 0x0050, .ghz2 = 0x0050, UPLOAD, }, | ||
| 2723 | [B2056_TX_INTPAA_IAUX_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2724 | [B2056_TX_INTPAA_IMAIN_STAT] = { .ghz5 = 0x0050, .ghz2 = 0x0050, UPLOAD, }, | ||
| 2725 | [B2056_TX_INTPAA_IMAIN_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2726 | [B2056_TX_INTPAA_CASCBIAS] = { .ghz5 = 0x006e, .ghz2 = 0x006e, NOUPLOAD, }, | ||
| 2727 | [B2056_TX_INTPAA_PASLOPE] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 2728 | [B2056_TX_INTPAA_PA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2729 | [B2056_TX_INTPAG_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2730 | [B2056_TX_INTPAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2731 | [B2056_TX_INTPAG_BOOST_TUNE] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2732 | [B2056_TX_INTPAG_IAUX_STAT] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2733 | [B2056_TX_INTPAG_IAUX_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2734 | [B2056_TX_INTPAG_IMAIN_STAT] = { .ghz5 = 0x001e, .ghz2 = 0x001e, NOUPLOAD, }, | ||
| 2735 | [B2056_TX_INTPAG_IMAIN_DYN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2736 | [B2056_TX_INTPAG_CASCBIAS] = { .ghz5 = 0x006e, .ghz2 = 0x006e, NOUPLOAD, }, | ||
| 2737 | [B2056_TX_INTPAG_PASLOPE] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 2738 | [B2056_TX_INTPAG_PA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2739 | [B2056_TX_PADA_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2740 | [B2056_TX_PADA_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 2741 | [B2056_TX_PADA_CASCBIAS] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 2742 | [B2056_TX_PADA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2743 | [B2056_TX_PADA_BOOST_TUNE] = { .ghz5 = 0x0038, .ghz2 = 0x0038, NOUPLOAD, }, | ||
| 2744 | [B2056_TX_PADA_SLOPE] = { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, }, | ||
| 2745 | [B2056_TX_PADG_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2746 | [B2056_TX_PADG_IDAC] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2747 | [B2056_TX_PADG_CASCBIAS] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 2748 | [B2056_TX_PADG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2749 | [B2056_TX_PADG_BOOST_TUNE] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 2750 | [B2056_TX_PADG_SLOPE] = { .ghz5 = 0x0070, .ghz2 = 0x0070, UPLOAD, }, | ||
| 2751 | [B2056_TX_PGAA_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2752 | [B2056_TX_PGAA_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 2753 | [B2056_TX_PGAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2754 | [B2056_TX_PGAA_BOOST_TUNE] = { .ghz5 = 0x0083, .ghz2 = 0x0083, NOUPLOAD, }, | ||
| 2755 | [B2056_TX_PGAA_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, }, | ||
| 2756 | [B2056_TX_PGAA_MISC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2757 | [B2056_TX_PGAG_MASTER] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2758 | [B2056_TX_PGAG_IDAC] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2759 | [B2056_TX_PGAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2760 | [B2056_TX_PGAG_BOOST_TUNE] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 2761 | [B2056_TX_PGAG_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, UPLOAD, }, | ||
| 2762 | [B2056_TX_PGAG_MISC] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2763 | [B2056_TX_MIXA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2764 | [B2056_TX_MIXA_BOOST_TUNE] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 2765 | [B2056_TX_MIXG] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2766 | [B2056_TX_MIXG_BOOST_TUNE] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 2767 | [B2056_TX_BB_GM_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2768 | [B2056_TX_GMBB_GM] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2769 | [B2056_TX_GMBB_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, | ||
| 2770 | [B2056_TX_TXLPF_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2771 | [B2056_TX_TXLPF_RCCAL] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 2772 | [B2056_TX_TXLPF_RCCAL_OFF0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2773 | [B2056_TX_TXLPF_RCCAL_OFF1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2774 | [B2056_TX_TXLPF_RCCAL_OFF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2775 | [B2056_TX_TXLPF_RCCAL_OFF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2776 | [B2056_TX_TXLPF_RCCAL_OFF4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2777 | [B2056_TX_TXLPF_RCCAL_OFF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2778 | [B2056_TX_TXLPF_RCCAL_OFF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2779 | [B2056_TX_TXLPF_BW] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2780 | [B2056_TX_TXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2781 | [B2056_TX_TXLPF_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2782 | [B2056_TX_TXLPF_IDAC_0] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 2783 | [B2056_TX_TXLPF_IDAC_1] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 2784 | [B2056_TX_TXLPF_IDAC_2] = { .ghz5 = 0x000e, .ghz2 = 0x000e, NOUPLOAD, }, | ||
| 2785 | [B2056_TX_TXLPF_IDAC_3] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 2786 | [B2056_TX_TXLPF_IDAC_4] = { .ghz5 = 0x0013, .ghz2 = 0x0013, NOUPLOAD, }, | ||
| 2787 | [B2056_TX_TXLPF_IDAC_5] = { .ghz5 = 0x001b, .ghz2 = 0x001b, NOUPLOAD, }, | ||
| 2788 | [B2056_TX_TXLPF_IDAC_6] = { .ghz5 = 0x001b, .ghz2 = 0x001b, NOUPLOAD, }, | ||
| 2789 | [B2056_TX_TXLPF_OPAMP_IDAC] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 2790 | [B2056_TX_TXLPF_MISC] = { .ghz5 = 0x005b, .ghz2 = 0x005b, NOUPLOAD, }, | ||
| 2791 | [B2056_TX_TXSPARE1] = { .ghz5 = 0x0030, .ghz2 = 0x0030, UPLOAD, }, | ||
| 2792 | [B2056_TX_TXSPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2793 | [B2056_TX_TXSPARE3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2794 | [B2056_TX_TXSPARE4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2795 | [B2056_TX_TXSPARE5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2796 | [B2056_TX_TXSPARE6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2797 | [B2056_TX_TXSPARE7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2798 | [B2056_TX_TXSPARE8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2799 | [B2056_TX_TXSPARE9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2800 | [B2056_TX_TXSPARE10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2801 | [B2056_TX_TXSPARE11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2802 | [B2056_TX_TXSPARE12] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2803 | [B2056_TX_TXSPARE13] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2804 | [B2056_TX_TXSPARE14] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2805 | [B2056_TX_TXSPARE15] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2806 | [B2056_TX_TXSPARE16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2807 | [B2056_TX_STATUS_INTPA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2808 | [B2056_TX_STATUS_PAD_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2809 | [B2056_TX_STATUS_PGA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2810 | [B2056_TX_STATUS_GM_TXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2811 | [B2056_TX_STATUS_TXLPF_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2812 | [B2056_TX_STATUS_TXLPF_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2813 | [B2056_TX_GMBB_IDAC0] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 2814 | [B2056_TX_GMBB_IDAC1] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 2815 | [B2056_TX_GMBB_IDAC2] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 2816 | [B2056_TX_GMBB_IDAC3] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 2817 | [B2056_TX_GMBB_IDAC4] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 2818 | [B2056_TX_GMBB_IDAC5] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 2819 | [B2056_TX_GMBB_IDAC6] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 2820 | [B2056_TX_GMBB_IDAC7] = { .ghz5 = 0x0070, .ghz2 = 0x0070, NOUPLOAD, }, | ||
| 2821 | }; | ||
| 2822 | |||
| 2823 | static const struct b2056_inittab_entry b2056_inittab_rev8_rx[] = { | ||
| 2824 | [B2056_RX_RESERVED_ADDR2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2825 | [B2056_RX_RESERVED_ADDR3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2826 | [B2056_RX_RESERVED_ADDR4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2827 | [B2056_RX_RESERVED_ADDR5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2828 | [B2056_RX_RESERVED_ADDR6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2829 | [B2056_RX_RESERVED_ADDR7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2830 | [B2056_RX_COM_CTRL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2831 | [B2056_RX_COM_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2832 | [B2056_RX_COM_OVR] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2833 | [B2056_RX_COM_RESET] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2834 | [B2056_RX_COM_RCAL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2835 | [B2056_RX_COM_RC_RXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2836 | [B2056_RX_COM_RC_TXLPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2837 | [B2056_RX_COM_RC_RXHPF] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2838 | [B2056_RX_RESERVED_ADDR16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2839 | [B2056_RX_RESERVED_ADDR17] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2840 | [B2056_RX_RESERVED_ADDR18] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2841 | [B2056_RX_RESERVED_ADDR19] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2842 | [B2056_RX_RESERVED_ADDR20] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2843 | [B2056_RX_RESERVED_ADDR21] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2844 | [B2056_RX_RESERVED_ADDR22] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2845 | [B2056_RX_RESERVED_ADDR23] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2846 | [B2056_RX_RESERVED_ADDR24] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2847 | [B2056_RX_RESERVED_ADDR25] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2848 | [B2056_RX_RESERVED_ADDR26] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2849 | [B2056_RX_RESERVED_ADDR27] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2850 | [B2056_RX_RESERVED_ADDR28] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2851 | [B2056_RX_RESERVED_ADDR29] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2852 | [B2056_RX_RESERVED_ADDR30] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2853 | [B2056_RX_RESERVED_ADDR31] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2854 | [B2056_RX_RXIQCAL_RXMUX] = { .ghz5 = 0x0003, .ghz2 = 0x0003, NOUPLOAD, }, | ||
| 2855 | [B2056_RX_RSSI_PU] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2856 | [B2056_RX_RSSI_SEL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2857 | [B2056_RX_RSSI_GAIN] = { .ghz5 = 0x0090, .ghz2 = 0x0090, NOUPLOAD, }, | ||
| 2858 | [B2056_RX_RSSI_NB_IDAC] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 2859 | [B2056_RX_RSSI_WB2I_IDAC_1] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 2860 | [B2056_RX_RSSI_WB2I_IDAC_2] = { .ghz5 = 0x0005, .ghz2 = 0x0005, NOUPLOAD, }, | ||
| 2861 | [B2056_RX_RSSI_WB2Q_IDAC_1] = { .ghz5 = 0x0015, .ghz2 = 0x0015, NOUPLOAD, }, | ||
| 2862 | [B2056_RX_RSSI_WB2Q_IDAC_2] = { .ghz5 = 0x0005, .ghz2 = 0x0005, NOUPLOAD, }, | ||
| 2863 | [B2056_RX_RSSI_POLE] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 2864 | [B2056_RX_RSSI_WB1_IDAC] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 2865 | [B2056_RX_RSSI_MISC] = { .ghz5 = 0x0090, .ghz2 = 0x0090, NOUPLOAD, }, | ||
| 2866 | [B2056_RX_LNAA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2867 | [B2056_RX_LNAA_TUNE] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2868 | [B2056_RX_LNAA_GAIN] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 2869 | [B2056_RX_LNA_A_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 2870 | [B2056_RX_BIASPOLE_LNAA1_IDAC] = { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, }, | ||
| 2871 | [B2056_RX_LNAA2_IDAC] = { .ghz5 = 0x00ff, .ghz2 = 0x00ff, UPLOAD, }, | ||
| 2872 | [B2056_RX_LNA1A_MISC] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 2873 | [B2056_RX_LNAG_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2874 | [B2056_RX_LNAG_TUNE] = { .ghz5 = 0x0088, .ghz2 = 0x0088, NOUPLOAD, }, | ||
| 2875 | [B2056_RX_LNAG_GAIN] = { .ghz5 = 0x0032, .ghz2 = 0x0032, NOUPLOAD, }, | ||
| 2876 | [B2056_RX_LNA_G_SLOPE] = { .ghz5 = 0x0077, .ghz2 = 0x0077, NOUPLOAD, }, | ||
| 2877 | [B2056_RX_BIASPOLE_LNAG1_IDAC] = { .ghz5 = 0x0017, .ghz2 = 0x0017, UPLOAD, }, | ||
| 2878 | [B2056_RX_LNAG2_IDAC] = { .ghz5 = 0x00f0, .ghz2 = 0x00f0, UPLOAD, }, | ||
| 2879 | [B2056_RX_LNA1G_MISC] = { .ghz5 = 0x0020, .ghz2 = 0x0020, NOUPLOAD, }, | ||
| 2880 | [B2056_RX_MIXA_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 2881 | [B2056_RX_MIXA_VCM] = { .ghz5 = 0x0055, .ghz2 = 0x0055, UPLOAD, }, | ||
| 2882 | [B2056_RX_MIXA_CTRLPTAT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2883 | [B2056_RX_MIXA_LOB_BIAS] = { .ghz5 = 0x0088, .ghz2 = 0x0088, UPLOAD, }, | ||
| 2884 | [B2056_RX_MIXA_CORE_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2885 | [B2056_RX_MIXA_CMFB_IDAC] = { .ghz5 = 0x0044, .ghz2 = 0x0044, NOUPLOAD, }, | ||
| 2886 | [B2056_RX_MIXA_BIAS_AUX] = { .ghz5 = 0x0007, .ghz2 = 0x0007, UPLOAD, }, | ||
| 2887 | [B2056_RX_MIXA_BIAS_MAIN] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 2888 | [B2056_RX_MIXA_BIAS_MISC] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 2889 | [B2056_RX_MIXA_MAST_BIAS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2890 | [B2056_RX_MIXG_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 2891 | [B2056_RX_MIXG_VCM] = { .ghz5 = 0x0055, .ghz2 = 0x0055, UPLOAD, }, | ||
| 2892 | [B2056_RX_MIXG_CTRLPTAT] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2893 | [B2056_RX_MIXG_LOB_BIAS] = { .ghz5 = 0x0011, .ghz2 = 0x0011, NOUPLOAD, }, | ||
| 2894 | [B2056_RX_MIXG_CORE_IDAC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2895 | [B2056_RX_MIXG_CMFB_IDAC] = { .ghz5 = 0x0044, .ghz2 = 0x0044, NOUPLOAD, }, | ||
| 2896 | [B2056_RX_MIXG_BIAS_AUX] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 2897 | [B2056_RX_MIXG_BIAS_MAIN] = { .ghz5 = 0x0006, .ghz2 = 0x0006, NOUPLOAD, }, | ||
| 2898 | [B2056_RX_MIXG_BIAS_MISC] = { .ghz5 = 0x0004, .ghz2 = 0x0004, NOUPLOAD, }, | ||
| 2899 | [B2056_RX_MIXG_MAST_BIAS] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2900 | [B2056_RX_TIA_MASTER] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2901 | [B2056_RX_TIA_IOPAMP] = { .ghz5 = 0x0026, .ghz2 = 0x0026, UPLOAD, }, | ||
| 2902 | [B2056_RX_TIA_QOPAMP] = { .ghz5 = 0x0026, .ghz2 = 0x0026, UPLOAD, }, | ||
| 2903 | [B2056_RX_TIA_IMISC] = { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, }, | ||
| 2904 | [B2056_RX_TIA_QMISC] = { .ghz5 = 0x000f, .ghz2 = 0x000f, UPLOAD, }, | ||
| 2905 | [B2056_RX_TIA_GAIN] = { .ghz5 = 0x0044, .ghz2 = 0x0044, NOUPLOAD, }, | ||
| 2906 | [B2056_RX_TIA_SPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2907 | [B2056_RX_TIA_SPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2908 | [B2056_RX_BB_LPF_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 2909 | [B2056_RX_AACI_MASTER] = { .ghz5 = 0x0008, .ghz2 = 0x0008, NOUPLOAD, }, | ||
| 2910 | [B2056_RX_RXLPF_IDAC] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 2911 | [B2056_RX_RXLPF_OPAMPBIAS_LOWQ] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 2912 | [B2056_RX_RXLPF_OPAMPBIAS_HIGHQ]= { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 2913 | [B2056_RX_RXLPF_BIAS_DCCANCEL] = { .ghz5 = 0x0002, .ghz2 = 0x0002, NOUPLOAD, }, | ||
| 2914 | [B2056_RX_RXLPF_OUTVCM] = { .ghz5 = 0x0004, .ghz2 = 0x0004, UPLOAD, }, | ||
| 2915 | [B2056_RX_RXLPF_INVCM_BODY] = { .ghz5 = 0x0007, .ghz2 = 0x0007, NOUPLOAD, }, | ||
| 2916 | [B2056_RX_RXLPF_CC_OP] = { .ghz5 = 0x0055, .ghz2 = 0x0055, NOUPLOAD, }, | ||
| 2917 | [B2056_RX_RXLPF_GAIN] = { .ghz5 = 0x0023, .ghz2 = 0x0023, NOUPLOAD, }, | ||
| 2918 | [B2056_RX_RXLPF_Q_BW] = { .ghz5 = 0x0041, .ghz2 = 0x0041, NOUPLOAD, }, | ||
| 2919 | [B2056_RX_RXLPF_HP_CORNER_BW] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2920 | [B2056_RX_RXLPF_RCCAL_HPC] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 2921 | [B2056_RX_RXHPF_OFF0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2922 | [B2056_RX_RXHPF_OFF1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2923 | [B2056_RX_RXHPF_OFF2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2924 | [B2056_RX_RXHPF_OFF3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2925 | [B2056_RX_RXHPF_OFF4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2926 | [B2056_RX_RXHPF_OFF5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2927 | [B2056_RX_RXHPF_OFF6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2928 | [B2056_RX_RXHPF_OFF7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2929 | [B2056_RX_RXLPF_RCCAL_LPC] = { .ghz5 = 0x000c, .ghz2 = 0x000c, NOUPLOAD, }, | ||
| 2930 | [B2056_RX_RXLPF_OFF_0] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2931 | [B2056_RX_RXLPF_OFF_1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2932 | [B2056_RX_RXLPF_OFF_2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2933 | [B2056_RX_RXLPF_OFF_3] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2934 | [B2056_RX_RXLPF_OFF_4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2935 | [B2056_RX_UNUSED] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2936 | [B2056_RX_VGA_MASTER] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 2937 | [B2056_RX_VGA_BIAS] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 2938 | [B2056_RX_VGA_BIAS_DCCANCEL] = { .ghz5 = 0x0000, .ghz2 = 0x0000, UPLOAD, }, | ||
| 2939 | [B2056_RX_VGA_GAIN] = { .ghz5 = 0x000a, .ghz2 = 0x000a, NOUPLOAD, }, | ||
| 2940 | [B2056_RX_VGA_HP_CORNER_BW] = { .ghz5 = 0x0001, .ghz2 = 0x0001, NOUPLOAD, }, | ||
| 2941 | [B2056_RX_VGABUF_BIAS] = { .ghz5 = 0x0022, .ghz2 = 0x0022, NOUPLOAD, }, | ||
| 2942 | [B2056_RX_VGABUF_GAIN_BW] = { .ghz5 = 0x0030, .ghz2 = 0x0030, NOUPLOAD, }, | ||
| 2943 | [B2056_RX_TXFBMIX_A] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2944 | [B2056_RX_TXFBMIX_G] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2945 | [B2056_RX_RXSPARE1] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2946 | [B2056_RX_RXSPARE2] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2947 | [B2056_RX_RXSPARE3] = { .ghz5 = 0x0005, .ghz2 = 0x0005, UPLOAD, }, | ||
| 2948 | [B2056_RX_RXSPARE4] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2949 | [B2056_RX_RXSPARE5] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2950 | [B2056_RX_RXSPARE6] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2951 | [B2056_RX_RXSPARE7] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2952 | [B2056_RX_RXSPARE8] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2953 | [B2056_RX_RXSPARE9] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2954 | [B2056_RX_RXSPARE10] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2955 | [B2056_RX_RXSPARE11] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2956 | [B2056_RX_RXSPARE12] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2957 | [B2056_RX_RXSPARE13] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2958 | [B2056_RX_RXSPARE14] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2959 | [B2056_RX_RXSPARE15] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2960 | [B2056_RX_RXSPARE16] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2961 | [B2056_RX_STATUS_LNAA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2962 | [B2056_RX_STATUS_LNAG_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2963 | [B2056_RX_STATUS_MIXTIA_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2964 | [B2056_RX_STATUS_RXLPF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2965 | [B2056_RX_STATUS_VGA_BUF_GAIN] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2966 | [B2056_RX_STATUS_RXLPF_Q] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2967 | [B2056_RX_STATUS_RXLPF_BUF_BW] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2968 | [B2056_RX_STATUS_RXLPF_VGA_HPC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2969 | [B2056_RX_STATUS_RXLPF_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2970 | [B2056_RX_STATUS_HPC_RC] = { .ghz5 = 0x0000, .ghz2 = 0x0000, NOUPLOAD, }, | ||
| 2971 | }; | ||
| 2972 | |||
| 2973 | #define INITTABSPTS(prefix) \ | ||
| 2974 | .syn = prefix##_syn, \ | ||
| 2975 | .syn_length = ARRAY_SIZE(prefix##_syn), \ | ||
| 2976 | .tx = prefix##_tx, \ | ||
| 2977 | .tx_length = ARRAY_SIZE(prefix##_tx), \ | ||
| 2978 | .rx = prefix##_rx, \ | ||
| 2979 | .rx_length = ARRAY_SIZE(prefix##_rx) | ||
| 2980 | |||
| 2981 | struct b2056_inittabs_pts b2056_inittabs[] = { | ||
| 2982 | [3] = { INITTABSPTS(b2056_inittab_rev3) }, | ||
| 2983 | [4] = { INITTABSPTS(b2056_inittab_rev4) }, | ||
| 2984 | [5] = { INITTABSPTS(b2056_inittab_rev5) }, | ||
| 2985 | [6] = { INITTABSPTS(b2056_inittab_rev6) }, | ||
| 2986 | [7] = { INITTABSPTS(b2056_inittab_rev7) }, | ||
| 2987 | [8] = { INITTABSPTS(b2056_inittab_rev8) }, | ||
| 2988 | [9] = { INITTABSPTS(b2056_inittab_rev7) }, | ||
| 2989 | }; | ||
| 2990 | |||
| 27 | #define RADIOREGS3(r00, r01, r02, r03, r04, r05, r06, r07, r08, r09, \ | 2991 | #define RADIOREGS3(r00, r01, r02, r03, r04, r05, r06, r07, r08, r09, \ |
| 28 | r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, \ | 2992 | r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, \ |
| 29 | r20, r21, r22, r23, r24, r25, r26, r27, r28, r29, \ | 2993 | r20, r21, r22, r23, r24, r25, r26, r27, r28, r29, \ |
| @@ -6045,15 +9009,88 @@ static const struct b43_nphy_channeltab_entry_rev3 b43_nphy_channeltab_rev8[] = | |||
| 6045 | }, | 9009 | }, |
| 6046 | }; | 9010 | }; |
| 6047 | 9011 | ||
| 6048 | /* TODO: add support for rev4+ devices by searching in rev4+ tables */ | 9012 | static void b2056_upload_inittab(struct b43_wldev *dev, bool ghz5, |
| 9013 | bool ignore_uploadflag, u16 routing, | ||
| 9014 | const struct b2056_inittab_entry *e, | ||
| 9015 | unsigned int length) | ||
| 9016 | { | ||
| 9017 | unsigned int i; | ||
| 9018 | u16 value; | ||
| 9019 | |||
| 9020 | for (i = 0; i < length; i++, e++) { | ||
| 9021 | if (!(e->flags & B2056_INITTAB_ENTRY_OK)) | ||
| 9022 | continue; | ||
| 9023 | if ((e->flags & B2056_INITTAB_UPLOAD) || ignore_uploadflag) { | ||
| 9024 | if (ghz5) | ||
| 9025 | value = e->ghz5; | ||
| 9026 | else | ||
| 9027 | value = e->ghz2; | ||
| 9028 | b43_radio_write(dev, routing | i, value); | ||
| 9029 | } | ||
| 9030 | } | ||
| 9031 | } | ||
| 9032 | |||
| 9033 | void b2056_upload_inittabs(struct b43_wldev *dev, | ||
| 9034 | bool ghz5, bool ignore_uploadflag) | ||
| 9035 | { | ||
| 9036 | struct b2056_inittabs_pts *pts; | ||
| 9037 | |||
| 9038 | if (dev->phy.rev >= ARRAY_SIZE(b2056_inittabs)) { | ||
| 9039 | B43_WARN_ON(1); | ||
| 9040 | return; | ||
| 9041 | } | ||
| 9042 | pts = &b2056_inittabs[dev->phy.rev]; | ||
| 9043 | |||
| 9044 | b2056_upload_inittab(dev, ghz5, ignore_uploadflag, | ||
| 9045 | B2056_SYN, pts->syn, pts->syn_length); | ||
| 9046 | b2056_upload_inittab(dev, ghz5, ignore_uploadflag, | ||
| 9047 | B2056_TX0, pts->tx, pts->tx_length); | ||
| 9048 | b2056_upload_inittab(dev, ghz5, ignore_uploadflag, | ||
| 9049 | B2056_TX1, pts->tx, pts->tx_length); | ||
| 9050 | b2056_upload_inittab(dev, ghz5, ignore_uploadflag, | ||
| 9051 | B2056_RX0, pts->rx, pts->rx_length); | ||
| 9052 | b2056_upload_inittab(dev, ghz5, ignore_uploadflag, | ||
| 9053 | B2056_RX1, pts->rx, pts->rx_length); | ||
| 9054 | } | ||
| 9055 | |||
| 6049 | const struct b43_nphy_channeltab_entry_rev3 * | 9056 | const struct b43_nphy_channeltab_entry_rev3 * |
| 6050 | b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq) | 9057 | b43_nphy_get_chantabent_rev3(struct b43_wldev *dev, u16 freq) |
| 6051 | { | 9058 | { |
| 6052 | const struct b43_nphy_channeltab_entry_rev3 *e; | 9059 | const struct b43_nphy_channeltab_entry_rev3 *e; |
| 6053 | unsigned int i; | 9060 | unsigned int length, i; |
| 9061 | |||
| 9062 | switch (dev->phy.rev) { | ||
| 9063 | case 3: | ||
| 9064 | e = b43_nphy_channeltab_rev3; | ||
| 9065 | length = ARRAY_SIZE(b43_nphy_channeltab_rev3); | ||
| 9066 | break; | ||
| 9067 | case 4: | ||
| 9068 | e = b43_nphy_channeltab_rev4; | ||
| 9069 | length = ARRAY_SIZE(b43_nphy_channeltab_rev4); | ||
| 9070 | break; | ||
| 9071 | case 5: | ||
| 9072 | e = b43_nphy_channeltab_rev5; | ||
| 9073 | length = ARRAY_SIZE(b43_nphy_channeltab_rev5); | ||
| 9074 | break; | ||
| 9075 | case 6: | ||
| 9076 | e = b43_nphy_channeltab_rev6; | ||
| 9077 | length = ARRAY_SIZE(b43_nphy_channeltab_rev6); | ||
| 9078 | break; | ||
| 9079 | case 7: | ||
| 9080 | case 9: | ||
| 9081 | e = b43_nphy_channeltab_rev7_9; | ||
| 9082 | length = ARRAY_SIZE(b43_nphy_channeltab_rev7_9); | ||
| 9083 | break; | ||
| 9084 | case 8: | ||
| 9085 | e = b43_nphy_channeltab_rev8; | ||
| 9086 | length = ARRAY_SIZE(b43_nphy_channeltab_rev8); | ||
| 9087 | break; | ||
| 9088 | default: | ||
| 9089 | B43_WARN_ON(1); | ||
| 9090 | return NULL; | ||
| 9091 | } | ||
| 6054 | 9092 | ||
| 6055 | for (i = 0; i < ARRAY_SIZE(b43_nphy_channeltab_rev3); i++) { | 9093 | for (i = 0; i < length; i++, e++) { |
| 6056 | e = &(b43_nphy_channeltab_rev3[i]); | ||
| 6057 | if (e->freq == freq) | 9094 | if (e->freq == freq) |
| 6058 | return e; | 9095 | return e; |
| 6059 | } | 9096 | } |
diff --git a/drivers/net/wireless/b43/radio_2056.h b/drivers/net/wireless/b43/radio_2056.h index 302600c0afa4..d601f6e7e313 100644 --- a/drivers/net/wireless/b43/radio_2056.h +++ b/drivers/net/wireless/b43/radio_2056.h | |||
| @@ -1114,4 +1114,7 @@ struct b43_nphy_channeltab_entry_rev3 { | |||
| 1114 | struct b43_phy_n_sfo_cfg phy_regs; | 1114 | struct b43_phy_n_sfo_cfg phy_regs; |
| 1115 | }; | 1115 | }; |
| 1116 | 1116 | ||
| 1117 | void b2056_upload_inittabs(struct b43_wldev *dev, | ||
| 1118 | bool ghz5, bool ignore_uploadflag); | ||
| 1119 | |||
| 1117 | #endif /* B43_RADIO_2056_H_ */ | 1120 | #endif /* B43_RADIO_2056_H_ */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index f4bec3201ef9..af505bcd7ae0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
| @@ -596,12 +596,7 @@ struct iwl_cfg iwl6005_2bg_cfg = { | |||
| 596 | .need_dc_calib = true, \ | 596 | .need_dc_calib = true, \ |
| 597 | .need_temp_offset_calib = true, \ | 597 | .need_temp_offset_calib = true, \ |
| 598 | .led_mode = IWL_LED_RF_STATE, \ | 598 | .led_mode = IWL_LED_RF_STATE, \ |
| 599 | .adv_pm = true, \ | 599 | .adv_pm = true \ |
| 600 | /* \ | ||
| 601 | *Due to bluetooth, we transmit 2.4 GHz probes \ | ||
| 602 | * only on antenna A \ | ||
| 603 | */ \ | ||
| 604 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A | ||
| 605 | 600 | ||
| 606 | struct iwl_cfg iwl6030_2agn_cfg = { | 601 | struct iwl_cfg iwl6030_2agn_cfg = { |
| 607 | .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN", | 602 | .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN", |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 4bc82fcf1652..3dee87e8f55d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
| @@ -1492,15 +1492,11 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
| 1492 | if (priv->cfg->scan_rx_antennas[band]) | 1492 | if (priv->cfg->scan_rx_antennas[band]) |
| 1493 | rx_ant = priv->cfg->scan_rx_antennas[band]; | 1493 | rx_ant = priv->cfg->scan_rx_antennas[band]; |
| 1494 | 1494 | ||
| 1495 | if (priv->cfg->scan_tx_antennas[band]) | 1495 | if (band == IEEE80211_BAND_2GHZ && |
| 1496 | scan_tx_antennas = priv->cfg->scan_tx_antennas[band]; | 1496 | priv->cfg->bt_params && |
| 1497 | 1497 | priv->cfg->bt_params->advanced_bt_coexist) { | |
| 1498 | if (priv->cfg->bt_params && | 1498 | /* transmit 2.4 GHz probes only on first antenna */ |
| 1499 | priv->cfg->bt_params->advanced_bt_coexist && | 1499 | scan_tx_antennas = first_antenna(scan_tx_antennas); |
| 1500 | priv->bt_full_concurrent) { | ||
| 1501 | /* operated as 1x1 in full concurrency mode */ | ||
| 1502 | scan_tx_antennas = first_antenna( | ||
| 1503 | priv->cfg->scan_tx_antennas[band]); | ||
| 1504 | } | 1500 | } |
| 1505 | 1501 | ||
| 1506 | priv->scan_tx_ant[band] = iwl_toggle_tx_ant(priv, priv->scan_tx_ant[band], | 1502 | priv->scan_tx_ant[band] = iwl_toggle_tx_ant(priv, priv->scan_tx_ant[band], |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index d4075476670a..f13a83a7e62b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
| @@ -3280,9 +3280,10 @@ void iwlagn_mac_stop(struct ieee80211_hw *hw) | |||
| 3280 | 3280 | ||
| 3281 | flush_workqueue(priv->workqueue); | 3281 | flush_workqueue(priv->workqueue); |
| 3282 | 3282 | ||
| 3283 | /* enable interrupts again in order to receive rfkill changes */ | 3283 | /* User space software may expect getting rfkill changes |
| 3284 | * even if interface is down */ | ||
| 3284 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); | 3285 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); |
| 3285 | iwl_enable_interrupts(priv); | 3286 | iwl_enable_rfkill_int(priv); |
| 3286 | 3287 | ||
| 3287 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 3288 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
| 3288 | } | 3289 | } |
| @@ -3634,7 +3635,8 @@ void iwlagn_configure_filter(struct ieee80211_hw *hw, | |||
| 3634 | changed_flags, *total_flags); | 3635 | changed_flags, *total_flags); |
| 3635 | 3636 | ||
| 3636 | CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK); | 3637 | CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK); |
| 3637 | CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK); | 3638 | /* Setting _just_ RXON_FILTER_CTL2HOST_MSK causes FH errors */ |
| 3639 | CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK | RXON_FILTER_PROMISC_MSK); | ||
| 3638 | CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK); | 3640 | CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK); |
| 3639 | 3641 | ||
| 3640 | #undef CHK | 3642 | #undef CHK |
| @@ -4190,14 +4192,14 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 4190 | * 8. Enable interrupts and read RFKILL state | 4192 | * 8. Enable interrupts and read RFKILL state |
| 4191 | *********************************************/ | 4193 | *********************************************/ |
| 4192 | 4194 | ||
| 4193 | /* enable interrupts if needed: hw bug w/a */ | 4195 | /* enable rfkill interrupt: hw bug w/a */ |
| 4194 | pci_read_config_word(priv->pci_dev, PCI_COMMAND, &pci_cmd); | 4196 | pci_read_config_word(priv->pci_dev, PCI_COMMAND, &pci_cmd); |
| 4195 | if (pci_cmd & PCI_COMMAND_INTX_DISABLE) { | 4197 | if (pci_cmd & PCI_COMMAND_INTX_DISABLE) { |
| 4196 | pci_cmd &= ~PCI_COMMAND_INTX_DISABLE; | 4198 | pci_cmd &= ~PCI_COMMAND_INTX_DISABLE; |
| 4197 | pci_write_config_word(priv->pci_dev, PCI_COMMAND, pci_cmd); | 4199 | pci_write_config_word(priv->pci_dev, PCI_COMMAND, pci_cmd); |
| 4198 | } | 4200 | } |
| 4199 | 4201 | ||
| 4200 | iwl_enable_interrupts(priv); | 4202 | iwl_enable_rfkill_int(priv); |
| 4201 | 4203 | ||
| 4202 | /* If platform's RF_KILL switch is NOT set to KILL */ | 4204 | /* If platform's RF_KILL switch is NOT set to KILL */ |
| 4203 | if (iwl_read32(priv, CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) | 4205 | if (iwl_read32(priv, CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) |
| @@ -4411,7 +4413,7 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { | |||
| 4411 | {IWL_PCI_DEVICE(0x4239, 0x1311, iwl6000i_2agn_cfg)}, | 4413 | {IWL_PCI_DEVICE(0x4239, 0x1311, iwl6000i_2agn_cfg)}, |
| 4412 | {IWL_PCI_DEVICE(0x4239, 0x1316, iwl6000i_2abg_cfg)}, | 4414 | {IWL_PCI_DEVICE(0x4239, 0x1316, iwl6000i_2abg_cfg)}, |
| 4413 | 4415 | ||
| 4414 | /* 6x00 Series Gen2a */ | 4416 | /* 6x05 Series */ |
| 4415 | {IWL_PCI_DEVICE(0x0082, 0x1301, iwl6005_2agn_cfg)}, | 4417 | {IWL_PCI_DEVICE(0x0082, 0x1301, iwl6005_2agn_cfg)}, |
| 4416 | {IWL_PCI_DEVICE(0x0082, 0x1306, iwl6005_2abg_cfg)}, | 4418 | {IWL_PCI_DEVICE(0x0082, 0x1306, iwl6005_2abg_cfg)}, |
| 4417 | {IWL_PCI_DEVICE(0x0082, 0x1307, iwl6005_2bg_cfg)}, | 4419 | {IWL_PCI_DEVICE(0x0082, 0x1307, iwl6005_2bg_cfg)}, |
| @@ -4420,7 +4422,7 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { | |||
| 4420 | {IWL_PCI_DEVICE(0x0085, 0x1311, iwl6005_2agn_cfg)}, | 4422 | {IWL_PCI_DEVICE(0x0085, 0x1311, iwl6005_2agn_cfg)}, |
| 4421 | {IWL_PCI_DEVICE(0x0085, 0x1316, iwl6005_2abg_cfg)}, | 4423 | {IWL_PCI_DEVICE(0x0085, 0x1316, iwl6005_2abg_cfg)}, |
| 4422 | 4424 | ||
| 4423 | /* 6x00 Series Gen2b */ | 4425 | /* 6x30 Series */ |
| 4424 | {IWL_PCI_DEVICE(0x008A, 0x5305, iwl1030_bgn_cfg)}, | 4426 | {IWL_PCI_DEVICE(0x008A, 0x5305, iwl1030_bgn_cfg)}, |
| 4425 | {IWL_PCI_DEVICE(0x008A, 0x5307, iwl1030_bg_cfg)}, | 4427 | {IWL_PCI_DEVICE(0x008A, 0x5307, iwl1030_bg_cfg)}, |
| 4426 | {IWL_PCI_DEVICE(0x008A, 0x5325, iwl1030_bgn_cfg)}, | 4428 | {IWL_PCI_DEVICE(0x008A, 0x5325, iwl1030_bgn_cfg)}, |
| @@ -4446,7 +4448,7 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { | |||
| 4446 | {IWL_PCI_DEVICE(0x0089, 0x1311, iwl6050_2agn_cfg)}, | 4448 | {IWL_PCI_DEVICE(0x0089, 0x1311, iwl6050_2agn_cfg)}, |
| 4447 | {IWL_PCI_DEVICE(0x0089, 0x1316, iwl6050_2abg_cfg)}, | 4449 | {IWL_PCI_DEVICE(0x0089, 0x1316, iwl6050_2abg_cfg)}, |
| 4448 | 4450 | ||
| 4449 | /* 6x50 WiFi/WiMax Series Gen2 */ | 4451 | /* 6150 WiFi/WiMax Series */ |
| 4450 | {IWL_PCI_DEVICE(0x0885, 0x1305, iwl6150_bgn_cfg)}, | 4452 | {IWL_PCI_DEVICE(0x0885, 0x1305, iwl6150_bgn_cfg)}, |
| 4451 | {IWL_PCI_DEVICE(0x0885, 0x1306, iwl6150_bgn_cfg)}, | 4453 | {IWL_PCI_DEVICE(0x0885, 0x1306, iwl6150_bgn_cfg)}, |
| 4452 | {IWL_PCI_DEVICE(0x0885, 0x1325, iwl6150_bgn_cfg)}, | 4454 | {IWL_PCI_DEVICE(0x0885, 0x1325, iwl6150_bgn_cfg)}, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index f80685ad2674..a3474376fdbc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
| @@ -411,7 +411,6 @@ struct iwl_cfg { | |||
| 411 | const bool need_dc_calib; /* if used set to true */ | 411 | const bool need_dc_calib; /* if used set to true */ |
| 412 | const bool need_temp_offset_calib; /* if used set to true */ | 412 | const bool need_temp_offset_calib; /* if used set to true */ |
| 413 | u8 scan_rx_antennas[IEEE80211_NUM_BANDS]; | 413 | u8 scan_rx_antennas[IEEE80211_NUM_BANDS]; |
| 414 | u8 scan_tx_antennas[IEEE80211_NUM_BANDS]; | ||
| 415 | enum iwl_led_mode led_mode; | 414 | enum iwl_led_mode led_mode; |
| 416 | const bool adv_pm; | 415 | const bool adv_pm; |
| 417 | const bool rx_with_siso_diversity; | 416 | const bool rx_with_siso_diversity; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h b/drivers/net/wireless/iwlwifi/iwl-helpers.h index 3f5bedd8875f..8821f088ba7f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-helpers.h +++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h | |||
| @@ -148,6 +148,12 @@ static inline void iwl_disable_interrupts(struct iwl_priv *priv) | |||
| 148 | IWL_DEBUG_ISR(priv, "Disabled interrupts\n"); | 148 | IWL_DEBUG_ISR(priv, "Disabled interrupts\n"); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | static inline void iwl_enable_rfkill_int(struct iwl_priv *priv) | ||
| 152 | { | ||
| 153 | IWL_DEBUG_ISR(priv, "Enabling rfkill interrupt\n"); | ||
| 154 | iwl_write32(priv, CSR_INT_MASK, CSR_INT_BIT_RF_KILL); | ||
| 155 | } | ||
| 156 | |||
| 151 | static inline void iwl_enable_interrupts(struct iwl_priv *priv) | 157 | static inline void iwl_enable_interrupts(struct iwl_priv *priv) |
| 152 | { | 158 | { |
| 153 | IWL_DEBUG_ISR(priv, "Enabling interrupts\n"); | 159 | IWL_DEBUG_ISR(priv, "Enabling interrupts\n"); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c index 516e5577ed2a..46ccdf406e8e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-led.c +++ b/drivers/net/wireless/iwlwifi/iwl-led.c | |||
| @@ -45,7 +45,7 @@ | |||
| 45 | /* default: IWL_LED_BLINK(0) using blinking index table */ | 45 | /* default: IWL_LED_BLINK(0) using blinking index table */ |
| 46 | static int led_mode; | 46 | static int led_mode; |
| 47 | module_param(led_mode, int, S_IRUGO); | 47 | module_param(led_mode, int, S_IRUGO); |
| 48 | MODULE_PARM_DESC(led_mode, "led mode: 0=system default, " | 48 | MODULE_PARM_DESC(led_mode, "0=system default, " |
| 49 | "1=On(RF On)/Off(RF Off), 2=blinking"); | 49 | "1=On(RF On)/Off(RF Off), 2=blinking"); |
| 50 | 50 | ||
| 51 | static const struct { | 51 | static const struct { |
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c index ecd4d04b2c3c..00600239a053 100644 --- a/drivers/net/wireless/libertas/if_spi.c +++ b/drivers/net/wireless/libertas/if_spi.c | |||
| @@ -784,7 +784,7 @@ static int lbs_spi_thread(void *data) | |||
| 784 | up(&card->spi_thread_terminated); | 784 | up(&card->spi_thread_terminated); |
| 785 | do_exit(0); | 785 | do_exit(0); |
| 786 | } | 786 | } |
| 787 | } while (err == EINTR); | 787 | } while (err == -EINTR); |
| 788 | 788 | ||
| 789 | /* Read the host interrupt status register to see what we | 789 | /* Read the host interrupt status register to see what we |
| 790 | * can do. */ | 790 | * can do. */ |
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 4a4f00591447..848cc2cce247 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
| @@ -129,6 +129,7 @@ MODULE_PARM_DESC(workaround_interval, | |||
| 129 | #define OID_802_11_RTS_THRESHOLD cpu_to_le32(0x0d01020a) | 129 | #define OID_802_11_RTS_THRESHOLD cpu_to_le32(0x0d01020a) |
| 130 | #define OID_802_11_SUPPORTED_RATES cpu_to_le32(0x0d01020e) | 130 | #define OID_802_11_SUPPORTED_RATES cpu_to_le32(0x0d01020e) |
| 131 | #define OID_802_11_CONFIGURATION cpu_to_le32(0x0d010211) | 131 | #define OID_802_11_CONFIGURATION cpu_to_le32(0x0d010211) |
| 132 | #define OID_802_11_POWER_MODE cpu_to_le32(0x0d010216) | ||
| 132 | #define OID_802_11_BSSID_LIST cpu_to_le32(0x0d010217) | 133 | #define OID_802_11_BSSID_LIST cpu_to_le32(0x0d010217) |
| 133 | 134 | ||
| 134 | 135 | ||
| @@ -239,6 +240,12 @@ enum ndis_80211_addwep_bits { | |||
| 239 | NDIS_80211_ADDWEP_TRANSMIT_KEY = cpu_to_le32(1 << 31) | 240 | NDIS_80211_ADDWEP_TRANSMIT_KEY = cpu_to_le32(1 << 31) |
| 240 | }; | 241 | }; |
| 241 | 242 | ||
| 243 | enum ndis_80211_power_mode { | ||
| 244 | NDIS_80211_POWER_MODE_CAM, | ||
| 245 | NDIS_80211_POWER_MODE_MAX_PSP, | ||
| 246 | NDIS_80211_POWER_MODE_FAST_PSP, | ||
| 247 | }; | ||
| 248 | |||
| 242 | struct ndis_80211_auth_request { | 249 | struct ndis_80211_auth_request { |
| 243 | __le32 length; | 250 | __le32 length; |
| 244 | u8 bssid[6]; | 251 | u8 bssid[6]; |
| @@ -478,6 +485,9 @@ struct rndis_wlan_private { | |||
| 478 | struct mutex command_lock; | 485 | struct mutex command_lock; |
| 479 | unsigned long work_pending; | 486 | unsigned long work_pending; |
| 480 | int last_qual; | 487 | int last_qual; |
| 488 | s32 cqm_rssi_thold; | ||
| 489 | u32 cqm_rssi_hyst; | ||
| 490 | int last_cqm_event_rssi; | ||
| 481 | 491 | ||
| 482 | struct ieee80211_supported_band band; | 492 | struct ieee80211_supported_band band; |
| 483 | struct ieee80211_channel channels[ARRAY_SIZE(rndis_channels)]; | 493 | struct ieee80211_channel channels[ARRAY_SIZE(rndis_channels)]; |
| @@ -500,10 +510,10 @@ struct rndis_wlan_private { | |||
| 500 | 510 | ||
| 501 | /* hardware state */ | 511 | /* hardware state */ |
| 502 | bool radio_on; | 512 | bool radio_on; |
| 513 | int power_mode; | ||
| 503 | int infra_mode; | 514 | int infra_mode; |
| 504 | bool connected; | 515 | bool connected; |
| 505 | u8 bssid[ETH_ALEN]; | 516 | u8 bssid[ETH_ALEN]; |
| 506 | struct ndis_80211_ssid essid; | ||
| 507 | __le32 current_command_oid; | 517 | __le32 current_command_oid; |
| 508 | 518 | ||
| 509 | /* encryption stuff */ | 519 | /* encryption stuff */ |
| @@ -570,7 +580,14 @@ static int rndis_del_pmksa(struct wiphy *wiphy, struct net_device *netdev, | |||
| 570 | 580 | ||
| 571 | static int rndis_flush_pmksa(struct wiphy *wiphy, struct net_device *netdev); | 581 | static int rndis_flush_pmksa(struct wiphy *wiphy, struct net_device *netdev); |
| 572 | 582 | ||
| 573 | static struct cfg80211_ops rndis_config_ops = { | 583 | static int rndis_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, |
| 584 | bool enabled, int timeout); | ||
| 585 | |||
| 586 | static int rndis_set_cqm_rssi_config(struct wiphy *wiphy, | ||
| 587 | struct net_device *dev, | ||
| 588 | s32 rssi_thold, u32 rssi_hyst); | ||
| 589 | |||
| 590 | static const struct cfg80211_ops rndis_config_ops = { | ||
| 574 | .change_virtual_intf = rndis_change_virtual_intf, | 591 | .change_virtual_intf = rndis_change_virtual_intf, |
| 575 | .scan = rndis_scan, | 592 | .scan = rndis_scan, |
| 576 | .set_wiphy_params = rndis_set_wiphy_params, | 593 | .set_wiphy_params = rndis_set_wiphy_params, |
| @@ -589,6 +606,8 @@ static struct cfg80211_ops rndis_config_ops = { | |||
| 589 | .set_pmksa = rndis_set_pmksa, | 606 | .set_pmksa = rndis_set_pmksa, |
| 590 | .del_pmksa = rndis_del_pmksa, | 607 | .del_pmksa = rndis_del_pmksa, |
| 591 | .flush_pmksa = rndis_flush_pmksa, | 608 | .flush_pmksa = rndis_flush_pmksa, |
| 609 | .set_power_mgmt = rndis_set_power_mgmt, | ||
| 610 | .set_cqm_rssi_config = rndis_set_cqm_rssi_config, | ||
| 592 | }; | 611 | }; |
| 593 | 612 | ||
| 594 | static void *rndis_wiphy_privid = &rndis_wiphy_privid; | 613 | static void *rndis_wiphy_privid = &rndis_wiphy_privid; |
| @@ -687,6 +706,7 @@ static const char *oid_to_string(__le32 oid) | |||
| 687 | OID_STR(OID_802_11_ADD_KEY); | 706 | OID_STR(OID_802_11_ADD_KEY); |
| 688 | OID_STR(OID_802_11_REMOVE_KEY); | 707 | OID_STR(OID_802_11_REMOVE_KEY); |
| 689 | OID_STR(OID_802_11_ASSOCIATION_INFORMATION); | 708 | OID_STR(OID_802_11_ASSOCIATION_INFORMATION); |
| 709 | OID_STR(OID_802_11_CAPABILITY); | ||
| 690 | OID_STR(OID_802_11_PMKID); | 710 | OID_STR(OID_802_11_PMKID); |
| 691 | OID_STR(OID_802_11_NETWORK_TYPES_SUPPORTED); | 711 | OID_STR(OID_802_11_NETWORK_TYPES_SUPPORTED); |
| 692 | OID_STR(OID_802_11_NETWORK_TYPE_IN_USE); | 712 | OID_STR(OID_802_11_NETWORK_TYPE_IN_USE); |
| @@ -697,6 +717,7 @@ static const char *oid_to_string(__le32 oid) | |||
| 697 | OID_STR(OID_802_11_RTS_THRESHOLD); | 717 | OID_STR(OID_802_11_RTS_THRESHOLD); |
| 698 | OID_STR(OID_802_11_SUPPORTED_RATES); | 718 | OID_STR(OID_802_11_SUPPORTED_RATES); |
| 699 | OID_STR(OID_802_11_CONFIGURATION); | 719 | OID_STR(OID_802_11_CONFIGURATION); |
| 720 | OID_STR(OID_802_11_POWER_MODE); | ||
| 700 | OID_STR(OID_802_11_BSSID_LIST); | 721 | OID_STR(OID_802_11_BSSID_LIST); |
| 701 | #undef OID_STR | 722 | #undef OID_STR |
| 702 | } | 723 | } |
| @@ -1026,7 +1047,6 @@ static int set_essid(struct usbnet *usbdev, struct ndis_80211_ssid *ssid) | |||
| 1026 | return ret; | 1047 | return ret; |
| 1027 | } | 1048 | } |
| 1028 | if (ret == 0) { | 1049 | if (ret == 0) { |
| 1029 | memcpy(&priv->essid, ssid, sizeof(priv->essid)); | ||
| 1030 | priv->radio_on = true; | 1050 | priv->radio_on = true; |
| 1031 | netdev_dbg(usbdev->net, "%s(): radio_on = true\n", __func__); | 1051 | netdev_dbg(usbdev->net, "%s(): radio_on = true\n", __func__); |
| 1032 | } | 1052 | } |
| @@ -1967,8 +1987,8 @@ static struct cfg80211_bss *rndis_bss_info_update(struct usbnet *usbdev, | |||
| 1967 | int ie_len, bssid_len; | 1987 | int ie_len, bssid_len; |
| 1968 | u8 *ie; | 1988 | u8 *ie; |
| 1969 | 1989 | ||
| 1970 | netdev_dbg(usbdev->net, " found bssid: '%.32s' [%pM]\n", | 1990 | netdev_dbg(usbdev->net, " found bssid: '%.32s' [%pM], len: %d\n", |
| 1971 | bssid->ssid.essid, bssid->mac); | 1991 | bssid->ssid.essid, bssid->mac, le32_to_cpu(bssid->length)); |
| 1972 | 1992 | ||
| 1973 | /* parse bssid structure */ | 1993 | /* parse bssid structure */ |
| 1974 | bssid_len = le32_to_cpu(bssid->length); | 1994 | bssid_len = le32_to_cpu(bssid->length); |
| @@ -2002,54 +2022,98 @@ static struct cfg80211_bss *rndis_bss_info_update(struct usbnet *usbdev, | |||
| 2002 | GFP_KERNEL); | 2022 | GFP_KERNEL); |
| 2003 | } | 2023 | } |
| 2004 | 2024 | ||
| 2025 | static struct ndis_80211_bssid_ex *next_bssid_list_item( | ||
| 2026 | struct ndis_80211_bssid_ex *bssid, | ||
| 2027 | int *bssid_len, void *buf, int len) | ||
| 2028 | { | ||
| 2029 | void *buf_end, *bssid_end; | ||
| 2030 | |||
| 2031 | buf_end = (char *)buf + len; | ||
| 2032 | bssid_end = (char *)bssid + *bssid_len; | ||
| 2033 | |||
| 2034 | if ((int)(buf_end - bssid_end) < sizeof(bssid->length)) { | ||
| 2035 | *bssid_len = 0; | ||
| 2036 | return NULL; | ||
| 2037 | } else { | ||
| 2038 | bssid = (void *)((char *)bssid + *bssid_len); | ||
| 2039 | *bssid_len = le32_to_cpu(bssid->length); | ||
| 2040 | return bssid; | ||
| 2041 | } | ||
| 2042 | } | ||
| 2043 | |||
| 2044 | static bool check_bssid_list_item(struct ndis_80211_bssid_ex *bssid, | ||
| 2045 | int bssid_len, void *buf, int len) | ||
| 2046 | { | ||
| 2047 | void *buf_end, *bssid_end; | ||
| 2048 | |||
| 2049 | if (!bssid || bssid_len <= 0 || bssid_len > len) | ||
| 2050 | return false; | ||
| 2051 | |||
| 2052 | buf_end = (char *)buf + len; | ||
| 2053 | bssid_end = (char *)bssid + bssid_len; | ||
| 2054 | |||
| 2055 | return (int)(buf_end - bssid_end) >= 0 && (int)(bssid_end - buf) >= 0; | ||
| 2056 | } | ||
| 2057 | |||
| 2005 | static int rndis_check_bssid_list(struct usbnet *usbdev, u8 *match_bssid, | 2058 | static int rndis_check_bssid_list(struct usbnet *usbdev, u8 *match_bssid, |
| 2006 | bool *matched) | 2059 | bool *matched) |
| 2007 | { | 2060 | { |
| 2008 | void *buf = NULL; | 2061 | void *buf = NULL; |
| 2009 | struct ndis_80211_bssid_list_ex *bssid_list; | 2062 | struct ndis_80211_bssid_list_ex *bssid_list; |
| 2010 | struct ndis_80211_bssid_ex *bssid; | 2063 | struct ndis_80211_bssid_ex *bssid; |
| 2011 | int ret = -EINVAL, len, count, bssid_len; | 2064 | int ret = -EINVAL, len, count, bssid_len, real_count, new_len; |
| 2012 | bool resized = false; | ||
| 2013 | 2065 | ||
| 2014 | netdev_dbg(usbdev->net, "check_bssid_list\n"); | 2066 | netdev_dbg(usbdev->net, "%s()\n", __func__); |
| 2015 | 2067 | ||
| 2016 | len = CONTROL_BUFFER_SIZE; | 2068 | len = CONTROL_BUFFER_SIZE; |
| 2017 | resize_buf: | 2069 | resize_buf: |
| 2018 | buf = kmalloc(len, GFP_KERNEL); | 2070 | buf = kzalloc(len, GFP_KERNEL); |
| 2019 | if (!buf) { | 2071 | if (!buf) { |
| 2020 | ret = -ENOMEM; | 2072 | ret = -ENOMEM; |
| 2021 | goto out; | 2073 | goto out; |
| 2022 | } | 2074 | } |
| 2023 | 2075 | ||
| 2024 | ret = rndis_query_oid(usbdev, OID_802_11_BSSID_LIST, buf, &len); | 2076 | /* BSSID-list might have got bigger last time we checked, keep |
| 2025 | if (ret != 0) | 2077 | * resizing until it won't get any bigger. |
| 2078 | */ | ||
| 2079 | new_len = len; | ||
| 2080 | ret = rndis_query_oid(usbdev, OID_802_11_BSSID_LIST, buf, &new_len); | ||
| 2081 | if (ret != 0 || new_len < sizeof(struct ndis_80211_bssid_list_ex)) | ||
| 2026 | goto out; | 2082 | goto out; |
| 2027 | 2083 | ||
| 2028 | if (!resized && len > CONTROL_BUFFER_SIZE) { | 2084 | if (new_len > len) { |
| 2029 | resized = true; | 2085 | len = new_len; |
| 2030 | kfree(buf); | 2086 | kfree(buf); |
| 2031 | goto resize_buf; | 2087 | goto resize_buf; |
| 2032 | } | 2088 | } |
| 2033 | 2089 | ||
| 2090 | len = new_len; | ||
| 2091 | |||
| 2034 | bssid_list = buf; | 2092 | bssid_list = buf; |
| 2035 | bssid = bssid_list->bssid; | ||
| 2036 | bssid_len = le32_to_cpu(bssid->length); | ||
| 2037 | count = le32_to_cpu(bssid_list->num_items); | 2093 | count = le32_to_cpu(bssid_list->num_items); |
| 2038 | netdev_dbg(usbdev->net, "check_bssid_list: %d BSSIDs found (buflen: %d)\n", | 2094 | real_count = 0; |
| 2039 | count, len); | 2095 | netdev_dbg(usbdev->net, "%s(): buflen: %d\n", __func__, len); |
| 2040 | 2096 | ||
| 2041 | while (count && ((void *)bssid + bssid_len) <= (buf + len)) { | 2097 | bssid_len = 0; |
| 2098 | bssid = next_bssid_list_item(bssid_list->bssid, &bssid_len, buf, len); | ||
| 2099 | |||
| 2100 | /* Device returns incorrect 'num_items'. Workaround by ignoring the | ||
| 2101 | * received 'num_items' and walking through full bssid buffer instead. | ||
| 2102 | */ | ||
| 2103 | while (check_bssid_list_item(bssid, bssid_len, buf, len)) { | ||
| 2042 | if (rndis_bss_info_update(usbdev, bssid) && match_bssid && | 2104 | if (rndis_bss_info_update(usbdev, bssid) && match_bssid && |
| 2043 | matched) { | 2105 | matched) { |
| 2044 | if (compare_ether_addr(bssid->mac, match_bssid)) | 2106 | if (compare_ether_addr(bssid->mac, match_bssid)) |
| 2045 | *matched = true; | 2107 | *matched = true; |
| 2046 | } | 2108 | } |
| 2047 | 2109 | ||
| 2048 | bssid = (void *)bssid + bssid_len; | 2110 | real_count++; |
| 2049 | bssid_len = le32_to_cpu(bssid->length); | 2111 | bssid = next_bssid_list_item(bssid, &bssid_len, buf, len); |
| 2050 | count--; | ||
| 2051 | } | 2112 | } |
| 2052 | 2113 | ||
| 2114 | netdev_dbg(usbdev->net, "%s(): num_items from device: %d, really found:" | ||
| 2115 | " %d\n", __func__, count, real_count); | ||
| 2116 | |||
| 2053 | out: | 2117 | out: |
| 2054 | kfree(buf); | 2118 | kfree(buf); |
| 2055 | return ret; | 2119 | return ret; |
| @@ -2391,6 +2455,9 @@ static int rndis_set_default_key(struct wiphy *wiphy, struct net_device *netdev, | |||
| 2391 | 2455 | ||
| 2392 | priv->encr_tx_key_index = key_index; | 2456 | priv->encr_tx_key_index = key_index; |
| 2393 | 2457 | ||
| 2458 | if (is_wpa_key(priv, key_index)) | ||
| 2459 | return 0; | ||
| 2460 | |||
| 2394 | key = priv->encr_keys[key_index]; | 2461 | key = priv->encr_keys[key_index]; |
| 2395 | 2462 | ||
| 2396 | return add_wep_key(usbdev, key.material, key.len, key_index); | 2463 | return add_wep_key(usbdev, key.material, key.len, key_index); |
| @@ -2521,6 +2588,51 @@ static int rndis_flush_pmksa(struct wiphy *wiphy, struct net_device *netdev) | |||
| 2521 | return rndis_set_oid(usbdev, OID_802_11_PMKID, &pmkid, sizeof(pmkid)); | 2588 | return rndis_set_oid(usbdev, OID_802_11_PMKID, &pmkid, sizeof(pmkid)); |
| 2522 | } | 2589 | } |
| 2523 | 2590 | ||
| 2591 | static int rndis_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, | ||
| 2592 | bool enabled, int timeout) | ||
| 2593 | { | ||
| 2594 | struct rndis_wlan_private *priv = wiphy_priv(wiphy); | ||
| 2595 | struct usbnet *usbdev = priv->usbdev; | ||
| 2596 | int power_mode; | ||
| 2597 | __le32 mode; | ||
| 2598 | int ret; | ||
| 2599 | |||
| 2600 | netdev_dbg(usbdev->net, "%s(): %s, %d\n", __func__, | ||
| 2601 | enabled ? "enabled" : "disabled", | ||
| 2602 | timeout); | ||
| 2603 | |||
| 2604 | if (enabled) | ||
| 2605 | power_mode = NDIS_80211_POWER_MODE_FAST_PSP; | ||
| 2606 | else | ||
| 2607 | power_mode = NDIS_80211_POWER_MODE_CAM; | ||
| 2608 | |||
| 2609 | if (power_mode == priv->power_mode) | ||
| 2610 | return 0; | ||
| 2611 | |||
| 2612 | priv->power_mode = power_mode; | ||
| 2613 | |||
| 2614 | mode = cpu_to_le32(power_mode); | ||
| 2615 | ret = rndis_set_oid(usbdev, OID_802_11_POWER_MODE, &mode, sizeof(mode)); | ||
| 2616 | |||
| 2617 | netdev_dbg(usbdev->net, "%s(): OID_802_11_POWER_MODE -> %d\n", | ||
| 2618 | __func__, ret); | ||
| 2619 | |||
| 2620 | return ret; | ||
| 2621 | } | ||
| 2622 | |||
| 2623 | static int rndis_set_cqm_rssi_config(struct wiphy *wiphy, | ||
| 2624 | struct net_device *dev, | ||
| 2625 | s32 rssi_thold, u32 rssi_hyst) | ||
| 2626 | { | ||
| 2627 | struct rndis_wlan_private *priv = wiphy_priv(wiphy); | ||
| 2628 | |||
| 2629 | priv->cqm_rssi_thold = rssi_thold; | ||
| 2630 | priv->cqm_rssi_hyst = rssi_hyst; | ||
| 2631 | priv->last_cqm_event_rssi = 0; | ||
| 2632 | |||
| 2633 | return 0; | ||
| 2634 | } | ||
| 2635 | |||
| 2524 | static void rndis_wlan_craft_connected_bss(struct usbnet *usbdev, u8 *bssid, | 2636 | static void rndis_wlan_craft_connected_bss(struct usbnet *usbdev, u8 *bssid, |
| 2525 | struct ndis_80211_assoc_info *info) | 2637 | struct ndis_80211_assoc_info *info) |
| 2526 | { | 2638 | { |
| @@ -3050,6 +3162,32 @@ static int rndis_wlan_get_caps(struct usbnet *usbdev, struct wiphy *wiphy) | |||
| 3050 | return retval; | 3162 | return retval; |
| 3051 | } | 3163 | } |
| 3052 | 3164 | ||
| 3165 | static void rndis_do_cqm(struct usbnet *usbdev, s32 rssi) | ||
| 3166 | { | ||
| 3167 | struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev); | ||
| 3168 | enum nl80211_cqm_rssi_threshold_event event; | ||
| 3169 | int thold, hyst, last_event; | ||
| 3170 | |||
| 3171 | if (priv->cqm_rssi_thold >= 0 || rssi >= 0) | ||
| 3172 | return; | ||
| 3173 | if (priv->infra_mode != NDIS_80211_INFRA_INFRA) | ||
| 3174 | return; | ||
| 3175 | |||
| 3176 | last_event = priv->last_cqm_event_rssi; | ||
| 3177 | thold = priv->cqm_rssi_thold; | ||
| 3178 | hyst = priv->cqm_rssi_hyst; | ||
| 3179 | |||
| 3180 | if (rssi < thold && (last_event == 0 || rssi < last_event - hyst)) | ||
| 3181 | event = NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW; | ||
| 3182 | else if (rssi > thold && (last_event == 0 || rssi > last_event + hyst)) | ||
| 3183 | event = NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH; | ||
| 3184 | else | ||
| 3185 | return; | ||
| 3186 | |||
| 3187 | priv->last_cqm_event_rssi = rssi; | ||
| 3188 | cfg80211_cqm_rssi_notify(usbdev->net, event, GFP_KERNEL); | ||
| 3189 | } | ||
| 3190 | |||
| 3053 | #define DEVICE_POLLER_JIFFIES (HZ) | 3191 | #define DEVICE_POLLER_JIFFIES (HZ) |
| 3054 | static void rndis_device_poller(struct work_struct *work) | 3192 | static void rndis_device_poller(struct work_struct *work) |
| 3055 | { | 3193 | { |
| @@ -3084,8 +3222,10 @@ static void rndis_device_poller(struct work_struct *work) | |||
| 3084 | 3222 | ||
| 3085 | len = sizeof(rssi); | 3223 | len = sizeof(rssi); |
| 3086 | ret = rndis_query_oid(usbdev, OID_802_11_RSSI, &rssi, &len); | 3224 | ret = rndis_query_oid(usbdev, OID_802_11_RSSI, &rssi, &len); |
| 3087 | if (ret == 0) | 3225 | if (ret == 0) { |
| 3088 | priv->last_qual = level_to_qual(le32_to_cpu(rssi)); | 3226 | priv->last_qual = level_to_qual(le32_to_cpu(rssi)); |
| 3227 | rndis_do_cqm(usbdev, le32_to_cpu(rssi)); | ||
| 3228 | } | ||
| 3089 | 3229 | ||
| 3090 | netdev_dbg(usbdev->net, "dev-poller: OID_802_11_RSSI -> %d, rssi:%d, qual: %d\n", | 3230 | netdev_dbg(usbdev->net, "dev-poller: OID_802_11_RSSI -> %d, rssi:%d, qual: %d\n", |
| 3091 | ret, le32_to_cpu(rssi), level_to_qual(le32_to_cpu(rssi))); | 3231 | ret, le32_to_cpu(rssi), level_to_qual(le32_to_cpu(rssi))); |
| @@ -3347,13 +3487,15 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf) | |||
| 3347 | 3487 | ||
| 3348 | set_default_iw_params(usbdev); | 3488 | set_default_iw_params(usbdev); |
| 3349 | 3489 | ||
| 3490 | priv->power_mode = -1; | ||
| 3491 | |||
| 3350 | /* set default rts/frag */ | 3492 | /* set default rts/frag */ |
| 3351 | rndis_set_wiphy_params(wiphy, | 3493 | rndis_set_wiphy_params(wiphy, |
| 3352 | WIPHY_PARAM_FRAG_THRESHOLD | WIPHY_PARAM_RTS_THRESHOLD); | 3494 | WIPHY_PARAM_FRAG_THRESHOLD | WIPHY_PARAM_RTS_THRESHOLD); |
| 3353 | 3495 | ||
| 3354 | /* turn radio on */ | 3496 | /* turn radio off on init */ |
| 3355 | priv->radio_on = true; | 3497 | priv->radio_on = false; |
| 3356 | disassociate(usbdev, true); | 3498 | disassociate(usbdev, false); |
| 3357 | netif_carrier_off(usbdev->net); | 3499 | netif_carrier_off(usbdev->net); |
| 3358 | 3500 | ||
| 3359 | return 0; | 3501 | return 0; |
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index baa1468a56a8..aa97971a38af 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
| @@ -688,14 +688,7 @@ static void rt2800pci_txdone(struct rt2x00_dev *rt2x00dev) | |||
| 688 | u32 status; | 688 | u32 status; |
| 689 | u8 qid; | 689 | u8 qid; |
| 690 | 690 | ||
| 691 | while (!kfifo_is_empty(&rt2x00dev->txstatus_fifo)) { | 691 | while (kfifo_get(&rt2x00dev->txstatus_fifo, &status)) { |
| 692 | /* Now remove the tx status from the FIFO */ | ||
| 693 | if (kfifo_out(&rt2x00dev->txstatus_fifo, &status, | ||
| 694 | sizeof(status)) != sizeof(status)) { | ||
| 695 | WARN_ON(1); | ||
| 696 | break; | ||
| 697 | } | ||
| 698 | |||
| 699 | qid = rt2x00_get_field32(status, TX_STA_FIFO_PID_QUEUE); | 692 | qid = rt2x00_get_field32(status, TX_STA_FIFO_PID_QUEUE); |
| 700 | if (qid >= QID_RX) { | 693 | if (qid >= QID_RX) { |
| 701 | /* | 694 | /* |
| @@ -803,14 +796,7 @@ static void rt2800pci_txstatus_interrupt(struct rt2x00_dev *rt2x00dev) | |||
| 803 | if (!rt2x00_get_field32(status, TX_STA_FIFO_VALID)) | 796 | if (!rt2x00_get_field32(status, TX_STA_FIFO_VALID)) |
| 804 | break; | 797 | break; |
| 805 | 798 | ||
| 806 | if (kfifo_is_full(&rt2x00dev->txstatus_fifo)) { | 799 | if (!kfifo_put(&rt2x00dev->txstatus_fifo, &status)) { |
| 807 | WARNING(rt2x00dev, "TX status FIFO overrun," | ||
| 808 | " drop tx status report.\n"); | ||
| 809 | break; | ||
| 810 | } | ||
| 811 | |||
| 812 | if (kfifo_in(&rt2x00dev->txstatus_fifo, &status, | ||
| 813 | sizeof(status)) != sizeof(status)) { | ||
| 814 | WARNING(rt2x00dev, "TX status FIFO overrun," | 800 | WARNING(rt2x00dev, "TX status FIFO overrun," |
| 815 | "drop tx status report.\n"); | 801 | "drop tx status report.\n"); |
| 816 | break; | 802 | break; |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 3e0205ddf7b4..b97a4a54ff4c 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
| @@ -369,7 +369,10 @@ static void rt2800usb_write_tx_desc(struct queue_entry *entry, | |||
| 369 | static void rt2800usb_write_tx_data(struct queue_entry *entry, | 369 | static void rt2800usb_write_tx_data(struct queue_entry *entry, |
| 370 | struct txentry_desc *txdesc) | 370 | struct txentry_desc *txdesc) |
| 371 | { | 371 | { |
| 372 | u8 padding_len; | 372 | unsigned int len; |
| 373 | int err; | ||
| 374 | |||
| 375 | rt2800_write_tx_data(entry, txdesc); | ||
| 373 | 376 | ||
| 374 | /* | 377 | /* |
| 375 | * pad(1~3 bytes) is added after each 802.11 payload. | 378 | * pad(1~3 bytes) is added after each 802.11 payload. |
| @@ -378,9 +381,14 @@ static void rt2800usb_write_tx_data(struct queue_entry *entry, | |||
| 378 | * | TXINFO | TXWI | 802.11 header | L2 pad | payload | pad | USB end pad | | 381 | * | TXINFO | TXWI | 802.11 header | L2 pad | payload | pad | USB end pad | |
| 379 | * |<------------- tx_pkt_len ------------->| | 382 | * |<------------- tx_pkt_len ------------->| |
| 380 | */ | 383 | */ |
| 381 | rt2800_write_tx_data(entry, txdesc); | 384 | len = roundup(entry->skb->len, 4) + 4; |
| 382 | padding_len = roundup(entry->skb->len + 4, 4) - entry->skb->len; | 385 | err = skb_padto(entry->skb, len); |
| 383 | memset(skb_put(entry->skb, padding_len), 0, padding_len); | 386 | if (unlikely(err)) { |
| 387 | WARNING(entry->queue->rt2x00dev, "TX SKB padding error, out of memory\n"); | ||
| 388 | return; | ||
| 389 | } | ||
| 390 | |||
| 391 | entry->skb->len = len; | ||
| 384 | } | 392 | } |
| 385 | 393 | ||
| 386 | /* | 394 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index c254d5a62c7d..84aaf393da43 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
| @@ -347,6 +347,10 @@ struct link { | |||
| 347 | struct delayed_work watchdog_work; | 347 | struct delayed_work watchdog_work; |
| 348 | }; | 348 | }; |
| 349 | 349 | ||
| 350 | enum rt2x00_delayed_flags { | ||
| 351 | DELAYED_UPDATE_BEACON, | ||
| 352 | }; | ||
| 353 | |||
| 350 | /* | 354 | /* |
| 351 | * Interface structure | 355 | * Interface structure |
| 352 | * Per interface configuration details, this structure | 356 | * Per interface configuration details, this structure |
| @@ -354,22 +358,6 @@ struct link { | |||
| 354 | */ | 358 | */ |
| 355 | struct rt2x00_intf { | 359 | struct rt2x00_intf { |
| 356 | /* | 360 | /* |
| 357 | * All fields within the rt2x00_intf structure | ||
| 358 | * must be protected with a spinlock. | ||
| 359 | */ | ||
| 360 | spinlock_t lock; | ||
| 361 | |||
| 362 | /* | ||
| 363 | * MAC of the device. | ||
| 364 | */ | ||
| 365 | u8 mac[ETH_ALEN]; | ||
| 366 | |||
| 367 | /* | ||
| 368 | * BBSID of the AP to associate with. | ||
| 369 | */ | ||
| 370 | u8 bssid[ETH_ALEN]; | ||
| 371 | |||
| 372 | /* | ||
| 373 | * beacon->skb must be protected with the mutex. | 361 | * beacon->skb must be protected with the mutex. |
| 374 | */ | 362 | */ |
| 375 | struct mutex beacon_skb_mutex; | 363 | struct mutex beacon_skb_mutex; |
| @@ -384,8 +372,7 @@ struct rt2x00_intf { | |||
| 384 | /* | 372 | /* |
| 385 | * Actions that needed rescheduling. | 373 | * Actions that needed rescheduling. |
| 386 | */ | 374 | */ |
| 387 | unsigned int delayed_flags; | 375 | unsigned long delayed_flags; |
| 388 | #define DELAYED_UPDATE_BEACON 0x00000001 | ||
| 389 | 376 | ||
| 390 | /* | 377 | /* |
| 391 | * Software sequence counter, this is only required | 378 | * Software sequence counter, this is only required |
| @@ -908,7 +895,7 @@ struct rt2x00_dev { | |||
| 908 | /* | 895 | /* |
| 909 | * FIFO for storing tx status reports between isr and tasklet. | 896 | * FIFO for storing tx status reports between isr and tasklet. |
| 910 | */ | 897 | */ |
| 911 | struct kfifo txstatus_fifo; | 898 | DECLARE_KFIFO_PTR(txstatus_fifo, u32); |
| 912 | 899 | ||
| 913 | /* | 900 | /* |
| 914 | * Tasklet for processing tx status reports (rt2800pci). | 901 | * Tasklet for processing tx status reports (rt2800pci). |
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c index 70ca9379833b..e7f67d5eda52 100644 --- a/drivers/net/wireless/rt2x00/rt2x00config.c +++ b/drivers/net/wireless/rt2x00/rt2x00config.c | |||
| @@ -62,13 +62,13 @@ void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, | |||
| 62 | * This will prevent the device being confused when it wants | 62 | * This will prevent the device being confused when it wants |
| 63 | * to ACK frames or consideres itself associated. | 63 | * to ACK frames or consideres itself associated. |
| 64 | */ | 64 | */ |
| 65 | memset(&conf.mac, 0, sizeof(conf.mac)); | 65 | memset(conf.mac, 0, sizeof(conf.mac)); |
| 66 | if (mac) | 66 | if (mac) |
| 67 | memcpy(&conf.mac, mac, ETH_ALEN); | 67 | memcpy(conf.mac, mac, ETH_ALEN); |
| 68 | 68 | ||
| 69 | memset(&conf.bssid, 0, sizeof(conf.bssid)); | 69 | memset(conf.bssid, 0, sizeof(conf.bssid)); |
| 70 | if (bssid) | 70 | if (bssid) |
| 71 | memcpy(&conf.bssid, bssid, ETH_ALEN); | 71 | memcpy(conf.bssid, bssid, ETH_ALEN); |
| 72 | 72 | ||
| 73 | flags |= CONFIG_UPDATE_TYPE; | 73 | flags |= CONFIG_UPDATE_TYPE; |
| 74 | if (mac || (!rt2x00dev->intf_ap_count && !rt2x00dev->intf_sta_count)) | 74 | if (mac || (!rt2x00dev->intf_ap_count && !rt2x00dev->intf_sta_count)) |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index fa74acdd271f..9597a03242cc 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
| @@ -110,19 +110,6 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac, | |||
| 110 | { | 110 | { |
| 111 | struct rt2x00_dev *rt2x00dev = data; | 111 | struct rt2x00_dev *rt2x00dev = data; |
| 112 | struct rt2x00_intf *intf = vif_to_intf(vif); | 112 | struct rt2x00_intf *intf = vif_to_intf(vif); |
| 113 | int delayed_flags; | ||
| 114 | |||
| 115 | /* | ||
| 116 | * Copy all data we need during this action under the protection | ||
| 117 | * of a spinlock. Otherwise race conditions might occur which results | ||
| 118 | * into an invalid configuration. | ||
| 119 | */ | ||
| 120 | spin_lock(&intf->lock); | ||
| 121 | |||
| 122 | delayed_flags = intf->delayed_flags; | ||
| 123 | intf->delayed_flags = 0; | ||
| 124 | |||
| 125 | spin_unlock(&intf->lock); | ||
| 126 | 113 | ||
| 127 | /* | 114 | /* |
| 128 | * It is possible the radio was disabled while the work had been | 115 | * It is possible the radio was disabled while the work had been |
| @@ -133,7 +120,7 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac, | |||
| 133 | if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) | 120 | if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) |
| 134 | return; | 121 | return; |
| 135 | 122 | ||
| 136 | if (delayed_flags & DELAYED_UPDATE_BEACON) | 123 | if (test_and_clear_bit(DELAYED_UPDATE_BEACON, &intf->delayed_flags)) |
| 137 | rt2x00queue_update_beacon(rt2x00dev, vif, true); | 124 | rt2x00queue_update_beacon(rt2x00dev, vif, true); |
| 138 | } | 125 | } |
| 139 | 126 | ||
| @@ -813,8 +800,7 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
| 813 | /* | 800 | /* |
| 814 | * Allocate tx status FIFO for driver use. | 801 | * Allocate tx status FIFO for driver use. |
| 815 | */ | 802 | */ |
| 816 | if (test_bit(DRIVER_REQUIRE_TXSTATUS_FIFO, &rt2x00dev->flags) && | 803 | if (test_bit(DRIVER_REQUIRE_TXSTATUS_FIFO, &rt2x00dev->flags)) { |
| 817 | rt2x00dev->ops->lib->txstatus_tasklet) { | ||
| 818 | /* | 804 | /* |
| 819 | * Allocate txstatus fifo and tasklet, we use a size of 512 | 805 | * Allocate txstatus fifo and tasklet, we use a size of 512 |
| 820 | * for the kfifo which is big enough to store 512/4=128 tx | 806 | * for the kfifo which is big enough to store 512/4=128 tx |
| @@ -828,9 +814,10 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
| 828 | return status; | 814 | return status; |
| 829 | 815 | ||
| 830 | /* tasklet for processing the tx status reports. */ | 816 | /* tasklet for processing the tx status reports. */ |
| 831 | tasklet_init(&rt2x00dev->txstatus_tasklet, | 817 | if (rt2x00dev->ops->lib->txstatus_tasklet) |
| 832 | rt2x00dev->ops->lib->txstatus_tasklet, | 818 | tasklet_init(&rt2x00dev->txstatus_tasklet, |
| 833 | (unsigned long)rt2x00dev); | 819 | rt2x00dev->ops->lib->txstatus_tasklet, |
| 820 | (unsigned long)rt2x00dev); | ||
| 834 | 821 | ||
| 835 | } | 822 | } |
| 836 | 823 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00ht.c b/drivers/net/wireless/rt2x00/rt2x00ht.c index c637bcaec5f8..b7ad46ecaa1d 100644 --- a/drivers/net/wireless/rt2x00/rt2x00ht.c +++ b/drivers/net/wireless/rt2x00/rt2x00ht.c | |||
| @@ -40,8 +40,6 @@ void rt2x00ht_create_tx_descriptor(struct queue_entry *entry, | |||
| 40 | if (tx_info->control.sta) | 40 | if (tx_info->control.sta) |
| 41 | txdesc->mpdu_density = | 41 | txdesc->mpdu_density = |
| 42 | tx_info->control.sta->ht_cap.ampdu_density; | 42 | tx_info->control.sta->ht_cap.ampdu_density; |
| 43 | else | ||
| 44 | txdesc->mpdu_density = 0; | ||
| 45 | 43 | ||
| 46 | txdesc->ba_size = 7; /* FIXME: What value is needed? */ | 44 | txdesc->ba_size = 7; /* FIXME: What value is needed? */ |
| 47 | 45 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 4cac7ad60f47..658542d2efe1 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
| @@ -268,7 +268,6 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw, | |||
| 268 | else | 268 | else |
| 269 | rt2x00dev->intf_sta_count++; | 269 | rt2x00dev->intf_sta_count++; |
| 270 | 270 | ||
| 271 | spin_lock_init(&intf->lock); | ||
| 272 | spin_lock_init(&intf->seqlock); | 271 | spin_lock_init(&intf->seqlock); |
| 273 | mutex_init(&intf->beacon_skb_mutex); | 272 | mutex_init(&intf->beacon_skb_mutex); |
| 274 | intf->beacon = entry; | 273 | intf->beacon = entry; |
| @@ -282,9 +281,8 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw, | |||
| 282 | * STA interfaces at this time, since this can cause | 281 | * STA interfaces at this time, since this can cause |
| 283 | * invalid behavior in the device. | 282 | * invalid behavior in the device. |
| 284 | */ | 283 | */ |
| 285 | memcpy(&intf->mac, vif->addr, ETH_ALEN); | ||
| 286 | rt2x00lib_config_intf(rt2x00dev, intf, vif->type, | 284 | rt2x00lib_config_intf(rt2x00dev, intf, vif->type, |
| 287 | intf->mac, NULL); | 285 | vif->addr, NULL); |
| 288 | 286 | ||
| 289 | /* | 287 | /* |
| 290 | * Some filters depend on the current working mode. We can force | 288 | * Some filters depend on the current working mode. We can force |
| @@ -445,9 +443,7 @@ static void rt2x00mac_set_tim_iter(void *data, u8 *mac, | |||
| 445 | vif->type != NL80211_IFTYPE_WDS) | 443 | vif->type != NL80211_IFTYPE_WDS) |
| 446 | return; | 444 | return; |
| 447 | 445 | ||
| 448 | spin_lock(&intf->lock); | 446 | set_bit(DELAYED_UPDATE_BEACON, &intf->delayed_flags); |
| 449 | intf->delayed_flags |= DELAYED_UPDATE_BEACON; | ||
| 450 | spin_unlock(&intf->lock); | ||
| 451 | } | 447 | } |
| 452 | 448 | ||
| 453 | int rt2x00mac_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, | 449 | int rt2x00mac_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, |
| @@ -472,17 +468,17 @@ EXPORT_SYMBOL_GPL(rt2x00mac_set_tim); | |||
| 472 | static void memcpy_tkip(struct rt2x00lib_crypto *crypto, u8 *key, u8 key_len) | 468 | static void memcpy_tkip(struct rt2x00lib_crypto *crypto, u8 *key, u8 key_len) |
| 473 | { | 469 | { |
| 474 | if (key_len > NL80211_TKIP_DATA_OFFSET_ENCR_KEY) | 470 | if (key_len > NL80211_TKIP_DATA_OFFSET_ENCR_KEY) |
| 475 | memcpy(&crypto->key, | 471 | memcpy(crypto->key, |
| 476 | &key[NL80211_TKIP_DATA_OFFSET_ENCR_KEY], | 472 | &key[NL80211_TKIP_DATA_OFFSET_ENCR_KEY], |
| 477 | sizeof(crypto->key)); | 473 | sizeof(crypto->key)); |
| 478 | 474 | ||
| 479 | if (key_len > NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY) | 475 | if (key_len > NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY) |
| 480 | memcpy(&crypto->tx_mic, | 476 | memcpy(crypto->tx_mic, |
| 481 | &key[NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY], | 477 | &key[NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY], |
| 482 | sizeof(crypto->tx_mic)); | 478 | sizeof(crypto->tx_mic)); |
| 483 | 479 | ||
| 484 | if (key_len > NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY) | 480 | if (key_len > NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY) |
| 485 | memcpy(&crypto->rx_mic, | 481 | memcpy(crypto->rx_mic, |
| 486 | &key[NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY], | 482 | &key[NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY], |
| 487 | sizeof(crypto->rx_mic)); | 483 | sizeof(crypto->rx_mic)); |
| 488 | } | 484 | } |
| @@ -492,7 +488,6 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
| 492 | struct ieee80211_key_conf *key) | 488 | struct ieee80211_key_conf *key) |
| 493 | { | 489 | { |
| 494 | struct rt2x00_dev *rt2x00dev = hw->priv; | 490 | struct rt2x00_dev *rt2x00dev = hw->priv; |
| 495 | struct rt2x00_intf *intf = vif_to_intf(vif); | ||
| 496 | int (*set_key) (struct rt2x00_dev *rt2x00dev, | 491 | int (*set_key) (struct rt2x00_dev *rt2x00dev, |
| 497 | struct rt2x00lib_crypto *crypto, | 492 | struct rt2x00lib_crypto *crypto, |
| 498 | struct ieee80211_key_conf *key); | 493 | struct ieee80211_key_conf *key); |
| @@ -516,7 +511,7 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
| 516 | if (rt2x00dev->intf_sta_count) | 511 | if (rt2x00dev->intf_sta_count) |
| 517 | crypto.bssidx = 0; | 512 | crypto.bssidx = 0; |
| 518 | else | 513 | else |
| 519 | crypto.bssidx = intf->mac[5] & (rt2x00dev->ops->max_ap_intf - 1); | 514 | crypto.bssidx = vif->addr[5] & (rt2x00dev->ops->max_ap_intf - 1); |
| 520 | 515 | ||
| 521 | crypto.cipher = rt2x00crypto_key_to_cipher(key); | 516 | crypto.cipher = rt2x00crypto_key_to_cipher(key); |
| 522 | if (crypto.cipher == CIPHER_NONE) | 517 | if (crypto.cipher == CIPHER_NONE) |
| @@ -534,7 +529,7 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
| 534 | if (crypto.cipher == CIPHER_TKIP) | 529 | if (crypto.cipher == CIPHER_TKIP) |
| 535 | memcpy_tkip(&crypto, &key->key[0], key->keylen); | 530 | memcpy_tkip(&crypto, &key->key[0], key->keylen); |
| 536 | else | 531 | else |
| 537 | memcpy(&crypto.key, &key->key[0], key->keylen); | 532 | memcpy(crypto.key, &key->key[0], key->keylen); |
| 538 | /* | 533 | /* |
| 539 | * Each BSS has a maximum of 4 shared keys. | 534 | * Each BSS has a maximum of 4 shared keys. |
| 540 | * Shared key index values: | 535 | * Shared key index values: |
| @@ -614,22 +609,8 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, | |||
| 614 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) | 609 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) |
| 615 | return; | 610 | return; |
| 616 | 611 | ||
| 617 | spin_lock(&intf->lock); | ||
| 618 | |||
| 619 | /* | ||
| 620 | * conf->bssid can be NULL if coming from the internal | ||
| 621 | * beacon update routine. | ||
| 622 | */ | ||
| 623 | if (changes & BSS_CHANGED_BSSID) | ||
| 624 | memcpy(&intf->bssid, bss_conf->bssid, ETH_ALEN); | ||
| 625 | |||
| 626 | spin_unlock(&intf->lock); | ||
| 627 | |||
| 628 | /* | 612 | /* |
| 629 | * Call rt2x00_config_intf() outside of the spinlock context since | 613 | * Update the BSSID. |
| 630 | * the call will sleep for USB drivers. By using the ieee80211_if_conf | ||
| 631 | * values as arguments we make keep access to rt2x00_intf thread safe | ||
| 632 | * even without the lock. | ||
| 633 | */ | 614 | */ |
| 634 | if (changes & BSS_CHANGED_BSSID) | 615 | if (changes & BSS_CHANGED_BSSID) |
| 635 | rt2x00lib_config_intf(rt2x00dev, intf, vif->type, NULL, | 616 | rt2x00lib_config_intf(rt2x00dev, intf, vif->type, NULL, |
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 28e6ff1a6694..73631c6fbb30 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
| @@ -286,7 +286,7 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) | |||
| 286 | rt2x00dev->irq = pci_dev->irq; | 286 | rt2x00dev->irq = pci_dev->irq; |
| 287 | rt2x00dev->name = pci_name(pci_dev); | 287 | rt2x00dev->name = pci_name(pci_dev); |
| 288 | 288 | ||
| 289 | if (pci_dev->is_pcie) | 289 | if (pci_is_pcie(pci_dev)) |
| 290 | rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE); | 290 | rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE); |
| 291 | else | 291 | else |
| 292 | rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI); | 292 | rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI); |
diff --git a/drivers/net/wireless/rtl818x/Makefile b/drivers/net/wireless/rtl818x/Makefile index 93cbfbedb46d..997569076923 100644 --- a/drivers/net/wireless/rtl818x/Makefile +++ b/drivers/net/wireless/rtl818x/Makefile | |||
| @@ -1,7 +1,2 @@ | |||
| 1 | rtl8180-objs := rtl8180_dev.o rtl8180_rtl8225.o rtl8180_sa2400.o rtl8180_max2820.o rtl8180_grf5101.o | 1 | obj-$(CONFIG_RTL8180) += rtl8180/ |
| 2 | rtl8187-objs := rtl8187_dev.o rtl8187_rtl8225.o rtl8187_leds.o rtl8187_rfkill.o | 2 | obj-$(CONFIG_RTL8187) += rtl8187/ |
| 3 | |||
| 4 | obj-$(CONFIG_RTL8180) += rtl8180.o | ||
| 5 | obj-$(CONFIG_RTL8187) += rtl8187.o | ||
| 6 | |||
| 7 | |||
diff --git a/drivers/net/wireless/rtl818x/rtl8180/Makefile b/drivers/net/wireless/rtl818x/rtl8180/Makefile new file mode 100644 index 000000000000..cb4fb8596f0b --- /dev/null +++ b/drivers/net/wireless/rtl818x/rtl8180/Makefile | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | rtl8180-objs := dev.o rtl8225.o sa2400.o max2820.o grf5101.o | ||
| 2 | |||
| 3 | obj-$(CONFIG_RTL8180) += rtl8180.o | ||
| 4 | |||
| 5 | ccflags-y += -Idrivers/net/wireless/rtl818x | ||
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c index 707c688da618..5851cbc1e957 100644 --- a/drivers/net/wireless/rtl818x/rtl8180_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c | |||
| @@ -24,10 +24,10 @@ | |||
| 24 | #include <net/mac80211.h> | 24 | #include <net/mac80211.h> |
| 25 | 25 | ||
| 26 | #include "rtl8180.h" | 26 | #include "rtl8180.h" |
| 27 | #include "rtl8180_rtl8225.h" | 27 | #include "rtl8225.h" |
| 28 | #include "rtl8180_sa2400.h" | 28 | #include "sa2400.h" |
| 29 | #include "rtl8180_max2820.h" | 29 | #include "max2820.h" |
| 30 | #include "rtl8180_grf5101.h" | 30 | #include "grf5101.h" |
| 31 | 31 | ||
| 32 | MODULE_AUTHOR("Michael Wu <flamingice@sourmilk.net>"); | 32 | MODULE_AUTHOR("Michael Wu <flamingice@sourmilk.net>"); |
| 33 | MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>"); | 33 | MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>"); |
diff --git a/drivers/net/wireless/rtl818x/rtl8180_grf5101.c b/drivers/net/wireless/rtl818x/rtl8180/grf5101.c index 5cab9dfa8c07..5ee7589dd546 100644 --- a/drivers/net/wireless/rtl818x/rtl8180_grf5101.c +++ b/drivers/net/wireless/rtl818x/rtl8180/grf5101.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | #include <net/mac80211.h> | 25 | #include <net/mac80211.h> |
| 26 | 26 | ||
| 27 | #include "rtl8180.h" | 27 | #include "rtl8180.h" |
| 28 | #include "rtl8180_grf5101.h" | 28 | #include "grf5101.h" |
| 29 | 29 | ||
| 30 | static const int grf5101_encode[] = { | 30 | static const int grf5101_encode[] = { |
| 31 | 0x0, 0x8, 0x4, 0xC, | 31 | 0x0, 0x8, 0x4, 0xC, |
diff --git a/drivers/net/wireless/rtl818x/rtl8180_grf5101.h b/drivers/net/wireless/rtl818x/rtl8180/grf5101.h index 76647111bcff..76647111bcff 100644 --- a/drivers/net/wireless/rtl818x/rtl8180_grf5101.h +++ b/drivers/net/wireless/rtl818x/rtl8180/grf5101.h | |||
diff --git a/drivers/net/wireless/rtl818x/rtl8180_max2820.c b/drivers/net/wireless/rtl818x/rtl8180/max2820.c index 16c4655181c0..667b3363d437 100644 --- a/drivers/net/wireless/rtl818x/rtl8180_max2820.c +++ b/drivers/net/wireless/rtl818x/rtl8180/max2820.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | #include <net/mac80211.h> | 24 | #include <net/mac80211.h> |
| 25 | 25 | ||
| 26 | #include "rtl8180.h" | 26 | #include "rtl8180.h" |
| 27 | #include "rtl8180_max2820.h" | 27 | #include "max2820.h" |
| 28 | 28 | ||
| 29 | static const u32 max2820_chan[] = { | 29 | static const u32 max2820_chan[] = { |
| 30 | 12, /* CH 1 */ | 30 | 12, /* CH 1 */ |
diff --git a/drivers/net/wireless/rtl818x/rtl8180_max2820.h b/drivers/net/wireless/rtl818x/rtl8180/max2820.h index 61cf6d1e7d57..61cf6d1e7d57 100644 --- a/drivers/net/wireless/rtl818x/rtl8180_max2820.h +++ b/drivers/net/wireless/rtl818x/rtl8180/max2820.h | |||
diff --git a/drivers/net/wireless/rtl818x/rtl8180.h b/drivers/net/wireless/rtl818x/rtl8180/rtl8180.h index 30523314da43..30523314da43 100644 --- a/drivers/net/wireless/rtl818x/rtl8180.h +++ b/drivers/net/wireless/rtl818x/rtl8180/rtl8180.h | |||
diff --git a/drivers/net/wireless/rtl818x/rtl8180_rtl8225.c b/drivers/net/wireless/rtl818x/rtl8180/rtl8225.c index 69e4d4745dae..7c4574ba9d75 100644 --- a/drivers/net/wireless/rtl818x/rtl8180_rtl8225.c +++ b/drivers/net/wireless/rtl818x/rtl8180/rtl8225.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #include <net/mac80211.h> | 21 | #include <net/mac80211.h> |
| 22 | 22 | ||
| 23 | #include "rtl8180.h" | 23 | #include "rtl8180.h" |
| 24 | #include "rtl8180_rtl8225.h" | 24 | #include "rtl8225.h" |
| 25 | 25 | ||
| 26 | static void rtl8225_write(struct ieee80211_hw *dev, u8 addr, u16 data) | 26 | static void rtl8225_write(struct ieee80211_hw *dev, u8 addr, u16 data) |
| 27 | { | 27 | { |
diff --git a/drivers/net/wireless/rtl818x/rtl8180_rtl8225.h b/drivers/net/wireless/rtl818x/rtl8180/rtl8225.h index 310013a2d726..310013a2d726 100644 --- a/drivers/net/wireless/rtl818x/rtl8180_rtl8225.h +++ b/drivers/net/wireless/rtl818x/rtl8180/rtl8225.h | |||
diff --git a/drivers/net/wireless/rtl818x/rtl8180_sa2400.c b/drivers/net/wireless/rtl818x/rtl8180/sa2400.c index d064fcc5ec08..44771a6286af 100644 --- a/drivers/net/wireless/rtl818x/rtl8180_sa2400.c +++ b/drivers/net/wireless/rtl818x/rtl8180/sa2400.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | #include <net/mac80211.h> | 25 | #include <net/mac80211.h> |
| 26 | 26 | ||
| 27 | #include "rtl8180.h" | 27 | #include "rtl8180.h" |
| 28 | #include "rtl8180_sa2400.h" | 28 | #include "sa2400.h" |
| 29 | 29 | ||
| 30 | static const u32 sa2400_chan[] = { | 30 | static const u32 sa2400_chan[] = { |
| 31 | 0x00096c, /* ch1 */ | 31 | 0x00096c, /* ch1 */ |
diff --git a/drivers/net/wireless/rtl818x/rtl8180_sa2400.h b/drivers/net/wireless/rtl818x/rtl8180/sa2400.h index a4aaa0d413f1..a4aaa0d413f1 100644 --- a/drivers/net/wireless/rtl818x/rtl8180_sa2400.h +++ b/drivers/net/wireless/rtl818x/rtl8180/sa2400.h | |||
diff --git a/drivers/net/wireless/rtl818x/rtl8187/Makefile b/drivers/net/wireless/rtl818x/rtl8187/Makefile new file mode 100644 index 000000000000..7b6299268ecf --- /dev/null +++ b/drivers/net/wireless/rtl818x/rtl8187/Makefile | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | rtl8187-objs := dev.o rtl8225.o leds.o rfkill.o | ||
| 2 | |||
| 3 | obj-$(CONFIG_RTL8187) += rtl8187.o | ||
| 4 | |||
| 5 | ccflags-y += -Idrivers/net/wireless/rtl818x | ||
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c index eeee244fcaab..6b82cac37ee3 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c | |||
| @@ -29,11 +29,11 @@ | |||
| 29 | #include <net/mac80211.h> | 29 | #include <net/mac80211.h> |
| 30 | 30 | ||
| 31 | #include "rtl8187.h" | 31 | #include "rtl8187.h" |
| 32 | #include "rtl8187_rtl8225.h" | 32 | #include "rtl8225.h" |
| 33 | #ifdef CONFIG_RTL8187_LEDS | 33 | #ifdef CONFIG_RTL8187_LEDS |
| 34 | #include "rtl8187_leds.h" | 34 | #include "leds.h" |
| 35 | #endif | 35 | #endif |
| 36 | #include "rtl8187_rfkill.h" | 36 | #include "rfkill.h" |
| 37 | 37 | ||
| 38 | MODULE_AUTHOR("Michael Wu <flamingice@sourmilk.net>"); | 38 | MODULE_AUTHOR("Michael Wu <flamingice@sourmilk.net>"); |
| 39 | MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>"); | 39 | MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>"); |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_leds.c b/drivers/net/wireless/rtl818x/rtl8187/leds.c index 4637337d5ce6..2e0de2f5f0f9 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_leds.c +++ b/drivers/net/wireless/rtl818x/rtl8187/leds.c | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #include <linux/eeprom_93cx6.h> | 20 | #include <linux/eeprom_93cx6.h> |
| 21 | 21 | ||
| 22 | #include "rtl8187.h" | 22 | #include "rtl8187.h" |
| 23 | #include "rtl8187_leds.h" | 23 | #include "leds.h" |
| 24 | 24 | ||
| 25 | static void led_turn_on(struct work_struct *work) | 25 | static void led_turn_on(struct work_struct *work) |
| 26 | { | 26 | { |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_leds.h b/drivers/net/wireless/rtl818x/rtl8187/leds.h index d743c96d4a20..d743c96d4a20 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_leds.h +++ b/drivers/net/wireless/rtl818x/rtl8187/leds.h | |||
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rfkill.c b/drivers/net/wireless/rtl818x/rtl8187/rfkill.c index 03555e1e0cab..34116719974a 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_rfkill.c +++ b/drivers/net/wireless/rtl818x/rtl8187/rfkill.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #include <net/mac80211.h> | 18 | #include <net/mac80211.h> |
| 19 | 19 | ||
| 20 | #include "rtl8187.h" | 20 | #include "rtl8187.h" |
| 21 | #include "rtl8187_rfkill.h" | 21 | #include "rfkill.h" |
| 22 | 22 | ||
| 23 | static bool rtl8187_is_radio_enabled(struct rtl8187_priv *priv) | 23 | static bool rtl8187_is_radio_enabled(struct rtl8187_priv *priv) |
| 24 | { | 24 | { |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rfkill.h b/drivers/net/wireless/rtl818x/rtl8187/rfkill.h index e12575e96d11..e12575e96d11 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_rfkill.h +++ b/drivers/net/wireless/rtl818x/rtl8187/rfkill.h | |||
diff --git a/drivers/net/wireless/rtl818x/rtl8187.h b/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h index 98878160a65a..0d7b1423f77b 100644 --- a/drivers/net/wireless/rtl818x/rtl8187.h +++ b/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | #define RTL8187_H | 16 | #define RTL8187_H |
| 17 | 17 | ||
| 18 | #include "rtl818x.h" | 18 | #include "rtl818x.h" |
| 19 | #include "rtl8187_leds.h" | 19 | #include "leds.h" |
| 20 | 20 | ||
| 21 | #define RTL8187_EEPROM_TXPWR_BASE 0x05 | 21 | #define RTL8187_EEPROM_TXPWR_BASE 0x05 |
| 22 | #define RTL8187_EEPROM_MAC_ADDR 0x07 | 22 | #define RTL8187_EEPROM_MAC_ADDR 0x07 |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c b/drivers/net/wireless/rtl818x/rtl8187/rtl8225.c index 5c6666f09ac1..908903f721f5 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c +++ b/drivers/net/wireless/rtl818x/rtl8187/rtl8225.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #include <net/mac80211.h> | 21 | #include <net/mac80211.h> |
| 22 | 22 | ||
| 23 | #include "rtl8187.h" | 23 | #include "rtl8187.h" |
| 24 | #include "rtl8187_rtl8225.h" | 24 | #include "rtl8225.h" |
| 25 | 25 | ||
| 26 | static void rtl8225_write_bitbang(struct ieee80211_hw *dev, u8 addr, u16 data) | 26 | static void rtl8225_write_bitbang(struct ieee80211_hw *dev, u8 addr, u16 data) |
| 27 | { | 27 | { |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.h b/drivers/net/wireless/rtl818x/rtl8187/rtl8225.h index 20c5b6ead0f6..20c5b6ead0f6 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.h +++ b/drivers/net/wireless/rtl818x/rtl8187/rtl8225.h | |||
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c index f6cc07369d75..cf0b73e51fc2 100644 --- a/drivers/net/wireless/rtlwifi/base.c +++ b/drivers/net/wireless/rtlwifi/base.c | |||
| @@ -251,16 +251,14 @@ void rtl_init_rfkill(struct ieee80211_hw *hw) | |||
| 251 | bool blocked; | 251 | bool blocked; |
| 252 | u8 valid = 0; | 252 | u8 valid = 0; |
| 253 | 253 | ||
| 254 | /*set init state to rf on */ | ||
| 255 | rtlpriv->rfkill.rfkill_state = 1; | ||
| 256 | |||
| 257 | radio_state = rtlpriv->cfg->ops->radio_onoff_checking(hw, &valid); | 254 | radio_state = rtlpriv->cfg->ops->radio_onoff_checking(hw, &valid); |
| 258 | 255 | ||
| 259 | if (valid) { | 256 | /*set init state to that of switch */ |
| 260 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, | 257 | rtlpriv->rfkill.rfkill_state = radio_state; |
| 261 | (KERN_INFO "wireless switch is %s\n", | 258 | printk(KERN_INFO "rtlwifi: wireless switch is %s\n", |
| 262 | rtlpriv->rfkill.rfkill_state ? "on" : "off")); | 259 | rtlpriv->rfkill.rfkill_state ? "on" : "off"); |
| 263 | 260 | ||
| 261 | if (valid) { | ||
| 264 | rtlpriv->rfkill.rfkill_state = radio_state; | 262 | rtlpriv->rfkill.rfkill_state = radio_state; |
| 265 | 263 | ||
| 266 | blocked = (rtlpriv->rfkill.rfkill_state == 1) ? 0 : 1; | 264 | blocked = (rtlpriv->rfkill.rfkill_state == 1) ? 0 : 1; |
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index bf3b5748ee19..0fa36aa6701a 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
| @@ -612,10 +612,22 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
| 612 | num_rx_inperiod++; | 612 | num_rx_inperiod++; |
| 613 | } | 613 | } |
| 614 | 614 | ||
| 615 | if (unlikely(!rtl_action_proc(hw, skb, false))) | 615 | if (unlikely(!rtl_action_proc(hw, skb, |
| 616 | false))) { | ||
| 616 | dev_kfree_skb_any(skb); | 617 | dev_kfree_skb_any(skb); |
| 617 | else | 618 | } else { |
| 618 | ieee80211_rx_irqsafe(hw, skb); | 619 | struct sk_buff *uskb = NULL; |
| 620 | u8 *pdata; | ||
| 621 | uskb = dev_alloc_skb(skb->len + 128); | ||
| 622 | memcpy(IEEE80211_SKB_RXCB(uskb), | ||
| 623 | &rx_status, | ||
| 624 | sizeof(rx_status)); | ||
| 625 | pdata = (u8 *)skb_put(uskb, skb->len); | ||
| 626 | memcpy(pdata, skb->data, skb->len); | ||
| 627 | dev_kfree_skb_any(skb); | ||
| 628 | |||
| 629 | ieee80211_rx_irqsafe(hw, uskb); | ||
| 630 | } | ||
| 619 | } else { | 631 | } else { |
| 620 | dev_kfree_skb_any(skb); | 632 | dev_kfree_skb_any(skb); |
| 621 | } | 633 | } |
| @@ -1608,7 +1620,7 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, | |||
| 1608 | pcipriv->ndis_adapter.pcibridge_funcnum = | 1620 | pcipriv->ndis_adapter.pcibridge_funcnum = |
| 1609 | PCI_FUNC(bridge_pdev->devfn); | 1621 | PCI_FUNC(bridge_pdev->devfn); |
| 1610 | pcipriv->ndis_adapter.pcibridge_pciehdr_offset = | 1622 | pcipriv->ndis_adapter.pcibridge_pciehdr_offset = |
| 1611 | bridge_pdev->pcie_cap; | 1623 | pci_pcie_cap(bridge_pdev); |
| 1612 | pcipriv->ndis_adapter.pcicfg_addrport = | 1624 | pcipriv->ndis_adapter.pcicfg_addrport = |
| 1613 | (pcipriv->ndis_adapter.pcibridge_busnum << 16) | | 1625 | (pcipriv->ndis_adapter.pcibridge_busnum << 16) | |
| 1614 | (pcipriv->ndis_adapter.pcibridge_devnum << 11) | | 1626 | (pcipriv->ndis_adapter.pcibridge_devnum << 11) | |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c index 1266dbe44176..1c41a0c93506 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | |||
| @@ -962,17 +962,6 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw) | |||
| 962 | rtl_cam_reset_all_entry(hw); | 962 | rtl_cam_reset_all_entry(hw); |
| 963 | rtl92ce_enable_hw_security_config(hw); | 963 | rtl92ce_enable_hw_security_config(hw); |
| 964 | ppsc->rfpwr_state = ERFON; | 964 | ppsc->rfpwr_state = ERFON; |
| 965 | tmp_u1b = rtl_read_byte(rtlpriv, REG_MAC_PINMUX_CFG)&(~BIT(3)); | ||
| 966 | rtl_write_byte(rtlpriv, REG_MAC_PINMUX_CFG, tmp_u1b); | ||
| 967 | tmp_u1b = rtl_read_byte(rtlpriv, REG_GPIO_IO_SEL); | ||
| 968 | ppsc->rfoff_reason |= (tmp_u1b & BIT(3)) ? 0 : RF_CHANGE_BY_HW; | ||
| 969 | if (ppsc->rfoff_reason > RF_CHANGE_BY_PS) | ||
| 970 | rtl_ps_set_rf_state(hw, ERFOFF, ppsc->rfoff_reason, true); | ||
| 971 | else { | ||
| 972 | ppsc->rfpwr_state = ERFON; | ||
| 973 | ppsc->rfoff_reason = 0; | ||
| 974 | rtlpriv->cfg->ops->led_control(hw, LED_CTL_POWER_ON); | ||
| 975 | } | ||
| 976 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_ETHER_ADDR, mac->mac_addr); | 965 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_ETHER_ADDR, mac->mac_addr); |
| 977 | _rtl92ce_enable_aspm_back_door(hw); | 966 | _rtl92ce_enable_aspm_back_door(hw); |
| 978 | rtlpriv->intf_ops->enable_aspm(hw); | 967 | rtlpriv->intf_ops->enable_aspm(hw); |
diff --git a/drivers/net/wireless/wl1251/boot.c b/drivers/net/wireless/wl1251/boot.c index 61572dfa1f60..d729daf8e841 100644 --- a/drivers/net/wireless/wl1251/boot.c +++ b/drivers/net/wireless/wl1251/boot.c | |||
| @@ -19,7 +19,6 @@ | |||
| 19 | * | 19 | * |
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #include <linux/gpio.h> | ||
| 23 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
| 24 | 23 | ||
| 25 | #include "reg.h" | 24 | #include "reg.h" |
diff --git a/drivers/net/wireless/wl12xx/boot.c b/drivers/net/wireless/wl12xx/boot.c index 4a9f929725fd..4df04f84d7f1 100644 --- a/drivers/net/wireless/wl12xx/boot.c +++ b/drivers/net/wireless/wl12xx/boot.c | |||
| @@ -21,7 +21,6 @@ | |||
| 21 | * | 21 | * |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | #include <linux/gpio.h> | ||
| 25 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
| 26 | 25 | ||
| 27 | #include "acx.h" | 26 | #include "acx.h" |
diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c index ee079ab9fb28..5a0985d4ce15 100644 --- a/drivers/ssb/scan.c +++ b/drivers/ssb/scan.c | |||
| @@ -405,10 +405,10 @@ int ssb_bus_scan(struct ssb_bus *bus, | |||
| 405 | /* Ignore PCI cores on PCI-E cards. | 405 | /* Ignore PCI cores on PCI-E cards. |
| 406 | * Ignore PCI-E cores on PCI cards. */ | 406 | * Ignore PCI-E cores on PCI cards. */ |
| 407 | if (dev->id.coreid == SSB_DEV_PCI) { | 407 | if (dev->id.coreid == SSB_DEV_PCI) { |
| 408 | if (bus->host_pci->is_pcie) | 408 | if (pci_is_pcie(bus->host_pci)) |
| 409 | continue; | 409 | continue; |
| 410 | } else { | 410 | } else { |
| 411 | if (!bus->host_pci->is_pcie) | 411 | if (!pci_is_pcie(bus->host_pci)) |
| 412 | continue; | 412 | continue; |
| 413 | } | 413 | } |
| 414 | } | 414 | } |
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index d81ea7997701..0c5e72503b77 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
| @@ -144,6 +144,7 @@ struct bt_skb_cb { | |||
| 144 | __u8 tx_seq; | 144 | __u8 tx_seq; |
| 145 | __u8 retries; | 145 | __u8 retries; |
| 146 | __u8 sar; | 146 | __u8 sar; |
| 147 | unsigned short channel; | ||
| 147 | }; | 148 | }; |
| 148 | #define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb)) | 149 | #define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb)) |
| 149 | 150 | ||
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index f3c5ed6d7bda..29a7a8ca0438 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
| @@ -934,9 +934,13 @@ static inline struct hci_sco_hdr *hci_sco_hdr(const struct sk_buff *skb) | |||
| 934 | struct sockaddr_hci { | 934 | struct sockaddr_hci { |
| 935 | sa_family_t hci_family; | 935 | sa_family_t hci_family; |
| 936 | unsigned short hci_dev; | 936 | unsigned short hci_dev; |
| 937 | unsigned short hci_channel; | ||
| 937 | }; | 938 | }; |
| 938 | #define HCI_DEV_NONE 0xffff | 939 | #define HCI_DEV_NONE 0xffff |
| 939 | 940 | ||
| 941 | #define HCI_CHANNEL_RAW 0 | ||
| 942 | #define HCI_CHANNEL_CONTROL 1 | ||
| 943 | |||
| 940 | struct hci_filter { | 944 | struct hci_filter { |
| 941 | unsigned long type_mask; | 945 | unsigned long type_mask; |
| 942 | unsigned long event_mask[2]; | 946 | unsigned long event_mask[2]; |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 9c08625617a1..a29feb01854e 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
| @@ -129,6 +129,7 @@ struct hci_dev { | |||
| 129 | wait_queue_head_t req_wait_q; | 129 | wait_queue_head_t req_wait_q; |
| 130 | __u32 req_status; | 130 | __u32 req_status; |
| 131 | __u32 req_result; | 131 | __u32 req_result; |
| 132 | __u16 req_last_cmd; | ||
| 132 | 133 | ||
| 133 | struct inquiry_cache inq_cache; | 134 | struct inquiry_cache inq_cache; |
| 134 | struct hci_conn_hash conn_hash; | 135 | struct hci_conn_hash conn_hash; |
| @@ -660,6 +661,11 @@ void hci_si_event(struct hci_dev *hdev, int type, int dlen, void *data); | |||
| 660 | /* ----- HCI Sockets ----- */ | 661 | /* ----- HCI Sockets ----- */ |
| 661 | void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb); | 662 | void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb); |
| 662 | 663 | ||
| 664 | /* Management interface */ | ||
| 665 | int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len); | ||
| 666 | int mgmt_index_added(u16 index); | ||
| 667 | int mgmt_index_removed(u16 index); | ||
| 668 | |||
| 663 | /* HCI info for socket */ | 669 | /* HCI info for socket */ |
| 664 | #define hci_pi(sk) ((struct hci_pinfo *) sk) | 670 | #define hci_pi(sk) ((struct hci_pinfo *) sk) |
| 665 | 671 | ||
| @@ -668,6 +674,7 @@ struct hci_pinfo { | |||
| 668 | struct hci_dev *hdev; | 674 | struct hci_dev *hdev; |
| 669 | struct hci_filter filter; | 675 | struct hci_filter filter; |
| 670 | __u32 cmsg_mask; | 676 | __u32 cmsg_mask; |
| 677 | unsigned short channel; | ||
| 671 | }; | 678 | }; |
| 672 | 679 | ||
| 673 | /* HCI security filter */ | 680 | /* HCI security filter */ |
| @@ -687,6 +694,6 @@ struct hci_sec_filter { | |||
| 687 | #define hci_req_lock(d) mutex_lock(&d->req_lock) | 694 | #define hci_req_lock(d) mutex_lock(&d->req_lock) |
| 688 | #define hci_req_unlock(d) mutex_unlock(&d->req_lock) | 695 | #define hci_req_unlock(d) mutex_unlock(&d->req_lock) |
| 689 | 696 | ||
| 690 | void hci_req_complete(struct hci_dev *hdev, int result); | 697 | void hci_req_complete(struct hci_dev *hdev, __u16 cmd, int result); |
| 691 | 698 | ||
| 692 | #endif /* __HCI_CORE_H */ | 699 | #endif /* __HCI_CORE_H */ |
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h new file mode 100644 index 000000000000..ca29c1367ffd --- /dev/null +++ b/include/net/bluetooth/mgmt.h | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | /* | ||
| 2 | BlueZ - Bluetooth protocol stack for Linux | ||
| 3 | |||
| 4 | Copyright (C) 2010 Nokia Corporation | ||
| 5 | |||
| 6 | This program is free software; you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License version 2 as | ||
| 8 | published by the Free Software Foundation; | ||
| 9 | |||
| 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
| 11 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 12 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. | ||
| 13 | IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY | ||
| 14 | CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES | ||
| 15 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 16 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 17 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 18 | |||
| 19 | ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, | ||
| 20 | COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS | ||
| 21 | SOFTWARE IS DISCLAIMED. | ||
| 22 | */ | ||
| 23 | |||
| 24 | struct mgmt_hdr { | ||
| 25 | __le16 opcode; | ||
| 26 | __le16 len; | ||
| 27 | } __packed; | ||
| 28 | #define MGMT_HDR_SIZE 4 | ||
| 29 | |||
| 30 | #define MGMT_OP_READ_VERSION 0x0001 | ||
| 31 | struct mgmt_rp_read_version { | ||
| 32 | __u8 version; | ||
| 33 | __le16 revision; | ||
| 34 | } __packed; | ||
| 35 | |||
| 36 | #define MGMT_OP_READ_INDEX_LIST 0x0003 | ||
| 37 | struct mgmt_rp_read_index_list { | ||
| 38 | __le16 num_controllers; | ||
| 39 | __le16 index[0]; | ||
| 40 | } __packed; | ||
| 41 | |||
| 42 | #define MGMT_OP_READ_INFO 0x0004 | ||
| 43 | struct mgmt_cp_read_info { | ||
| 44 | __le16 index; | ||
| 45 | } __packed; | ||
| 46 | struct mgmt_rp_read_info { | ||
| 47 | __le16 index; | ||
| 48 | __u8 type; | ||
| 49 | __u8 powered; | ||
| 50 | __u8 discoverable; | ||
| 51 | __u8 pairable; | ||
| 52 | __u8 sec_mode; | ||
| 53 | bdaddr_t bdaddr; | ||
| 54 | __u8 dev_class[3]; | ||
| 55 | __u8 features[8]; | ||
| 56 | __u16 manufacturer; | ||
| 57 | __u8 hci_ver; | ||
| 58 | __u16 hci_rev; | ||
| 59 | } __packed; | ||
| 60 | |||
| 61 | #define MGMT_EV_CMD_COMPLETE 0x0001 | ||
| 62 | struct mgmt_ev_cmd_complete { | ||
| 63 | __le16 opcode; | ||
| 64 | __u8 data[0]; | ||
| 65 | } __packed; | ||
| 66 | |||
| 67 | #define MGMT_EV_CMD_STATUS 0x0002 | ||
| 68 | struct mgmt_ev_cmd_status { | ||
| 69 | __u8 status; | ||
| 70 | __le16 opcode; | ||
| 71 | } __packed; | ||
| 72 | |||
| 73 | #define MGMT_EV_CONTROLLER_ERROR 0x0003 | ||
| 74 | struct mgmt_ev_controller_error { | ||
| 75 | __le16 index; | ||
| 76 | __u8 error_code; | ||
| 77 | } __packed; | ||
| 78 | |||
| 79 | #define MGMT_EV_INDEX_ADDED 0x0004 | ||
| 80 | struct mgmt_ev_index_added { | ||
| 81 | __le16 index; | ||
| 82 | } __packed; | ||
| 83 | |||
| 84 | #define MGMT_EV_INDEX_REMOVED 0x0005 | ||
| 85 | struct mgmt_ev_index_removed { | ||
| 86 | __le16 index; | ||
| 87 | } __packed; | ||
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 479c35e160e3..5b3fd5add7a4 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
| @@ -365,6 +365,7 @@ enum mac80211_tx_control_flags { | |||
| 365 | IEEE80211_TX_INTFL_NL80211_FRAME_TX = BIT(21), | 365 | IEEE80211_TX_INTFL_NL80211_FRAME_TX = BIT(21), |
| 366 | IEEE80211_TX_CTL_LDPC = BIT(22), | 366 | IEEE80211_TX_CTL_LDPC = BIT(22), |
| 367 | IEEE80211_TX_CTL_STBC = BIT(23) | BIT(24), | 367 | IEEE80211_TX_CTL_STBC = BIT(23) | BIT(24), |
| 368 | IEEE80211_TX_CTL_TX_OFFCHAN = BIT(25), | ||
| 368 | }; | 369 | }; |
| 369 | 370 | ||
| 370 | #define IEEE80211_TX_CTL_STBC_SHIFT 23 | 371 | #define IEEE80211_TX_CTL_STBC_SHIFT 23 |
| @@ -1824,6 +1825,12 @@ struct ieee80211_ops { | |||
| 1824 | int (*napi_poll)(struct ieee80211_hw *hw, int budget); | 1825 | int (*napi_poll)(struct ieee80211_hw *hw, int budget); |
| 1825 | int (*set_antenna)(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant); | 1826 | int (*set_antenna)(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant); |
| 1826 | int (*get_antenna)(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant); | 1827 | int (*get_antenna)(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant); |
| 1828 | |||
| 1829 | int (*remain_on_channel)(struct ieee80211_hw *hw, | ||
| 1830 | struct ieee80211_channel *chan, | ||
| 1831 | enum nl80211_channel_type channel_type, | ||
| 1832 | int duration); | ||
| 1833 | int (*cancel_remain_on_channel)(struct ieee80211_hw *hw); | ||
| 1827 | }; | 1834 | }; |
| 1828 | 1835 | ||
| 1829 | /** | 1836 | /** |
| @@ -2729,6 +2736,18 @@ void ieee80211_request_smps(struct ieee80211_vif *vif, | |||
| 2729 | */ | 2736 | */ |
| 2730 | void ieee80211_key_removed(struct ieee80211_key_conf *key_conf); | 2737 | void ieee80211_key_removed(struct ieee80211_key_conf *key_conf); |
| 2731 | 2738 | ||
| 2739 | /** | ||
| 2740 | * ieee80211_ready_on_channel - notification of remain-on-channel start | ||
| 2741 | * @hw: pointer as obtained from ieee80211_alloc_hw() | ||
| 2742 | */ | ||
| 2743 | void ieee80211_ready_on_channel(struct ieee80211_hw *hw); | ||
| 2744 | |||
| 2745 | /** | ||
| 2746 | * ieee80211_remain_on_channel_expired - remain_on_channel duration expired | ||
| 2747 | * @hw: pointer as obtained from ieee80211_alloc_hw() | ||
| 2748 | */ | ||
| 2749 | void ieee80211_remain_on_channel_expired(struct ieee80211_hw *hw); | ||
| 2750 | |||
| 2732 | /* Rate control API */ | 2751 | /* Rate control API */ |
| 2733 | 2752 | ||
| 2734 | /** | 2753 | /** |
diff --git a/net/bluetooth/Makefile b/net/bluetooth/Makefile index 7ca1f46a471a..250f954f0213 100644 --- a/net/bluetooth/Makefile +++ b/net/bluetooth/Makefile | |||
| @@ -10,4 +10,4 @@ obj-$(CONFIG_BT_BNEP) += bnep/ | |||
| 10 | obj-$(CONFIG_BT_CMTP) += cmtp/ | 10 | obj-$(CONFIG_BT_CMTP) += cmtp/ |
| 11 | obj-$(CONFIG_BT_HIDP) += hidp/ | 11 | obj-$(CONFIG_BT_HIDP) += hidp/ |
| 12 | 12 | ||
| 13 | bluetooth-y := af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o hci_sysfs.o lib.o | 13 | bluetooth-y := af_bluetooth.o hci_core.o hci_conn.o hci_event.o mgmt.o hci_sock.o hci_sysfs.o lib.o |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 51c61f75a797..8b602d881fd7 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
| @@ -91,9 +91,16 @@ static void hci_notify(struct hci_dev *hdev, int event) | |||
| 91 | 91 | ||
| 92 | /* ---- HCI requests ---- */ | 92 | /* ---- HCI requests ---- */ |
| 93 | 93 | ||
| 94 | void hci_req_complete(struct hci_dev *hdev, int result) | 94 | void hci_req_complete(struct hci_dev *hdev, __u16 cmd, int result) |
| 95 | { | 95 | { |
| 96 | BT_DBG("%s result 0x%2.2x", hdev->name, result); | 96 | BT_DBG("%s command 0x%04x result 0x%2.2x", hdev->name, cmd, result); |
| 97 | |||
| 98 | /* If the request has set req_last_cmd (typical for multi-HCI | ||
| 99 | * command requests) check if the completed command matches | ||
| 100 | * this, and if not just return. Single HCI command requests | ||
| 101 | * typically leave req_last_cmd as 0 */ | ||
| 102 | if (hdev->req_last_cmd && cmd != hdev->req_last_cmd) | ||
| 103 | return; | ||
| 97 | 104 | ||
| 98 | if (hdev->req_status == HCI_REQ_PEND) { | 105 | if (hdev->req_status == HCI_REQ_PEND) { |
| 99 | hdev->req_result = result; | 106 | hdev->req_result = result; |
| @@ -149,7 +156,7 @@ static int __hci_request(struct hci_dev *hdev, void (*req)(struct hci_dev *hdev, | |||
| 149 | break; | 156 | break; |
| 150 | } | 157 | } |
| 151 | 158 | ||
| 152 | hdev->req_status = hdev->req_result = 0; | 159 | hdev->req_last_cmd = hdev->req_status = hdev->req_result = 0; |
| 153 | 160 | ||
| 154 | BT_DBG("%s end: err %d", hdev->name, err); | 161 | BT_DBG("%s end: err %d", hdev->name, err); |
| 155 | 162 | ||
| @@ -252,6 +259,8 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt) | |||
| 252 | /* Connection accept timeout ~20 secs */ | 259 | /* Connection accept timeout ~20 secs */ |
| 253 | param = cpu_to_le16(0x7d00); | 260 | param = cpu_to_le16(0x7d00); |
| 254 | hci_send_cmd(hdev, HCI_OP_WRITE_CA_TIMEOUT, 2, ¶m); | 261 | hci_send_cmd(hdev, HCI_OP_WRITE_CA_TIMEOUT, 2, ¶m); |
| 262 | |||
| 263 | hdev->req_last_cmd = HCI_OP_WRITE_CA_TIMEOUT; | ||
| 255 | } | 264 | } |
| 256 | 265 | ||
| 257 | static void hci_scan_req(struct hci_dev *hdev, unsigned long opt) | 266 | static void hci_scan_req(struct hci_dev *hdev, unsigned long opt) |
| @@ -960,6 +969,7 @@ int hci_register_dev(struct hci_dev *hdev) | |||
| 960 | } | 969 | } |
| 961 | } | 970 | } |
| 962 | 971 | ||
| 972 | mgmt_index_added(hdev->id); | ||
| 963 | hci_notify(hdev, HCI_DEV_REG); | 973 | hci_notify(hdev, HCI_DEV_REG); |
| 964 | 974 | ||
| 965 | return id; | 975 | return id; |
| @@ -989,6 +999,7 @@ int hci_unregister_dev(struct hci_dev *hdev) | |||
| 989 | for (i = 0; i < NUM_REASSEMBLY; i++) | 999 | for (i = 0; i < NUM_REASSEMBLY; i++) |
| 990 | kfree_skb(hdev->reassembly[i]); | 1000 | kfree_skb(hdev->reassembly[i]); |
| 991 | 1001 | ||
| 1002 | mgmt_index_removed(hdev->id); | ||
| 992 | hci_notify(hdev, HCI_DEV_UNREG); | 1003 | hci_notify(hdev, HCI_DEV_UNREG); |
| 993 | 1004 | ||
| 994 | if (hdev->rfkill) { | 1005 | if (hdev->rfkill) { |
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 8923b36a67a2..38100170d380 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
| @@ -58,7 +58,7 @@ static void hci_cc_inquiry_cancel(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 58 | 58 | ||
| 59 | clear_bit(HCI_INQUIRY, &hdev->flags); | 59 | clear_bit(HCI_INQUIRY, &hdev->flags); |
| 60 | 60 | ||
| 61 | hci_req_complete(hdev, status); | 61 | hci_req_complete(hdev, HCI_OP_INQUIRY_CANCEL, status); |
| 62 | 62 | ||
| 63 | hci_conn_check_pending(hdev); | 63 | hci_conn_check_pending(hdev); |
| 64 | } | 64 | } |
| @@ -174,7 +174,7 @@ static void hci_cc_write_def_link_policy(struct hci_dev *hdev, struct sk_buff *s | |||
| 174 | if (!status) | 174 | if (!status) |
| 175 | hdev->link_policy = get_unaligned_le16(sent); | 175 | hdev->link_policy = get_unaligned_le16(sent); |
| 176 | 176 | ||
| 177 | hci_req_complete(hdev, status); | 177 | hci_req_complete(hdev, HCI_OP_WRITE_DEF_LINK_POLICY, status); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb) | 180 | static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb) |
| @@ -183,7 +183,7 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 183 | 183 | ||
| 184 | BT_DBG("%s status 0x%x", hdev->name, status); | 184 | BT_DBG("%s status 0x%x", hdev->name, status); |
| 185 | 185 | ||
| 186 | hci_req_complete(hdev, status); | 186 | hci_req_complete(hdev, HCI_OP_RESET, status); |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | static void hci_cc_write_local_name(struct hci_dev *hdev, struct sk_buff *skb) | 189 | static void hci_cc_write_local_name(struct hci_dev *hdev, struct sk_buff *skb) |
| @@ -235,7 +235,7 @@ static void hci_cc_write_auth_enable(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 235 | clear_bit(HCI_AUTH, &hdev->flags); | 235 | clear_bit(HCI_AUTH, &hdev->flags); |
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | hci_req_complete(hdev, status); | 238 | hci_req_complete(hdev, HCI_OP_WRITE_AUTH_ENABLE, status); |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | static void hci_cc_write_encrypt_mode(struct hci_dev *hdev, struct sk_buff *skb) | 241 | static void hci_cc_write_encrypt_mode(struct hci_dev *hdev, struct sk_buff *skb) |
| @@ -258,7 +258,7 @@ static void hci_cc_write_encrypt_mode(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 258 | clear_bit(HCI_ENCRYPT, &hdev->flags); | 258 | clear_bit(HCI_ENCRYPT, &hdev->flags); |
| 259 | } | 259 | } |
| 260 | 260 | ||
| 261 | hci_req_complete(hdev, status); | 261 | hci_req_complete(hdev, HCI_OP_WRITE_ENCRYPT_MODE, status); |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | static void hci_cc_write_scan_enable(struct hci_dev *hdev, struct sk_buff *skb) | 264 | static void hci_cc_write_scan_enable(struct hci_dev *hdev, struct sk_buff *skb) |
| @@ -285,7 +285,7 @@ static void hci_cc_write_scan_enable(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 285 | set_bit(HCI_PSCAN, &hdev->flags); | 285 | set_bit(HCI_PSCAN, &hdev->flags); |
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | hci_req_complete(hdev, status); | 288 | hci_req_complete(hdev, HCI_OP_WRITE_SCAN_ENABLE, status); |
| 289 | } | 289 | } |
| 290 | 290 | ||
| 291 | static void hci_cc_read_class_of_dev(struct hci_dev *hdev, struct sk_buff *skb) | 291 | static void hci_cc_read_class_of_dev(struct hci_dev *hdev, struct sk_buff *skb) |
| @@ -383,7 +383,7 @@ static void hci_cc_host_buffer_size(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 383 | 383 | ||
| 384 | BT_DBG("%s status 0x%x", hdev->name, status); | 384 | BT_DBG("%s status 0x%x", hdev->name, status); |
| 385 | 385 | ||
| 386 | hci_req_complete(hdev, status); | 386 | hci_req_complete(hdev, HCI_OP_HOST_BUFFER_SIZE, status); |
| 387 | } | 387 | } |
| 388 | 388 | ||
| 389 | static void hci_cc_read_ssp_mode(struct hci_dev *hdev, struct sk_buff *skb) | 389 | static void hci_cc_read_ssp_mode(struct hci_dev *hdev, struct sk_buff *skb) |
| @@ -536,7 +536,16 @@ static void hci_cc_read_bd_addr(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 536 | if (!rp->status) | 536 | if (!rp->status) |
| 537 | bacpy(&hdev->bdaddr, &rp->bdaddr); | 537 | bacpy(&hdev->bdaddr, &rp->bdaddr); |
| 538 | 538 | ||
| 539 | hci_req_complete(hdev, rp->status); | 539 | hci_req_complete(hdev, HCI_OP_READ_BD_ADDR, rp->status); |
| 540 | } | ||
| 541 | |||
| 542 | static void hci_cc_write_ca_timeout(struct hci_dev *hdev, struct sk_buff *skb) | ||
| 543 | { | ||
| 544 | __u8 status = *((__u8 *) skb->data); | ||
| 545 | |||
| 546 | BT_DBG("%s status 0x%x", hdev->name, status); | ||
| 547 | |||
| 548 | hci_req_complete(hdev, HCI_OP_WRITE_CA_TIMEOUT, status); | ||
| 540 | } | 549 | } |
| 541 | 550 | ||
| 542 | static inline void hci_cs_inquiry(struct hci_dev *hdev, __u8 status) | 551 | static inline void hci_cs_inquiry(struct hci_dev *hdev, __u8 status) |
| @@ -544,7 +553,7 @@ static inline void hci_cs_inquiry(struct hci_dev *hdev, __u8 status) | |||
| 544 | BT_DBG("%s status 0x%x", hdev->name, status); | 553 | BT_DBG("%s status 0x%x", hdev->name, status); |
| 545 | 554 | ||
| 546 | if (status) { | 555 | if (status) { |
| 547 | hci_req_complete(hdev, status); | 556 | hci_req_complete(hdev, HCI_OP_INQUIRY, status); |
| 548 | 557 | ||
| 549 | hci_conn_check_pending(hdev); | 558 | hci_conn_check_pending(hdev); |
| 550 | } else | 559 | } else |
| @@ -871,7 +880,7 @@ static inline void hci_inquiry_complete_evt(struct hci_dev *hdev, struct sk_buff | |||
| 871 | 880 | ||
| 872 | clear_bit(HCI_INQUIRY, &hdev->flags); | 881 | clear_bit(HCI_INQUIRY, &hdev->flags); |
| 873 | 882 | ||
| 874 | hci_req_complete(hdev, status); | 883 | hci_req_complete(hdev, HCI_OP_INQUIRY, status); |
| 875 | 884 | ||
| 876 | hci_conn_check_pending(hdev); | 885 | hci_conn_check_pending(hdev); |
| 877 | } | 886 | } |
| @@ -1379,6 +1388,10 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk | |||
| 1379 | hci_cc_read_bd_addr(hdev, skb); | 1388 | hci_cc_read_bd_addr(hdev, skb); |
| 1380 | break; | 1389 | break; |
| 1381 | 1390 | ||
| 1391 | case HCI_OP_WRITE_CA_TIMEOUT: | ||
| 1392 | hci_cc_write_ca_timeout(hdev, skb); | ||
| 1393 | break; | ||
| 1394 | |||
| 1382 | default: | 1395 | default: |
| 1383 | BT_DBG("%s opcode 0x%x", hdev->name, opcode); | 1396 | BT_DBG("%s opcode 0x%x", hdev->name, opcode); |
| 1384 | break; | 1397 | break; |
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index b3753bad2a55..29827c77f6ce 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
| @@ -49,6 +49,8 @@ | |||
| 49 | #include <net/bluetooth/bluetooth.h> | 49 | #include <net/bluetooth/bluetooth.h> |
| 50 | #include <net/bluetooth/hci_core.h> | 50 | #include <net/bluetooth/hci_core.h> |
| 51 | 51 | ||
| 52 | static int enable_mgmt; | ||
| 53 | |||
| 52 | /* ----- HCI socket interface ----- */ | 54 | /* ----- HCI socket interface ----- */ |
| 53 | 55 | ||
| 54 | static inline int hci_test_bit(int nr, void *addr) | 56 | static inline int hci_test_bit(int nr, void *addr) |
| @@ -102,6 +104,12 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 102 | if (skb->sk == sk) | 104 | if (skb->sk == sk) |
| 103 | continue; | 105 | continue; |
| 104 | 106 | ||
| 107 | if (bt_cb(skb)->channel != hci_pi(sk)->channel) | ||
| 108 | continue; | ||
| 109 | |||
| 110 | if (bt_cb(skb)->channel == HCI_CHANNEL_CONTROL) | ||
| 111 | goto clone; | ||
| 112 | |||
| 105 | /* Apply filter */ | 113 | /* Apply filter */ |
| 106 | flt = &hci_pi(sk)->filter; | 114 | flt = &hci_pi(sk)->filter; |
| 107 | 115 | ||
| @@ -125,12 +133,14 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 125 | continue; | 133 | continue; |
| 126 | } | 134 | } |
| 127 | 135 | ||
| 136 | clone: | ||
| 128 | nskb = skb_clone(skb, GFP_ATOMIC); | 137 | nskb = skb_clone(skb, GFP_ATOMIC); |
| 129 | if (!nskb) | 138 | if (!nskb) |
| 130 | continue; | 139 | continue; |
| 131 | 140 | ||
| 132 | /* Put type byte before the data */ | 141 | /* Put type byte before the data */ |
| 133 | memcpy(skb_push(nskb, 1), &bt_cb(nskb)->pkt_type, 1); | 142 | if (bt_cb(skb)->channel == HCI_CHANNEL_RAW) |
| 143 | memcpy(skb_push(nskb, 1), &bt_cb(nskb)->pkt_type, 1); | ||
| 134 | 144 | ||
| 135 | if (sock_queue_rcv_skb(sk, nskb)) | 145 | if (sock_queue_rcv_skb(sk, nskb)) |
| 136 | kfree_skb(nskb); | 146 | kfree_skb(nskb); |
| @@ -353,25 +363,38 @@ static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long a | |||
| 353 | 363 | ||
| 354 | static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len) | 364 | static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len) |
| 355 | { | 365 | { |
| 356 | struct sockaddr_hci *haddr = (struct sockaddr_hci *) addr; | 366 | struct sockaddr_hci haddr; |
| 357 | struct sock *sk = sock->sk; | 367 | struct sock *sk = sock->sk; |
| 358 | struct hci_dev *hdev = NULL; | 368 | struct hci_dev *hdev = NULL; |
| 359 | int err = 0; | 369 | int len, err = 0; |
| 360 | 370 | ||
| 361 | BT_DBG("sock %p sk %p", sock, sk); | 371 | BT_DBG("sock %p sk %p", sock, sk); |
| 362 | 372 | ||
| 363 | if (!haddr || haddr->hci_family != AF_BLUETOOTH) | 373 | if (!addr) |
| 374 | return -EINVAL; | ||
| 375 | |||
| 376 | memset(&haddr, 0, sizeof(haddr)); | ||
| 377 | len = min_t(unsigned int, sizeof(haddr), addr_len); | ||
| 378 | memcpy(&haddr, addr, len); | ||
| 379 | |||
| 380 | if (haddr.hci_family != AF_BLUETOOTH) | ||
| 381 | return -EINVAL; | ||
| 382 | |||
| 383 | if (haddr.hci_channel > HCI_CHANNEL_CONTROL) | ||
| 384 | return -EINVAL; | ||
| 385 | |||
| 386 | if (haddr.hci_channel == HCI_CHANNEL_CONTROL && !enable_mgmt) | ||
| 364 | return -EINVAL; | 387 | return -EINVAL; |
| 365 | 388 | ||
| 366 | lock_sock(sk); | 389 | lock_sock(sk); |
| 367 | 390 | ||
| 368 | if (hci_pi(sk)->hdev) { | 391 | if (sk->sk_state == BT_BOUND || hci_pi(sk)->hdev) { |
| 369 | err = -EALREADY; | 392 | err = -EALREADY; |
| 370 | goto done; | 393 | goto done; |
| 371 | } | 394 | } |
| 372 | 395 | ||
| 373 | if (haddr->hci_dev != HCI_DEV_NONE) { | 396 | if (haddr.hci_dev != HCI_DEV_NONE) { |
| 374 | hdev = hci_dev_get(haddr->hci_dev); | 397 | hdev = hci_dev_get(haddr.hci_dev); |
| 375 | if (!hdev) { | 398 | if (!hdev) { |
| 376 | err = -ENODEV; | 399 | err = -ENODEV; |
| 377 | goto done; | 400 | goto done; |
| @@ -380,6 +403,7 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_le | |||
| 380 | atomic_inc(&hdev->promisc); | 403 | atomic_inc(&hdev->promisc); |
| 381 | } | 404 | } |
| 382 | 405 | ||
| 406 | hci_pi(sk)->channel = haddr.hci_channel; | ||
| 383 | hci_pi(sk)->hdev = hdev; | 407 | hci_pi(sk)->hdev = hdev; |
| 384 | sk->sk_state = BT_BOUND; | 408 | sk->sk_state = BT_BOUND; |
| 385 | 409 | ||
| @@ -502,6 +526,17 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
| 502 | 526 | ||
| 503 | lock_sock(sk); | 527 | lock_sock(sk); |
| 504 | 528 | ||
| 529 | switch (hci_pi(sk)->channel) { | ||
| 530 | case HCI_CHANNEL_RAW: | ||
| 531 | break; | ||
| 532 | case HCI_CHANNEL_CONTROL: | ||
| 533 | err = mgmt_control(sk, msg, len); | ||
| 534 | goto done; | ||
| 535 | default: | ||
| 536 | err = -EINVAL; | ||
| 537 | goto done; | ||
| 538 | } | ||
| 539 | |||
| 505 | hdev = hci_pi(sk)->hdev; | 540 | hdev = hci_pi(sk)->hdev; |
| 506 | if (!hdev) { | 541 | if (!hdev) { |
| 507 | err = -EBADFD; | 542 | err = -EBADFD; |
| @@ -831,3 +866,6 @@ void __exit hci_sock_cleanup(void) | |||
| 831 | 866 | ||
| 832 | proto_unregister(&hci_sk_proto); | 867 | proto_unregister(&hci_sk_proto); |
| 833 | } | 868 | } |
| 869 | |||
| 870 | module_param(enable_mgmt, bool, 0644); | ||
| 871 | MODULE_PARM_DESC(enable_mgmt, "Enable Management interface"); | ||
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index c12eccfdfe01..c791fcda7b2d 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
| @@ -3124,8 +3124,14 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr | |||
| 3124 | if (!sk) | 3124 | if (!sk) |
| 3125 | return -ENOENT; | 3125 | return -ENOENT; |
| 3126 | 3126 | ||
| 3127 | if (sk->sk_state == BT_DISCONN) | 3127 | if (sk->sk_state != BT_CONFIG) { |
| 3128 | struct l2cap_cmd_rej rej; | ||
| 3129 | |||
| 3130 | rej.reason = cpu_to_le16(0x0002); | ||
| 3131 | l2cap_send_cmd(conn, cmd->ident, L2CAP_COMMAND_REJ, | ||
| 3132 | sizeof(rej), &rej); | ||
| 3128 | goto unlock; | 3133 | goto unlock; |
| 3134 | } | ||
| 3129 | 3135 | ||
| 3130 | /* Reject if config buffer is too small. */ | 3136 | /* Reject if config buffer is too small. */ |
| 3131 | len = cmd_len - sizeof(*req); | 3137 | len = cmd_len - sizeof(*req); |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c new file mode 100644 index 000000000000..f827fd908380 --- /dev/null +++ b/net/bluetooth/mgmt.c | |||
| @@ -0,0 +1,308 @@ | |||
| 1 | /* | ||
| 2 | BlueZ - Bluetooth protocol stack for Linux | ||
| 3 | Copyright (C) 2010 Nokia Corporation | ||
| 4 | |||
| 5 | This program is free software; you can redistribute it and/or modify | ||
| 6 | it under the terms of the GNU General Public License version 2 as | ||
| 7 | published by the Free Software Foundation; | ||
| 8 | |||
| 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
| 10 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 11 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. | ||
| 12 | IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY | ||
| 13 | CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES | ||
| 14 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 15 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 16 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 17 | |||
| 18 | ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, | ||
| 19 | COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS | ||
| 20 | SOFTWARE IS DISCLAIMED. | ||
| 21 | */ | ||
| 22 | |||
| 23 | /* Bluetooth HCI Management interface */ | ||
| 24 | |||
| 25 | #include <asm/uaccess.h> | ||
| 26 | #include <asm/unaligned.h> | ||
| 27 | |||
| 28 | #include <net/bluetooth/bluetooth.h> | ||
| 29 | #include <net/bluetooth/hci_core.h> | ||
| 30 | #include <net/bluetooth/mgmt.h> | ||
| 31 | |||
| 32 | #define MGMT_VERSION 0 | ||
| 33 | #define MGMT_REVISION 1 | ||
| 34 | |||
| 35 | static int cmd_status(struct sock *sk, u16 cmd, u8 status) | ||
| 36 | { | ||
| 37 | struct sk_buff *skb; | ||
| 38 | struct mgmt_hdr *hdr; | ||
| 39 | struct mgmt_ev_cmd_status *ev; | ||
| 40 | |||
| 41 | BT_DBG("sock %p", sk); | ||
| 42 | |||
| 43 | skb = alloc_skb(sizeof(*hdr) + sizeof(*ev), GFP_ATOMIC); | ||
| 44 | if (!skb) | ||
| 45 | return -ENOMEM; | ||
| 46 | |||
| 47 | hdr = (void *) skb_put(skb, sizeof(*hdr)); | ||
| 48 | |||
| 49 | hdr->opcode = cpu_to_le16(MGMT_EV_CMD_STATUS); | ||
| 50 | hdr->len = cpu_to_le16(sizeof(*ev)); | ||
| 51 | |||
| 52 | ev = (void *) skb_put(skb, sizeof(*ev)); | ||
| 53 | ev->status = status; | ||
| 54 | put_unaligned_le16(cmd, &ev->opcode); | ||
| 55 | |||
| 56 | if (sock_queue_rcv_skb(sk, skb) < 0) | ||
| 57 | kfree_skb(skb); | ||
| 58 | |||
| 59 | return 0; | ||
| 60 | } | ||
| 61 | |||
| 62 | static int read_version(struct sock *sk) | ||
| 63 | { | ||
| 64 | struct sk_buff *skb; | ||
| 65 | struct mgmt_hdr *hdr; | ||
| 66 | struct mgmt_ev_cmd_complete *ev; | ||
| 67 | struct mgmt_rp_read_version *rp; | ||
| 68 | |||
| 69 | BT_DBG("sock %p", sk); | ||
| 70 | |||
| 71 | skb = alloc_skb(sizeof(*hdr) + sizeof(*ev) + sizeof(*rp), GFP_ATOMIC); | ||
| 72 | if (!skb) | ||
| 73 | return -ENOMEM; | ||
| 74 | |||
| 75 | hdr = (void *) skb_put(skb, sizeof(*hdr)); | ||
| 76 | hdr->opcode = cpu_to_le16(MGMT_EV_CMD_COMPLETE); | ||
| 77 | hdr->len = cpu_to_le16(sizeof(*ev) + sizeof(*rp)); | ||
| 78 | |||
| 79 | ev = (void *) skb_put(skb, sizeof(*ev)); | ||
| 80 | put_unaligned_le16(MGMT_OP_READ_VERSION, &ev->opcode); | ||
| 81 | |||
| 82 | rp = (void *) skb_put(skb, sizeof(*rp)); | ||
| 83 | rp->version = MGMT_VERSION; | ||
| 84 | put_unaligned_le16(MGMT_REVISION, &rp->revision); | ||
| 85 | |||
| 86 | if (sock_queue_rcv_skb(sk, skb) < 0) | ||
| 87 | kfree_skb(skb); | ||
| 88 | |||
| 89 | return 0; | ||
| 90 | } | ||
| 91 | |||
| 92 | static int read_index_list(struct sock *sk) | ||
| 93 | { | ||
| 94 | struct sk_buff *skb; | ||
| 95 | struct mgmt_hdr *hdr; | ||
| 96 | struct mgmt_ev_cmd_complete *ev; | ||
| 97 | struct mgmt_rp_read_index_list *rp; | ||
| 98 | struct list_head *p; | ||
| 99 | size_t body_len; | ||
| 100 | u16 count; | ||
| 101 | int i; | ||
| 102 | |||
| 103 | BT_DBG("sock %p", sk); | ||
| 104 | |||
| 105 | read_lock(&hci_dev_list_lock); | ||
| 106 | |||
| 107 | count = 0; | ||
| 108 | list_for_each(p, &hci_dev_list) { | ||
| 109 | count++; | ||
| 110 | } | ||
| 111 | |||
| 112 | body_len = sizeof(*ev) + sizeof(*rp) + (2 * count); | ||
| 113 | skb = alloc_skb(sizeof(*hdr) + body_len, GFP_ATOMIC); | ||
| 114 | if (!skb) | ||
| 115 | return -ENOMEM; | ||
| 116 | |||
| 117 | hdr = (void *) skb_put(skb, sizeof(*hdr)); | ||
| 118 | hdr->opcode = cpu_to_le16(MGMT_EV_CMD_COMPLETE); | ||
| 119 | hdr->len = cpu_to_le16(body_len); | ||
| 120 | |||
| 121 | ev = (void *) skb_put(skb, sizeof(*ev)); | ||
| 122 | put_unaligned_le16(MGMT_OP_READ_INDEX_LIST, &ev->opcode); | ||
| 123 | |||
| 124 | rp = (void *) skb_put(skb, sizeof(*rp) + (2 * count)); | ||
| 125 | put_unaligned_le16(count, &rp->num_controllers); | ||
| 126 | |||
| 127 | i = 0; | ||
| 128 | list_for_each(p, &hci_dev_list) { | ||
| 129 | struct hci_dev *d = list_entry(p, struct hci_dev, list); | ||
| 130 | put_unaligned_le16(d->id, &rp->index[i++]); | ||
| 131 | BT_DBG("Added hci%u", d->id); | ||
| 132 | } | ||
| 133 | |||
| 134 | read_unlock(&hci_dev_list_lock); | ||
| 135 | |||
| 136 | if (sock_queue_rcv_skb(sk, skb) < 0) | ||
| 137 | kfree_skb(skb); | ||
| 138 | |||
| 139 | return 0; | ||
| 140 | } | ||
| 141 | |||
| 142 | static int read_controller_info(struct sock *sk, unsigned char *data, u16 len) | ||
| 143 | { | ||
| 144 | struct sk_buff *skb; | ||
| 145 | struct mgmt_hdr *hdr; | ||
| 146 | struct mgmt_ev_cmd_complete *ev; | ||
| 147 | struct mgmt_rp_read_info *rp; | ||
| 148 | struct mgmt_cp_read_info *cp; | ||
| 149 | struct hci_dev *hdev; | ||
| 150 | u16 dev_id; | ||
| 151 | |||
| 152 | BT_DBG("sock %p", sk); | ||
| 153 | |||
| 154 | if (len != 2) | ||
| 155 | return cmd_status(sk, MGMT_OP_READ_INFO, EINVAL); | ||
| 156 | |||
| 157 | skb = alloc_skb(sizeof(*hdr) + sizeof(*ev) + sizeof(*rp), GFP_ATOMIC); | ||
| 158 | if (!skb) | ||
| 159 | return -ENOMEM; | ||
| 160 | |||
| 161 | hdr = (void *) skb_put(skb, sizeof(*hdr)); | ||
| 162 | hdr->opcode = cpu_to_le16(MGMT_EV_CMD_COMPLETE); | ||
| 163 | hdr->len = cpu_to_le16(sizeof(*ev) + sizeof(*rp)); | ||
| 164 | |||
| 165 | ev = (void *) skb_put(skb, sizeof(*ev)); | ||
| 166 | put_unaligned_le16(MGMT_OP_READ_INFO, &ev->opcode); | ||
| 167 | |||
| 168 | rp = (void *) skb_put(skb, sizeof(*rp)); | ||
| 169 | |||
| 170 | cp = (void *) data; | ||
| 171 | dev_id = get_unaligned_le16(&cp->index); | ||
| 172 | |||
| 173 | BT_DBG("request for hci%u", dev_id); | ||
| 174 | |||
| 175 | hdev = hci_dev_get(dev_id); | ||
| 176 | if (!hdev) { | ||
| 177 | kfree_skb(skb); | ||
| 178 | return cmd_status(sk, MGMT_OP_READ_INFO, ENODEV); | ||
| 179 | } | ||
| 180 | |||
| 181 | hci_dev_lock_bh(hdev); | ||
| 182 | |||
| 183 | put_unaligned_le16(hdev->id, &rp->index); | ||
| 184 | rp->type = hdev->dev_type; | ||
| 185 | |||
| 186 | rp->powered = test_bit(HCI_UP, &hdev->flags); | ||
| 187 | rp->discoverable = test_bit(HCI_ISCAN, &hdev->flags); | ||
| 188 | rp->pairable = test_bit(HCI_PSCAN, &hdev->flags); | ||
| 189 | |||
| 190 | if (test_bit(HCI_AUTH, &hdev->flags)) | ||
| 191 | rp->sec_mode = 3; | ||
| 192 | else if (hdev->ssp_mode > 0) | ||
| 193 | rp->sec_mode = 4; | ||
| 194 | else | ||
| 195 | rp->sec_mode = 2; | ||
| 196 | |||
| 197 | bacpy(&rp->bdaddr, &hdev->bdaddr); | ||
| 198 | memcpy(rp->features, hdev->features, 8); | ||
| 199 | memcpy(rp->dev_class, hdev->dev_class, 3); | ||
| 200 | put_unaligned_le16(hdev->manufacturer, &rp->manufacturer); | ||
| 201 | rp->hci_ver = hdev->hci_ver; | ||
| 202 | put_unaligned_le16(hdev->hci_rev, &rp->hci_rev); | ||
| 203 | |||
| 204 | hci_dev_unlock_bh(hdev); | ||
| 205 | hci_dev_put(hdev); | ||
| 206 | |||
| 207 | if (sock_queue_rcv_skb(sk, skb) < 0) | ||
| 208 | kfree_skb(skb); | ||
| 209 | |||
| 210 | return 0; | ||
| 211 | } | ||
| 212 | |||
| 213 | int mgmt_control(struct sock *sk, struct msghdr *msg, size_t msglen) | ||
| 214 | { | ||
| 215 | unsigned char *buf; | ||
| 216 | struct mgmt_hdr *hdr; | ||
| 217 | u16 opcode, len; | ||
| 218 | int err; | ||
| 219 | |||
| 220 | BT_DBG("got %zu bytes", msglen); | ||
| 221 | |||
| 222 | if (msglen < sizeof(*hdr)) | ||
| 223 | return -EINVAL; | ||
| 224 | |||
| 225 | buf = kmalloc(msglen, GFP_ATOMIC); | ||
| 226 | if (!buf) | ||
| 227 | return -ENOMEM; | ||
| 228 | |||
| 229 | if (memcpy_fromiovec(buf, msg->msg_iov, msglen)) { | ||
| 230 | err = -EFAULT; | ||
| 231 | goto done; | ||
| 232 | } | ||
| 233 | |||
| 234 | hdr = (struct mgmt_hdr *) buf; | ||
| 235 | opcode = get_unaligned_le16(&hdr->opcode); | ||
| 236 | len = get_unaligned_le16(&hdr->len); | ||
| 237 | |||
| 238 | if (len != msglen - sizeof(*hdr)) { | ||
| 239 | err = -EINVAL; | ||
| 240 | goto done; | ||
| 241 | } | ||
| 242 | |||
| 243 | switch (opcode) { | ||
| 244 | case MGMT_OP_READ_VERSION: | ||
| 245 | err = read_version(sk); | ||
| 246 | break; | ||
| 247 | case MGMT_OP_READ_INDEX_LIST: | ||
| 248 | err = read_index_list(sk); | ||
| 249 | break; | ||
| 250 | case MGMT_OP_READ_INFO: | ||
| 251 | err = read_controller_info(sk, buf + sizeof(*hdr), len); | ||
| 252 | break; | ||
| 253 | default: | ||
| 254 | BT_DBG("Unknown op %u", opcode); | ||
| 255 | err = cmd_status(sk, opcode, 0x01); | ||
| 256 | break; | ||
| 257 | } | ||
| 258 | |||
| 259 | if (err < 0) | ||
| 260 | goto done; | ||
| 261 | |||
| 262 | err = msglen; | ||
| 263 | |||
| 264 | done: | ||
| 265 | kfree(buf); | ||
| 266 | return err; | ||
| 267 | } | ||
| 268 | |||
| 269 | static int mgmt_event(u16 event, void *data, u16 data_len) | ||
| 270 | { | ||
| 271 | struct sk_buff *skb; | ||
| 272 | struct mgmt_hdr *hdr; | ||
| 273 | |||
| 274 | skb = alloc_skb(sizeof(*hdr) + data_len, GFP_ATOMIC); | ||
| 275 | if (!skb) | ||
| 276 | return -ENOMEM; | ||
| 277 | |||
| 278 | bt_cb(skb)->channel = HCI_CHANNEL_CONTROL; | ||
| 279 | |||
| 280 | hdr = (void *) skb_put(skb, sizeof(*hdr)); | ||
| 281 | hdr->opcode = cpu_to_le16(event); | ||
| 282 | hdr->len = cpu_to_le16(data_len); | ||
| 283 | |||
| 284 | memcpy(skb_put(skb, data_len), data, data_len); | ||
| 285 | |||
| 286 | hci_send_to_sock(NULL, skb); | ||
| 287 | kfree_skb(skb); | ||
| 288 | |||
| 289 | return 0; | ||
| 290 | } | ||
| 291 | |||
| 292 | int mgmt_index_added(u16 index) | ||
| 293 | { | ||
| 294 | struct mgmt_ev_index_added ev; | ||
| 295 | |||
| 296 | put_unaligned_le16(index, &ev.index); | ||
| 297 | |||
| 298 | return mgmt_event(MGMT_EV_INDEX_ADDED, &ev, sizeof(ev)); | ||
| 299 | } | ||
| 300 | |||
| 301 | int mgmt_index_removed(u16 index) | ||
| 302 | { | ||
| 303 | struct mgmt_ev_index_added ev; | ||
| 304 | |||
| 305 | put_unaligned_le16(index, &ev.index); | ||
| 306 | |||
| 307 | return mgmt_event(MGMT_EV_INDEX_REMOVED, &ev, sizeof(ev)); | ||
| 308 | } | ||
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 5892b0302454..4bc8a9250cfd 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
| @@ -1593,6 +1593,37 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, | |||
| 1593 | return 0; | 1593 | return 0; |
| 1594 | } | 1594 | } |
| 1595 | 1595 | ||
| 1596 | static int ieee80211_remain_on_channel_hw(struct ieee80211_local *local, | ||
| 1597 | struct net_device *dev, | ||
| 1598 | struct ieee80211_channel *chan, | ||
| 1599 | enum nl80211_channel_type chantype, | ||
| 1600 | unsigned int duration, u64 *cookie) | ||
| 1601 | { | ||
| 1602 | int ret; | ||
| 1603 | u32 random_cookie; | ||
| 1604 | |||
| 1605 | lockdep_assert_held(&local->mtx); | ||
| 1606 | |||
| 1607 | if (local->hw_roc_cookie) | ||
| 1608 | return -EBUSY; | ||
| 1609 | /* must be nonzero */ | ||
| 1610 | random_cookie = random32() | 1; | ||
| 1611 | |||
| 1612 | *cookie = random_cookie; | ||
| 1613 | local->hw_roc_dev = dev; | ||
| 1614 | local->hw_roc_cookie = random_cookie; | ||
| 1615 | local->hw_roc_channel = chan; | ||
| 1616 | local->hw_roc_channel_type = chantype; | ||
| 1617 | local->hw_roc_duration = duration; | ||
| 1618 | ret = drv_remain_on_channel(local, chan, chantype, duration); | ||
| 1619 | if (ret) { | ||
| 1620 | local->hw_roc_channel = NULL; | ||
| 1621 | local->hw_roc_cookie = 0; | ||
| 1622 | } | ||
| 1623 | |||
| 1624 | return ret; | ||
| 1625 | } | ||
| 1626 | |||
| 1596 | static int ieee80211_remain_on_channel(struct wiphy *wiphy, | 1627 | static int ieee80211_remain_on_channel(struct wiphy *wiphy, |
| 1597 | struct net_device *dev, | 1628 | struct net_device *dev, |
| 1598 | struct ieee80211_channel *chan, | 1629 | struct ieee80211_channel *chan, |
| @@ -1601,16 +1632,63 @@ static int ieee80211_remain_on_channel(struct wiphy *wiphy, | |||
| 1601 | u64 *cookie) | 1632 | u64 *cookie) |
| 1602 | { | 1633 | { |
| 1603 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 1634 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
| 1635 | struct ieee80211_local *local = sdata->local; | ||
| 1636 | |||
| 1637 | if (local->ops->remain_on_channel) { | ||
| 1638 | int ret; | ||
| 1639 | |||
| 1640 | mutex_lock(&local->mtx); | ||
| 1641 | ret = ieee80211_remain_on_channel_hw(local, dev, | ||
| 1642 | chan, channel_type, | ||
| 1643 | duration, cookie); | ||
| 1644 | local->hw_roc_for_tx = false; | ||
| 1645 | mutex_unlock(&local->mtx); | ||
| 1646 | |||
| 1647 | return ret; | ||
| 1648 | } | ||
| 1604 | 1649 | ||
| 1605 | return ieee80211_wk_remain_on_channel(sdata, chan, channel_type, | 1650 | return ieee80211_wk_remain_on_channel(sdata, chan, channel_type, |
| 1606 | duration, cookie); | 1651 | duration, cookie); |
| 1607 | } | 1652 | } |
| 1608 | 1653 | ||
| 1654 | static int ieee80211_cancel_remain_on_channel_hw(struct ieee80211_local *local, | ||
| 1655 | u64 cookie) | ||
| 1656 | { | ||
| 1657 | int ret; | ||
| 1658 | |||
| 1659 | lockdep_assert_held(&local->mtx); | ||
| 1660 | |||
| 1661 | if (local->hw_roc_cookie != cookie) | ||
| 1662 | return -ENOENT; | ||
| 1663 | |||
| 1664 | ret = drv_cancel_remain_on_channel(local); | ||
| 1665 | if (ret) | ||
| 1666 | return ret; | ||
| 1667 | |||
| 1668 | local->hw_roc_cookie = 0; | ||
| 1669 | local->hw_roc_channel = NULL; | ||
| 1670 | |||
| 1671 | ieee80211_recalc_idle(local); | ||
| 1672 | |||
| 1673 | return 0; | ||
| 1674 | } | ||
| 1675 | |||
| 1609 | static int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy, | 1676 | static int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy, |
| 1610 | struct net_device *dev, | 1677 | struct net_device *dev, |
| 1611 | u64 cookie) | 1678 | u64 cookie) |
| 1612 | { | 1679 | { |
| 1613 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 1680 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
| 1681 | struct ieee80211_local *local = sdata->local; | ||
| 1682 | |||
| 1683 | if (local->ops->cancel_remain_on_channel) { | ||
| 1684 | int ret; | ||
| 1685 | |||
| 1686 | mutex_lock(&local->mtx); | ||
| 1687 | ret = ieee80211_cancel_remain_on_channel_hw(local, cookie); | ||
| 1688 | mutex_unlock(&local->mtx); | ||
| 1689 | |||
| 1690 | return ret; | ||
| 1691 | } | ||
| 1614 | 1692 | ||
| 1615 | return ieee80211_wk_cancel_remain_on_channel(sdata, cookie); | 1693 | return ieee80211_wk_cancel_remain_on_channel(sdata, cookie); |
| 1616 | } | 1694 | } |
| @@ -1662,6 +1740,12 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, | |||
| 1662 | channel_type != local->_oper_channel_type)) | 1740 | channel_type != local->_oper_channel_type)) |
| 1663 | is_offchan = true; | 1741 | is_offchan = true; |
| 1664 | 1742 | ||
| 1743 | if (chan == local->hw_roc_channel) { | ||
| 1744 | /* TODO: check channel type? */ | ||
| 1745 | is_offchan = false; | ||
| 1746 | flags |= IEEE80211_TX_CTL_TX_OFFCHAN; | ||
| 1747 | } | ||
| 1748 | |||
| 1665 | if (is_offchan && !offchan) | 1749 | if (is_offchan && !offchan) |
| 1666 | return -EBUSY; | 1750 | return -EBUSY; |
| 1667 | 1751 | ||
| @@ -1700,6 +1784,49 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, | |||
| 1700 | 1784 | ||
| 1701 | *cookie = (unsigned long) skb; | 1785 | *cookie = (unsigned long) skb; |
| 1702 | 1786 | ||
| 1787 | if (is_offchan && local->ops->remain_on_channel) { | ||
| 1788 | unsigned int duration; | ||
| 1789 | int ret; | ||
| 1790 | |||
| 1791 | mutex_lock(&local->mtx); | ||
| 1792 | /* | ||
| 1793 | * If the duration is zero, then the driver | ||
| 1794 | * wouldn't actually do anything. Set it to | ||
| 1795 | * 100 for now. | ||
| 1796 | * | ||
| 1797 | * TODO: cancel the off-channel operation | ||
| 1798 | * when we get the SKB's TX status and | ||
| 1799 | * the wait time was zero before. | ||
| 1800 | */ | ||
| 1801 | duration = 100; | ||
| 1802 | if (wait) | ||
| 1803 | duration = wait; | ||
| 1804 | ret = ieee80211_remain_on_channel_hw(local, dev, chan, | ||
| 1805 | channel_type, | ||
| 1806 | duration, cookie); | ||
| 1807 | if (ret) { | ||
| 1808 | kfree_skb(skb); | ||
| 1809 | mutex_unlock(&local->mtx); | ||
| 1810 | return ret; | ||
| 1811 | } | ||
| 1812 | |||
| 1813 | local->hw_roc_for_tx = true; | ||
| 1814 | local->hw_roc_duration = wait; | ||
| 1815 | |||
| 1816 | /* | ||
| 1817 | * queue up frame for transmission after | ||
| 1818 | * ieee80211_ready_on_channel call | ||
| 1819 | */ | ||
| 1820 | |||
| 1821 | /* modify cookie to prevent API mismatches */ | ||
| 1822 | *cookie ^= 2; | ||
| 1823 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_TX_OFFCHAN; | ||
| 1824 | local->hw_roc_skb = skb; | ||
| 1825 | mutex_unlock(&local->mtx); | ||
| 1826 | |||
| 1827 | return 0; | ||
| 1828 | } | ||
| 1829 | |||
| 1703 | /* | 1830 | /* |
| 1704 | * Can transmit right away if the channel was the | 1831 | * Can transmit right away if the channel was the |
| 1705 | * right one and there's no wait involved... If a | 1832 | * right one and there's no wait involved... If a |
| @@ -1740,6 +1867,21 @@ static int ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy, | |||
| 1740 | int ret = -ENOENT; | 1867 | int ret = -ENOENT; |
| 1741 | 1868 | ||
| 1742 | mutex_lock(&local->mtx); | 1869 | mutex_lock(&local->mtx); |
| 1870 | |||
| 1871 | if (local->ops->cancel_remain_on_channel) { | ||
| 1872 | cookie ^= 2; | ||
| 1873 | ret = ieee80211_cancel_remain_on_channel_hw(local, cookie); | ||
| 1874 | |||
| 1875 | if (ret == 0) { | ||
| 1876 | kfree_skb(local->hw_roc_skb); | ||
| 1877 | local->hw_roc_skb = NULL; | ||
| 1878 | } | ||
| 1879 | |||
| 1880 | mutex_unlock(&local->mtx); | ||
| 1881 | |||
| 1882 | return ret; | ||
| 1883 | } | ||
| 1884 | |||
| 1743 | list_for_each_entry(wk, &local->work_list, list) { | 1885 | list_for_each_entry(wk, &local->work_list, list) { |
| 1744 | if (wk->sdata != sdata) | 1886 | if (wk->sdata != sdata) |
| 1745 | continue; | 1887 | continue; |
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index af0c4398cceb..98d589960a49 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h | |||
| @@ -465,4 +465,34 @@ static inline int drv_get_antenna(struct ieee80211_local *local, | |||
| 465 | return ret; | 465 | return ret; |
| 466 | } | 466 | } |
| 467 | 467 | ||
| 468 | static inline int drv_remain_on_channel(struct ieee80211_local *local, | ||
| 469 | struct ieee80211_channel *chan, | ||
| 470 | enum nl80211_channel_type chantype, | ||
| 471 | unsigned int duration) | ||
| 472 | { | ||
| 473 | int ret; | ||
| 474 | |||
| 475 | might_sleep(); | ||
| 476 | |||
| 477 | trace_drv_remain_on_channel(local, chan, chantype, duration); | ||
| 478 | ret = local->ops->remain_on_channel(&local->hw, chan, chantype, | ||
| 479 | duration); | ||
| 480 | trace_drv_return_int(local, ret); | ||
| 481 | |||
| 482 | return ret; | ||
| 483 | } | ||
| 484 | |||
| 485 | static inline int drv_cancel_remain_on_channel(struct ieee80211_local *local) | ||
| 486 | { | ||
| 487 | int ret; | ||
| 488 | |||
| 489 | might_sleep(); | ||
| 490 | |||
| 491 | trace_drv_cancel_remain_on_channel(local); | ||
| 492 | ret = local->ops->cancel_remain_on_channel(&local->hw); | ||
| 493 | trace_drv_return_int(local, ret); | ||
| 494 | |||
| 495 | return ret; | ||
| 496 | } | ||
| 497 | |||
| 468 | #endif /* __MAC80211_DRIVER_OPS */ | 498 | #endif /* __MAC80211_DRIVER_OPS */ |
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h index c2772f23ac9c..49c84218b2f4 100644 --- a/net/mac80211/driver-trace.h +++ b/net/mac80211/driver-trace.h | |||
| @@ -933,6 +933,50 @@ TRACE_EVENT(drv_get_antenna, | |||
| 933 | ) | 933 | ) |
| 934 | ); | 934 | ); |
| 935 | 935 | ||
| 936 | TRACE_EVENT(drv_remain_on_channel, | ||
| 937 | TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan, | ||
| 938 | enum nl80211_channel_type chantype, unsigned int duration), | ||
| 939 | |||
| 940 | TP_ARGS(local, chan, chantype, duration), | ||
| 941 | |||
| 942 | TP_STRUCT__entry( | ||
| 943 | LOCAL_ENTRY | ||
| 944 | __field(int, center_freq) | ||
| 945 | __field(int, channel_type) | ||
| 946 | __field(unsigned int, duration) | ||
| 947 | ), | ||
| 948 | |||
| 949 | TP_fast_assign( | ||
| 950 | LOCAL_ASSIGN; | ||
| 951 | __entry->center_freq = chan->center_freq; | ||
| 952 | __entry->channel_type = chantype; | ||
| 953 | __entry->duration = duration; | ||
| 954 | ), | ||
| 955 | |||
| 956 | TP_printk( | ||
| 957 | LOCAL_PR_FMT " freq:%dMHz duration:%dms", | ||
| 958 | LOCAL_PR_ARG, __entry->center_freq, __entry->duration | ||
| 959 | ) | ||
| 960 | ); | ||
| 961 | |||
| 962 | TRACE_EVENT(drv_cancel_remain_on_channel, | ||
| 963 | TP_PROTO(struct ieee80211_local *local), | ||
| 964 | |||
| 965 | TP_ARGS(local), | ||
| 966 | |||
| 967 | TP_STRUCT__entry( | ||
| 968 | LOCAL_ENTRY | ||
| 969 | ), | ||
| 970 | |||
| 971 | TP_fast_assign( | ||
| 972 | LOCAL_ASSIGN; | ||
| 973 | ), | ||
| 974 | |||
| 975 | TP_printk( | ||
| 976 | LOCAL_PR_FMT, LOCAL_PR_ARG | ||
| 977 | ) | ||
| 978 | ); | ||
| 979 | |||
| 936 | /* | 980 | /* |
| 937 | * Tracing for API calls that drivers call. | 981 | * Tracing for API calls that drivers call. |
| 938 | */ | 982 | */ |
| @@ -1170,6 +1214,42 @@ TRACE_EVENT(api_chswitch_done, | |||
| 1170 | ) | 1214 | ) |
| 1171 | ); | 1215 | ); |
| 1172 | 1216 | ||
| 1217 | TRACE_EVENT(api_ready_on_channel, | ||
| 1218 | TP_PROTO(struct ieee80211_local *local), | ||
| 1219 | |||
| 1220 | TP_ARGS(local), | ||
| 1221 | |||
| 1222 | TP_STRUCT__entry( | ||
| 1223 | LOCAL_ENTRY | ||
| 1224 | ), | ||
| 1225 | |||
| 1226 | TP_fast_assign( | ||
| 1227 | LOCAL_ASSIGN; | ||
| 1228 | ), | ||
| 1229 | |||
| 1230 | TP_printk( | ||
| 1231 | LOCAL_PR_FMT, LOCAL_PR_ARG | ||
| 1232 | ) | ||
| 1233 | ); | ||
| 1234 | |||
| 1235 | TRACE_EVENT(api_remain_on_channel_expired, | ||
| 1236 | TP_PROTO(struct ieee80211_local *local), | ||
| 1237 | |||
| 1238 | TP_ARGS(local), | ||
| 1239 | |||
| 1240 | TP_STRUCT__entry( | ||
| 1241 | LOCAL_ENTRY | ||
| 1242 | ), | ||
| 1243 | |||
| 1244 | TP_fast_assign( | ||
| 1245 | LOCAL_ASSIGN; | ||
| 1246 | ), | ||
| 1247 | |||
| 1248 | TP_printk( | ||
| 1249 | LOCAL_PR_FMT, LOCAL_PR_ARG | ||
| 1250 | ) | ||
| 1251 | ); | ||
| 1252 | |||
| 1173 | /* | 1253 | /* |
| 1174 | * Tracing for internal functions | 1254 | * Tracing for internal functions |
| 1175 | * (which may also be called in response to driver calls) | 1255 | * (which may also be called in response to driver calls) |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index a05893a238b7..c47d7c0e48a4 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
| @@ -168,6 +168,7 @@ typedef unsigned __bitwise__ ieee80211_rx_result; | |||
| 168 | * @IEEE80211_RX_FRAGMENTED: fragmented frame | 168 | * @IEEE80211_RX_FRAGMENTED: fragmented frame |
| 169 | * @IEEE80211_RX_AMSDU: a-MSDU packet | 169 | * @IEEE80211_RX_AMSDU: a-MSDU packet |
| 170 | * @IEEE80211_RX_MALFORMED_ACTION_FRM: action frame is malformed | 170 | * @IEEE80211_RX_MALFORMED_ACTION_FRM: action frame is malformed |
| 171 | * @IEEE80211_RX_DEFERRED_RELEASE: frame was subjected to receive reordering | ||
| 171 | * | 172 | * |
| 172 | * These are per-frame flags that are attached to a frame in the | 173 | * These are per-frame flags that are attached to a frame in the |
| 173 | * @rx_flags field of &struct ieee80211_rx_status. | 174 | * @rx_flags field of &struct ieee80211_rx_status. |
| @@ -178,6 +179,7 @@ enum ieee80211_packet_rx_flags { | |||
| 178 | IEEE80211_RX_FRAGMENTED = BIT(2), | 179 | IEEE80211_RX_FRAGMENTED = BIT(2), |
| 179 | IEEE80211_RX_AMSDU = BIT(3), | 180 | IEEE80211_RX_AMSDU = BIT(3), |
| 180 | IEEE80211_RX_MALFORMED_ACTION_FRM = BIT(4), | 181 | IEEE80211_RX_MALFORMED_ACTION_FRM = BIT(4), |
| 182 | IEEE80211_RX_DEFERRED_RELEASE = BIT(5), | ||
| 181 | }; | 183 | }; |
| 182 | 184 | ||
| 183 | /** | 185 | /** |
| @@ -774,6 +776,15 @@ struct ieee80211_local { | |||
| 774 | struct sk_buff_head skb_queue; | 776 | struct sk_buff_head skb_queue; |
| 775 | struct sk_buff_head skb_queue_unreliable; | 777 | struct sk_buff_head skb_queue_unreliable; |
| 776 | 778 | ||
| 779 | /* | ||
| 780 | * Internal FIFO queue which is shared between multiple rx path | ||
| 781 | * stages. Its main task is to provide a serialization mechanism, | ||
| 782 | * so all rx handlers can enjoy having exclusive access to their | ||
| 783 | * private data structures. | ||
| 784 | */ | ||
| 785 | struct sk_buff_head rx_skb_queue; | ||
| 786 | bool running_rx_handler; /* protected by rx_skb_queue.lock */ | ||
| 787 | |||
| 777 | /* Station data */ | 788 | /* Station data */ |
| 778 | /* | 789 | /* |
| 779 | * The mutex only protects the list and counter, | 790 | * The mutex only protects the list and counter, |
| @@ -940,6 +951,15 @@ struct ieee80211_local { | |||
| 940 | } debugfs; | 951 | } debugfs; |
| 941 | #endif | 952 | #endif |
| 942 | 953 | ||
| 954 | struct ieee80211_channel *hw_roc_channel; | ||
| 955 | struct net_device *hw_roc_dev; | ||
| 956 | struct sk_buff *hw_roc_skb; | ||
| 957 | struct work_struct hw_roc_start, hw_roc_done; | ||
| 958 | enum nl80211_channel_type hw_roc_channel_type; | ||
| 959 | unsigned int hw_roc_duration; | ||
| 960 | u32 hw_roc_cookie; | ||
| 961 | bool hw_roc_for_tx; | ||
| 962 | |||
| 943 | /* dummy netdev for use w/ NAPI */ | 963 | /* dummy netdev for use w/ NAPI */ |
| 944 | struct net_device napi_dev; | 964 | struct net_device napi_dev; |
| 945 | 965 | ||
| @@ -1131,6 +1151,7 @@ void ieee80211_offchannel_stop_beaconing(struct ieee80211_local *local); | |||
| 1131 | void ieee80211_offchannel_stop_station(struct ieee80211_local *local); | 1151 | void ieee80211_offchannel_stop_station(struct ieee80211_local *local); |
| 1132 | void ieee80211_offchannel_return(struct ieee80211_local *local, | 1152 | void ieee80211_offchannel_return(struct ieee80211_local *local, |
| 1133 | bool enable_beaconing); | 1153 | bool enable_beaconing); |
| 1154 | void ieee80211_hw_roc_setup(struct ieee80211_local *local); | ||
| 1134 | 1155 | ||
| 1135 | /* interface handling */ | 1156 | /* interface handling */ |
| 1136 | int ieee80211_iface_init(void); | 1157 | int ieee80211_iface_init(void); |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index b6db237672ff..8acba456744e 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
| @@ -1264,7 +1264,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
| 1264 | { | 1264 | { |
| 1265 | struct ieee80211_sub_if_data *sdata; | 1265 | struct ieee80211_sub_if_data *sdata; |
| 1266 | int count = 0; | 1266 | int count = 0; |
| 1267 | bool working = false, scanning = false; | 1267 | bool working = false, scanning = false, hw_roc = false; |
| 1268 | struct ieee80211_work *wk; | 1268 | struct ieee80211_work *wk; |
| 1269 | unsigned int led_trig_start = 0, led_trig_stop = 0; | 1269 | unsigned int led_trig_start = 0, led_trig_stop = 0; |
| 1270 | 1270 | ||
| @@ -1308,6 +1308,9 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
| 1308 | local->scan_sdata->vif.bss_conf.idle = false; | 1308 | local->scan_sdata->vif.bss_conf.idle = false; |
| 1309 | } | 1309 | } |
| 1310 | 1310 | ||
| 1311 | if (local->hw_roc_channel) | ||
| 1312 | hw_roc = true; | ||
| 1313 | |||
| 1311 | list_for_each_entry(sdata, &local->interfaces, list) { | 1314 | list_for_each_entry(sdata, &local->interfaces, list) { |
| 1312 | if (sdata->old_idle == sdata->vif.bss_conf.idle) | 1315 | if (sdata->old_idle == sdata->vif.bss_conf.idle) |
| 1313 | continue; | 1316 | continue; |
| @@ -1316,7 +1319,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
| 1316 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE); | 1319 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE); |
| 1317 | } | 1320 | } |
| 1318 | 1321 | ||
| 1319 | if (working || scanning) | 1322 | if (working || scanning || hw_roc) |
| 1320 | led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_WORK; | 1323 | led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_WORK; |
| 1321 | else | 1324 | else |
| 1322 | led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_WORK; | 1325 | led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_WORK; |
| @@ -1328,6 +1331,8 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
| 1328 | 1331 | ||
| 1329 | ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop); | 1332 | ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop); |
| 1330 | 1333 | ||
| 1334 | if (hw_roc) | ||
| 1335 | return ieee80211_idle_off(local, "hw remain-on-channel"); | ||
| 1331 | if (working) | 1336 | if (working) |
| 1332 | return ieee80211_idle_off(local, "working"); | 1337 | return ieee80211_idle_off(local, "working"); |
| 1333 | if (scanning) | 1338 | if (scanning) |
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 84cf9196820f..8c02469b7176 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
| @@ -30,19 +30,20 @@ | |||
| 30 | * keys and per-station keys. Since each station belongs to an interface, | 30 | * keys and per-station keys. Since each station belongs to an interface, |
| 31 | * each station key also belongs to that interface. | 31 | * each station key also belongs to that interface. |
| 32 | * | 32 | * |
| 33 | * Hardware acceleration is done on a best-effort basis, for each key | 33 | * Hardware acceleration is done on a best-effort basis for algorithms |
| 34 | * that is eligible the hardware is asked to enable that key but if | 34 | * that are implemented in software, for each key the hardware is asked |
| 35 | * it cannot do that they key is simply kept for software encryption. | 35 | * to enable that key for offloading but if it cannot do that the key is |
| 36 | * There is currently no way of knowing this except by looking into | 36 | * simply kept for software encryption (unless it is for an algorithm |
| 37 | * debugfs. | 37 | * that isn't implemented in software). |
| 38 | * There is currently no way of knowing whether a key is handled in SW | ||
| 39 | * or HW except by looking into debugfs. | ||
| 38 | * | 40 | * |
| 39 | * All key operations are protected internally. | 41 | * All key management is internally protected by a mutex. Within all |
| 40 | * | 42 | * other parts of mac80211, key references are, just as STA structure |
| 41 | * Within mac80211, key references are, just as STA structure references, | 43 | * references, protected by RCU. Note, however, that some things are |
| 42 | * protected by RCU. Note, however, that some things are unprotected, | 44 | * unprotected, namely the key->sta dereferences within the hardware |
| 43 | * namely the key->sta dereferences within the hardware acceleration | 45 | * acceleration functions. This means that sta_info_destroy() must |
| 44 | * functions. This means that sta_info_destroy() must remove the key | 46 | * remove the key which waits for an RCU grace period. |
| 45 | * which waits for an RCU grace period. | ||
| 46 | */ | 47 | */ |
| 47 | 48 | ||
| 48 | static const u8 bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; | 49 | static const u8 bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; |
| @@ -279,13 +280,8 @@ static void __ieee80211_key_replace(struct ieee80211_sub_if_data *sdata, | |||
| 279 | new->conf.keyidx); | 280 | new->conf.keyidx); |
| 280 | } | 281 | } |
| 281 | 282 | ||
| 282 | if (old) { | 283 | if (old) |
| 283 | /* | 284 | list_del(&old->list); |
| 284 | * We'll use an empty list to indicate that the key | ||
| 285 | * has already been removed. | ||
| 286 | */ | ||
| 287 | list_del_init(&old->list); | ||
| 288 | } | ||
| 289 | } | 285 | } |
| 290 | 286 | ||
| 291 | struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len, | 287 | struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len, |
| @@ -379,6 +375,12 @@ static void __ieee80211_key_destroy(struct ieee80211_key *key) | |||
| 379 | if (!key) | 375 | if (!key) |
| 380 | return; | 376 | return; |
| 381 | 377 | ||
| 378 | /* | ||
| 379 | * Synchronize so the TX path can no longer be using | ||
| 380 | * this key before we free/remove it. | ||
| 381 | */ | ||
| 382 | synchronize_rcu(); | ||
| 383 | |||
| 382 | if (key->local) | 384 | if (key->local) |
| 383 | ieee80211_key_disable_hw_accel(key); | 385 | ieee80211_key_disable_hw_accel(key); |
| 384 | 386 | ||
| @@ -420,8 +422,8 @@ int ieee80211_key_link(struct ieee80211_key *key, | |||
| 420 | struct sta_info *ap; | 422 | struct sta_info *ap; |
| 421 | 423 | ||
| 422 | /* | 424 | /* |
| 423 | * We're getting a sta pointer in, | 425 | * We're getting a sta pointer in, so must be under |
| 424 | * so must be under RCU read lock. | 426 | * appropriate locking for sta_info_get(). |
| 425 | */ | 427 | */ |
| 426 | 428 | ||
| 427 | /* same here, the AP could be using QoS */ | 429 | /* same here, the AP could be using QoS */ |
diff --git a/net/mac80211/led.c b/net/mac80211/led.c index 4905eb8af572..14590332c81c 100644 --- a/net/mac80211/led.c +++ b/net/mac80211/led.c | |||
| @@ -215,8 +215,8 @@ static void tpt_trig_timer(unsigned long data) | |||
| 215 | read_unlock(&tpt_trig->trig.leddev_list_lock); | 215 | read_unlock(&tpt_trig->trig.leddev_list_lock); |
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | extern char *__ieee80211_create_tpt_led_trigger( | 218 | char *__ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw, |
| 219 | struct ieee80211_hw *hw, unsigned int flags, | 219 | unsigned int flags, |
| 220 | const struct ieee80211_tpt_blink *blink_table, | 220 | const struct ieee80211_tpt_blink *blink_table, |
| 221 | unsigned int blink_table_len) | 221 | unsigned int blink_table_len) |
| 222 | { | 222 | { |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index bbe8e0ac6e52..485d36bc9a46 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
| @@ -569,6 +569,8 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
| 569 | spin_lock_init(&local->filter_lock); | 569 | spin_lock_init(&local->filter_lock); |
| 570 | spin_lock_init(&local->queue_stop_reason_lock); | 570 | spin_lock_init(&local->queue_stop_reason_lock); |
| 571 | 571 | ||
| 572 | skb_queue_head_init(&local->rx_skb_queue); | ||
| 573 | |||
| 572 | INIT_DELAYED_WORK(&local->scan_work, ieee80211_scan_work); | 574 | INIT_DELAYED_WORK(&local->scan_work, ieee80211_scan_work); |
| 573 | 575 | ||
| 574 | ieee80211_work_init(local); | 576 | ieee80211_work_init(local); |
| @@ -607,6 +609,8 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
| 607 | 609 | ||
| 608 | ieee80211_led_names(local); | 610 | ieee80211_led_names(local); |
| 609 | 611 | ||
| 612 | ieee80211_hw_roc_setup(local); | ||
| 613 | |||
| 610 | return local_to_hw(local); | 614 | return local_to_hw(local); |
| 611 | } | 615 | } |
| 612 | EXPORT_SYMBOL(ieee80211_alloc_hw); | 616 | EXPORT_SYMBOL(ieee80211_alloc_hw); |
| @@ -751,7 +755,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
| 751 | } | 755 | } |
| 752 | } | 756 | } |
| 753 | 757 | ||
| 754 | local->hw.wiphy->max_remain_on_channel_duration = 5000; | 758 | if (!local->ops->remain_on_channel) |
| 759 | local->hw.wiphy->max_remain_on_channel_duration = 5000; | ||
| 755 | 760 | ||
| 756 | result = wiphy_register(local->hw.wiphy); | 761 | result = wiphy_register(local->hw.wiphy); |
| 757 | if (result < 0) | 762 | if (result < 0) |
| @@ -914,6 +919,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw) | |||
| 914 | wiphy_warn(local->hw.wiphy, "skb_queue not empty\n"); | 919 | wiphy_warn(local->hw.wiphy, "skb_queue not empty\n"); |
| 915 | skb_queue_purge(&local->skb_queue); | 920 | skb_queue_purge(&local->skb_queue); |
| 916 | skb_queue_purge(&local->skb_queue_unreliable); | 921 | skb_queue_purge(&local->skb_queue_unreliable); |
| 922 | skb_queue_purge(&local->rx_skb_queue); | ||
| 917 | 923 | ||
| 918 | destroy_workqueue(local->workqueue); | 924 | destroy_workqueue(local->workqueue); |
| 919 | wiphy_unregister(local->hw.wiphy); | 925 | wiphy_unregister(local->hw.wiphy); |
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index 4b564091e51d..b4e52676f3fb 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | */ | 14 | */ |
| 15 | #include <net/mac80211.h> | 15 | #include <net/mac80211.h> |
| 16 | #include "ieee80211_i.h" | 16 | #include "ieee80211_i.h" |
| 17 | #include "driver-trace.h" | ||
| 17 | 18 | ||
| 18 | /* | 19 | /* |
| 19 | * inform AP that we will go to sleep so that it will buffer the frames | 20 | * inform AP that we will go to sleep so that it will buffer the frames |
| @@ -190,3 +191,87 @@ void ieee80211_offchannel_return(struct ieee80211_local *local, | |||
| 190 | } | 191 | } |
| 191 | mutex_unlock(&local->iflist_mtx); | 192 | mutex_unlock(&local->iflist_mtx); |
| 192 | } | 193 | } |
| 194 | |||
| 195 | static void ieee80211_hw_roc_start(struct work_struct *work) | ||
| 196 | { | ||
| 197 | struct ieee80211_local *local = | ||
| 198 | container_of(work, struct ieee80211_local, hw_roc_start); | ||
| 199 | struct ieee80211_sub_if_data *sdata; | ||
| 200 | |||
| 201 | mutex_lock(&local->mtx); | ||
| 202 | |||
| 203 | if (!local->hw_roc_channel) { | ||
| 204 | mutex_unlock(&local->mtx); | ||
| 205 | return; | ||
| 206 | } | ||
| 207 | |||
| 208 | ieee80211_recalc_idle(local); | ||
| 209 | |||
| 210 | if (local->hw_roc_skb) { | ||
| 211 | sdata = IEEE80211_DEV_TO_SUB_IF(local->hw_roc_dev); | ||
| 212 | ieee80211_tx_skb(sdata, local->hw_roc_skb); | ||
| 213 | local->hw_roc_skb = NULL; | ||
| 214 | } else { | ||
| 215 | cfg80211_ready_on_channel(local->hw_roc_dev, | ||
| 216 | local->hw_roc_cookie, | ||
| 217 | local->hw_roc_channel, | ||
| 218 | local->hw_roc_channel_type, | ||
| 219 | local->hw_roc_duration, | ||
| 220 | GFP_KERNEL); | ||
| 221 | } | ||
| 222 | |||
| 223 | mutex_unlock(&local->mtx); | ||
| 224 | } | ||
| 225 | |||
| 226 | void ieee80211_ready_on_channel(struct ieee80211_hw *hw) | ||
| 227 | { | ||
| 228 | struct ieee80211_local *local = hw_to_local(hw); | ||
| 229 | |||
| 230 | trace_api_ready_on_channel(local); | ||
| 231 | |||
| 232 | ieee80211_queue_work(hw, &local->hw_roc_start); | ||
| 233 | } | ||
| 234 | EXPORT_SYMBOL_GPL(ieee80211_ready_on_channel); | ||
| 235 | |||
| 236 | static void ieee80211_hw_roc_done(struct work_struct *work) | ||
| 237 | { | ||
| 238 | struct ieee80211_local *local = | ||
| 239 | container_of(work, struct ieee80211_local, hw_roc_done); | ||
| 240 | |||
| 241 | mutex_lock(&local->mtx); | ||
| 242 | |||
| 243 | if (!local->hw_roc_channel) { | ||
| 244 | mutex_unlock(&local->mtx); | ||
| 245 | return; | ||
| 246 | } | ||
| 247 | |||
| 248 | if (!local->hw_roc_for_tx) | ||
| 249 | cfg80211_remain_on_channel_expired(local->hw_roc_dev, | ||
| 250 | local->hw_roc_cookie, | ||
| 251 | local->hw_roc_channel, | ||
| 252 | local->hw_roc_channel_type, | ||
| 253 | GFP_KERNEL); | ||
| 254 | |||
| 255 | local->hw_roc_channel = NULL; | ||
| 256 | local->hw_roc_cookie = 0; | ||
| 257 | |||
| 258 | ieee80211_recalc_idle(local); | ||
| 259 | |||
| 260 | mutex_unlock(&local->mtx); | ||
| 261 | } | ||
| 262 | |||
| 263 | void ieee80211_remain_on_channel_expired(struct ieee80211_hw *hw) | ||
| 264 | { | ||
| 265 | struct ieee80211_local *local = hw_to_local(hw); | ||
| 266 | |||
| 267 | trace_api_remain_on_channel_expired(local); | ||
| 268 | |||
| 269 | ieee80211_queue_work(hw, &local->hw_roc_done); | ||
| 270 | } | ||
| 271 | EXPORT_SYMBOL_GPL(ieee80211_remain_on_channel_expired); | ||
| 272 | |||
| 273 | void ieee80211_hw_roc_setup(struct ieee80211_local *local) | ||
| 274 | { | ||
| 275 | INIT_WORK(&local->hw_roc_start, ieee80211_hw_roc_start); | ||
| 276 | INIT_WORK(&local->hw_roc_done, ieee80211_hw_roc_done); | ||
| 277 | } | ||
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 5e9d3bc6a2d9..a6701ed87f0d 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
| @@ -533,10 +533,11 @@ static inline u16 seq_sub(u16 sq1, u16 sq2) | |||
| 533 | 533 | ||
| 534 | static void ieee80211_release_reorder_frame(struct ieee80211_hw *hw, | 534 | static void ieee80211_release_reorder_frame(struct ieee80211_hw *hw, |
| 535 | struct tid_ampdu_rx *tid_agg_rx, | 535 | struct tid_ampdu_rx *tid_agg_rx, |
| 536 | int index, | 536 | int index) |
| 537 | struct sk_buff_head *frames) | ||
| 538 | { | 537 | { |
| 538 | struct ieee80211_local *local = hw_to_local(hw); | ||
| 539 | struct sk_buff *skb = tid_agg_rx->reorder_buf[index]; | 539 | struct sk_buff *skb = tid_agg_rx->reorder_buf[index]; |
| 540 | struct ieee80211_rx_status *status; | ||
| 540 | 541 | ||
| 541 | lockdep_assert_held(&tid_agg_rx->reorder_lock); | 542 | lockdep_assert_held(&tid_agg_rx->reorder_lock); |
| 542 | 543 | ||
| @@ -546,7 +547,9 @@ static void ieee80211_release_reorder_frame(struct ieee80211_hw *hw, | |||
| 546 | /* release the frame from the reorder ring buffer */ | 547 | /* release the frame from the reorder ring buffer */ |
| 547 | tid_agg_rx->stored_mpdu_num--; | 548 | tid_agg_rx->stored_mpdu_num--; |
| 548 | tid_agg_rx->reorder_buf[index] = NULL; | 549 | tid_agg_rx->reorder_buf[index] = NULL; |
| 549 | __skb_queue_tail(frames, skb); | 550 | status = IEEE80211_SKB_RXCB(skb); |
| 551 | status->rx_flags |= IEEE80211_RX_DEFERRED_RELEASE; | ||
| 552 | skb_queue_tail(&local->rx_skb_queue, skb); | ||
| 550 | 553 | ||
| 551 | no_frame: | 554 | no_frame: |
| 552 | tid_agg_rx->head_seq_num = seq_inc(tid_agg_rx->head_seq_num); | 555 | tid_agg_rx->head_seq_num = seq_inc(tid_agg_rx->head_seq_num); |
| @@ -554,8 +557,7 @@ no_frame: | |||
| 554 | 557 | ||
| 555 | static void ieee80211_release_reorder_frames(struct ieee80211_hw *hw, | 558 | static void ieee80211_release_reorder_frames(struct ieee80211_hw *hw, |
| 556 | struct tid_ampdu_rx *tid_agg_rx, | 559 | struct tid_ampdu_rx *tid_agg_rx, |
| 557 | u16 head_seq_num, | 560 | u16 head_seq_num) |
| 558 | struct sk_buff_head *frames) | ||
| 559 | { | 561 | { |
| 560 | int index; | 562 | int index; |
| 561 | 563 | ||
| @@ -564,7 +566,7 @@ static void ieee80211_release_reorder_frames(struct ieee80211_hw *hw, | |||
| 564 | while (seq_less(tid_agg_rx->head_seq_num, head_seq_num)) { | 566 | while (seq_less(tid_agg_rx->head_seq_num, head_seq_num)) { |
| 565 | index = seq_sub(tid_agg_rx->head_seq_num, tid_agg_rx->ssn) % | 567 | index = seq_sub(tid_agg_rx->head_seq_num, tid_agg_rx->ssn) % |
| 566 | tid_agg_rx->buf_size; | 568 | tid_agg_rx->buf_size; |
| 567 | ieee80211_release_reorder_frame(hw, tid_agg_rx, index, frames); | 569 | ieee80211_release_reorder_frame(hw, tid_agg_rx, index); |
| 568 | } | 570 | } |
| 569 | } | 571 | } |
| 570 | 572 | ||
| @@ -580,8 +582,7 @@ static void ieee80211_release_reorder_frames(struct ieee80211_hw *hw, | |||
| 580 | #define HT_RX_REORDER_BUF_TIMEOUT (HZ / 10) | 582 | #define HT_RX_REORDER_BUF_TIMEOUT (HZ / 10) |
| 581 | 583 | ||
| 582 | static void ieee80211_sta_reorder_release(struct ieee80211_hw *hw, | 584 | static void ieee80211_sta_reorder_release(struct ieee80211_hw *hw, |
| 583 | struct tid_ampdu_rx *tid_agg_rx, | 585 | struct tid_ampdu_rx *tid_agg_rx) |
| 584 | struct sk_buff_head *frames) | ||
| 585 | { | 586 | { |
| 586 | int index, j; | 587 | int index, j; |
| 587 | 588 | ||
| @@ -612,8 +613,7 @@ static void ieee80211_sta_reorder_release(struct ieee80211_hw *hw, | |||
| 612 | wiphy_debug(hw->wiphy, | 613 | wiphy_debug(hw->wiphy, |
| 613 | "release an RX reorder frame due to timeout on earlier frames\n"); | 614 | "release an RX reorder frame due to timeout on earlier frames\n"); |
| 614 | #endif | 615 | #endif |
| 615 | ieee80211_release_reorder_frame(hw, tid_agg_rx, | 616 | ieee80211_release_reorder_frame(hw, tid_agg_rx, j); |
| 616 | j, frames); | ||
| 617 | 617 | ||
| 618 | /* | 618 | /* |
| 619 | * Increment the head seq# also for the skipped slots. | 619 | * Increment the head seq# also for the skipped slots. |
| @@ -623,31 +623,11 @@ static void ieee80211_sta_reorder_release(struct ieee80211_hw *hw, | |||
| 623 | skipped = 0; | 623 | skipped = 0; |
| 624 | } | 624 | } |
| 625 | } else while (tid_agg_rx->reorder_buf[index]) { | 625 | } else while (tid_agg_rx->reorder_buf[index]) { |
| 626 | ieee80211_release_reorder_frame(hw, tid_agg_rx, index, frames); | 626 | ieee80211_release_reorder_frame(hw, tid_agg_rx, index); |
| 627 | index = seq_sub(tid_agg_rx->head_seq_num, tid_agg_rx->ssn) % | 627 | index = seq_sub(tid_agg_rx->head_seq_num, tid_agg_rx->ssn) % |
| 628 | tid_agg_rx->buf_size; | 628 | tid_agg_rx->buf_size; |
| 629 | } | 629 | } |
| 630 | 630 | ||
| 631 | /* | ||
| 632 | * Disable the reorder release timer for now. | ||
| 633 | * | ||
| 634 | * The current implementation lacks a proper locking scheme | ||
| 635 | * which would protect vital statistic and debug counters | ||
| 636 | * from being updated by two different but concurrent BHs. | ||
| 637 | * | ||
| 638 | * More information about the topic is available from: | ||
| 639 | * - thread: http://marc.info/?t=128635927000001 | ||
| 640 | * | ||
| 641 | * What was wrong: | ||
| 642 | * => http://marc.info/?l=linux-wireless&m=128636170811964 | ||
| 643 | * "Basically the thing is that until your patch, the data | ||
| 644 | * in the struct didn't actually need locking because it | ||
| 645 | * was accessed by the RX path only which is not concurrent." | ||
| 646 | * | ||
| 647 | * List of what needs to be fixed: | ||
| 648 | * => http://marc.info/?l=linux-wireless&m=128656352920957 | ||
| 649 | * | ||
| 650 | |||
| 651 | if (tid_agg_rx->stored_mpdu_num) { | 631 | if (tid_agg_rx->stored_mpdu_num) { |
| 652 | j = index = seq_sub(tid_agg_rx->head_seq_num, | 632 | j = index = seq_sub(tid_agg_rx->head_seq_num, |
| 653 | tid_agg_rx->ssn) % tid_agg_rx->buf_size; | 633 | tid_agg_rx->ssn) % tid_agg_rx->buf_size; |
| @@ -666,10 +646,6 @@ static void ieee80211_sta_reorder_release(struct ieee80211_hw *hw, | |||
| 666 | } else { | 646 | } else { |
| 667 | del_timer(&tid_agg_rx->reorder_timer); | 647 | del_timer(&tid_agg_rx->reorder_timer); |
| 668 | } | 648 | } |
| 669 | */ | ||
| 670 | |||
| 671 | set_release_timer: | ||
| 672 | return; | ||
| 673 | } | 649 | } |
| 674 | 650 | ||
| 675 | /* | 651 | /* |
| @@ -679,8 +655,7 @@ set_release_timer: | |||
| 679 | */ | 655 | */ |
| 680 | static bool ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw, | 656 | static bool ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw, |
| 681 | struct tid_ampdu_rx *tid_agg_rx, | 657 | struct tid_ampdu_rx *tid_agg_rx, |
| 682 | struct sk_buff *skb, | 658 | struct sk_buff *skb) |
| 683 | struct sk_buff_head *frames) | ||
| 684 | { | 659 | { |
| 685 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | 660 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; |
| 686 | u16 sc = le16_to_cpu(hdr->seq_ctrl); | 661 | u16 sc = le16_to_cpu(hdr->seq_ctrl); |
| @@ -707,8 +682,7 @@ static bool ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw, | |||
| 707 | if (!seq_less(mpdu_seq_num, head_seq_num + buf_size)) { | 682 | if (!seq_less(mpdu_seq_num, head_seq_num + buf_size)) { |
| 708 | head_seq_num = seq_inc(seq_sub(mpdu_seq_num, buf_size)); | 683 | head_seq_num = seq_inc(seq_sub(mpdu_seq_num, buf_size)); |
| 709 | /* release stored frames up to new head to stack */ | 684 | /* release stored frames up to new head to stack */ |
| 710 | ieee80211_release_reorder_frames(hw, tid_agg_rx, head_seq_num, | 685 | ieee80211_release_reorder_frames(hw, tid_agg_rx, head_seq_num); |
| 711 | frames); | ||
| 712 | } | 686 | } |
| 713 | 687 | ||
| 714 | /* Now the new frame is always in the range of the reordering buffer */ | 688 | /* Now the new frame is always in the range of the reordering buffer */ |
| @@ -736,7 +710,7 @@ static bool ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw, | |||
| 736 | tid_agg_rx->reorder_buf[index] = skb; | 710 | tid_agg_rx->reorder_buf[index] = skb; |
| 737 | tid_agg_rx->reorder_time[index] = jiffies; | 711 | tid_agg_rx->reorder_time[index] = jiffies; |
| 738 | tid_agg_rx->stored_mpdu_num++; | 712 | tid_agg_rx->stored_mpdu_num++; |
| 739 | ieee80211_sta_reorder_release(hw, tid_agg_rx, frames); | 713 | ieee80211_sta_reorder_release(hw, tid_agg_rx); |
| 740 | 714 | ||
| 741 | out: | 715 | out: |
| 742 | spin_unlock(&tid_agg_rx->reorder_lock); | 716 | spin_unlock(&tid_agg_rx->reorder_lock); |
| @@ -747,8 +721,7 @@ static bool ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw, | |||
| 747 | * Reorder MPDUs from A-MPDUs, keeping them on a buffer. Returns | 721 | * Reorder MPDUs from A-MPDUs, keeping them on a buffer. Returns |
| 748 | * true if the MPDU was buffered, false if it should be processed. | 722 | * true if the MPDU was buffered, false if it should be processed. |
| 749 | */ | 723 | */ |
| 750 | static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx, | 724 | static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx) |
| 751 | struct sk_buff_head *frames) | ||
| 752 | { | 725 | { |
| 753 | struct sk_buff *skb = rx->skb; | 726 | struct sk_buff *skb = rx->skb; |
| 754 | struct ieee80211_local *local = rx->local; | 727 | struct ieee80211_local *local = rx->local; |
| @@ -803,11 +776,11 @@ static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx, | |||
| 803 | * sure that we cannot get to it any more before doing | 776 | * sure that we cannot get to it any more before doing |
| 804 | * anything with it. | 777 | * anything with it. |
| 805 | */ | 778 | */ |
| 806 | if (ieee80211_sta_manage_reorder_buf(hw, tid_agg_rx, skb, frames)) | 779 | if (ieee80211_sta_manage_reorder_buf(hw, tid_agg_rx, skb)) |
| 807 | return; | 780 | return; |
| 808 | 781 | ||
| 809 | dont_reorder: | 782 | dont_reorder: |
| 810 | __skb_queue_tail(frames, skb); | 783 | skb_queue_tail(&local->rx_skb_queue, skb); |
| 811 | } | 784 | } |
| 812 | 785 | ||
| 813 | static ieee80211_rx_result debug_noinline | 786 | static ieee80211_rx_result debug_noinline |
| @@ -1189,6 +1162,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) | |||
| 1189 | * exchange sequence. | 1162 | * exchange sequence. |
| 1190 | */ | 1163 | */ |
| 1191 | if (!ieee80211_has_morefrags(hdr->frame_control) && | 1164 | if (!ieee80211_has_morefrags(hdr->frame_control) && |
| 1165 | !(status->rx_flags & IEEE80211_RX_DEFERRED_RELEASE) && | ||
| 1192 | (rx->sdata->vif.type == NL80211_IFTYPE_AP || | 1166 | (rx->sdata->vif.type == NL80211_IFTYPE_AP || |
| 1193 | rx->sdata->vif.type == NL80211_IFTYPE_AP_VLAN)) { | 1167 | rx->sdata->vif.type == NL80211_IFTYPE_AP_VLAN)) { |
| 1194 | if (test_sta_flags(sta, WLAN_STA_PS_STA)) { | 1168 | if (test_sta_flags(sta, WLAN_STA_PS_STA)) { |
| @@ -1831,11 +1805,11 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) | |||
| 1831 | 1805 | ||
| 1832 | fwd_skb = skb_copy(skb, GFP_ATOMIC); | 1806 | fwd_skb = skb_copy(skb, GFP_ATOMIC); |
| 1833 | 1807 | ||
| 1834 | if (!fwd_skb && net_ratelimit()) { | 1808 | if (!fwd_skb && net_ratelimit()) |
| 1835 | printk(KERN_DEBUG "%s: failed to clone mesh frame\n", | 1809 | printk(KERN_DEBUG "%s: failed to clone mesh frame\n", |
| 1836 | sdata->name); | 1810 | sdata->name); |
| 1811 | if (!fwd_skb) | ||
| 1837 | goto out; | 1812 | goto out; |
| 1838 | } | ||
| 1839 | 1813 | ||
| 1840 | fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data; | 1814 | fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data; |
| 1841 | memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN); | 1815 | memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN); |
| @@ -1930,7 +1904,7 @@ ieee80211_rx_h_data(struct ieee80211_rx_data *rx) | |||
| 1930 | } | 1904 | } |
| 1931 | 1905 | ||
| 1932 | static ieee80211_rx_result debug_noinline | 1906 | static ieee80211_rx_result debug_noinline |
| 1933 | ieee80211_rx_h_ctrl(struct ieee80211_rx_data *rx, struct sk_buff_head *frames) | 1907 | ieee80211_rx_h_ctrl(struct ieee80211_rx_data *rx) |
| 1934 | { | 1908 | { |
| 1935 | struct ieee80211_local *local = rx->local; | 1909 | struct ieee80211_local *local = rx->local; |
| 1936 | struct ieee80211_hw *hw = &local->hw; | 1910 | struct ieee80211_hw *hw = &local->hw; |
| @@ -1970,8 +1944,7 @@ ieee80211_rx_h_ctrl(struct ieee80211_rx_data *rx, struct sk_buff_head *frames) | |||
| 1970 | 1944 | ||
| 1971 | spin_lock(&tid_agg_rx->reorder_lock); | 1945 | spin_lock(&tid_agg_rx->reorder_lock); |
| 1972 | /* release stored frames up to start of BAR */ | 1946 | /* release stored frames up to start of BAR */ |
| 1973 | ieee80211_release_reorder_frames(hw, tid_agg_rx, start_seq_num, | 1947 | ieee80211_release_reorder_frames(hw, tid_agg_rx, start_seq_num); |
| 1974 | frames); | ||
| 1975 | spin_unlock(&tid_agg_rx->reorder_lock); | 1948 | spin_unlock(&tid_agg_rx->reorder_lock); |
| 1976 | 1949 | ||
| 1977 | kfree_skb(skb); | 1950 | kfree_skb(skb); |
| @@ -2488,8 +2461,7 @@ static void ieee80211_rx_handlers_result(struct ieee80211_rx_data *rx, | |||
| 2488 | } | 2461 | } |
| 2489 | } | 2462 | } |
| 2490 | 2463 | ||
| 2491 | static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx, | 2464 | static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx) |
| 2492 | struct sk_buff_head *frames) | ||
| 2493 | { | 2465 | { |
| 2494 | ieee80211_rx_result res = RX_DROP_MONITOR; | 2466 | ieee80211_rx_result res = RX_DROP_MONITOR; |
| 2495 | struct sk_buff *skb; | 2467 | struct sk_buff *skb; |
| @@ -2501,7 +2473,15 @@ static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx, | |||
| 2501 | goto rxh_next; \ | 2473 | goto rxh_next; \ |
| 2502 | } while (0); | 2474 | } while (0); |
| 2503 | 2475 | ||
| 2504 | while ((skb = __skb_dequeue(frames))) { | 2476 | spin_lock(&rx->local->rx_skb_queue.lock); |
| 2477 | if (rx->local->running_rx_handler) | ||
| 2478 | goto unlock; | ||
| 2479 | |||
| 2480 | rx->local->running_rx_handler = true; | ||
| 2481 | |||
| 2482 | while ((skb = __skb_dequeue(&rx->local->rx_skb_queue))) { | ||
| 2483 | spin_unlock(&rx->local->rx_skb_queue.lock); | ||
| 2484 | |||
| 2505 | /* | 2485 | /* |
| 2506 | * all the other fields are valid across frames | 2486 | * all the other fields are valid across frames |
| 2507 | * that belong to an aMPDU since they are on the | 2487 | * that belong to an aMPDU since they are on the |
| @@ -2524,12 +2504,7 @@ static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx, | |||
| 2524 | CALL_RXH(ieee80211_rx_h_mesh_fwding); | 2504 | CALL_RXH(ieee80211_rx_h_mesh_fwding); |
| 2525 | #endif | 2505 | #endif |
| 2526 | CALL_RXH(ieee80211_rx_h_data) | 2506 | CALL_RXH(ieee80211_rx_h_data) |
| 2527 | 2507 | CALL_RXH(ieee80211_rx_h_ctrl); | |
| 2528 | /* special treatment -- needs the queue */ | ||
| 2529 | res = ieee80211_rx_h_ctrl(rx, frames); | ||
| 2530 | if (res != RX_CONTINUE) | ||
| 2531 | goto rxh_next; | ||
| 2532 | |||
| 2533 | CALL_RXH(ieee80211_rx_h_mgmt_check) | 2508 | CALL_RXH(ieee80211_rx_h_mgmt_check) |
| 2534 | CALL_RXH(ieee80211_rx_h_action) | 2509 | CALL_RXH(ieee80211_rx_h_action) |
| 2535 | CALL_RXH(ieee80211_rx_h_userspace_mgmt) | 2510 | CALL_RXH(ieee80211_rx_h_userspace_mgmt) |
| @@ -2538,18 +2513,20 @@ static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx, | |||
| 2538 | 2513 | ||
| 2539 | rxh_next: | 2514 | rxh_next: |
| 2540 | ieee80211_rx_handlers_result(rx, res); | 2515 | ieee80211_rx_handlers_result(rx, res); |
| 2541 | 2516 | spin_lock(&rx->local->rx_skb_queue.lock); | |
| 2542 | #undef CALL_RXH | 2517 | #undef CALL_RXH |
| 2543 | } | 2518 | } |
| 2519 | |||
| 2520 | rx->local->running_rx_handler = false; | ||
| 2521 | |||
| 2522 | unlock: | ||
| 2523 | spin_unlock(&rx->local->rx_skb_queue.lock); | ||
| 2544 | } | 2524 | } |
| 2545 | 2525 | ||
| 2546 | static void ieee80211_invoke_rx_handlers(struct ieee80211_rx_data *rx) | 2526 | static void ieee80211_invoke_rx_handlers(struct ieee80211_rx_data *rx) |
| 2547 | { | 2527 | { |
| 2548 | struct sk_buff_head reorder_release; | ||
| 2549 | ieee80211_rx_result res = RX_DROP_MONITOR; | 2528 | ieee80211_rx_result res = RX_DROP_MONITOR; |
| 2550 | 2529 | ||
| 2551 | __skb_queue_head_init(&reorder_release); | ||
| 2552 | |||
| 2553 | #define CALL_RXH(rxh) \ | 2530 | #define CALL_RXH(rxh) \ |
| 2554 | do { \ | 2531 | do { \ |
| 2555 | res = rxh(rx); \ | 2532 | res = rxh(rx); \ |
| @@ -2560,9 +2537,9 @@ static void ieee80211_invoke_rx_handlers(struct ieee80211_rx_data *rx) | |||
| 2560 | CALL_RXH(ieee80211_rx_h_passive_scan) | 2537 | CALL_RXH(ieee80211_rx_h_passive_scan) |
| 2561 | CALL_RXH(ieee80211_rx_h_check) | 2538 | CALL_RXH(ieee80211_rx_h_check) |
| 2562 | 2539 | ||
| 2563 | ieee80211_rx_reorder_ampdu(rx, &reorder_release); | 2540 | ieee80211_rx_reorder_ampdu(rx); |
| 2564 | 2541 | ||
| 2565 | ieee80211_rx_handlers(rx, &reorder_release); | 2542 | ieee80211_rx_handlers(rx); |
| 2566 | return; | 2543 | return; |
| 2567 | 2544 | ||
| 2568 | rxh_next: | 2545 | rxh_next: |
| @@ -2577,7 +2554,6 @@ static void ieee80211_invoke_rx_handlers(struct ieee80211_rx_data *rx) | |||
| 2577 | */ | 2554 | */ |
| 2578 | void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid) | 2555 | void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid) |
| 2579 | { | 2556 | { |
| 2580 | struct sk_buff_head frames; | ||
| 2581 | struct ieee80211_rx_data rx = { | 2557 | struct ieee80211_rx_data rx = { |
| 2582 | .sta = sta, | 2558 | .sta = sta, |
| 2583 | .sdata = sta->sdata, | 2559 | .sdata = sta->sdata, |
| @@ -2590,13 +2566,11 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid) | |||
| 2590 | if (!tid_agg_rx) | 2566 | if (!tid_agg_rx) |
| 2591 | return; | 2567 | return; |
| 2592 | 2568 | ||
| 2593 | __skb_queue_head_init(&frames); | ||
| 2594 | |||
| 2595 | spin_lock(&tid_agg_rx->reorder_lock); | 2569 | spin_lock(&tid_agg_rx->reorder_lock); |
| 2596 | ieee80211_sta_reorder_release(&sta->local->hw, tid_agg_rx, &frames); | 2570 | ieee80211_sta_reorder_release(&sta->local->hw, tid_agg_rx); |
| 2597 | spin_unlock(&tid_agg_rx->reorder_lock); | 2571 | spin_unlock(&tid_agg_rx->reorder_lock); |
| 2598 | 2572 | ||
| 2599 | ieee80211_rx_handlers(&rx, &frames); | 2573 | ieee80211_rx_handlers(&rx); |
| 2600 | } | 2574 | } |
| 2601 | 2575 | ||
| 2602 | /* main receive path */ | 2576 | /* main receive path */ |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 68c2fbd16ebb..5950e3abead9 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
| @@ -1750,6 +1750,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
| 1750 | __le16 fc; | 1750 | __le16 fc; |
| 1751 | struct ieee80211_hdr hdr; | 1751 | struct ieee80211_hdr hdr; |
| 1752 | struct ieee80211s_hdr mesh_hdr __maybe_unused; | 1752 | struct ieee80211s_hdr mesh_hdr __maybe_unused; |
| 1753 | struct mesh_path *mppath = NULL; | ||
| 1753 | const u8 *encaps_data; | 1754 | const u8 *encaps_data; |
| 1754 | int encaps_len, skip_header_bytes; | 1755 | int encaps_len, skip_header_bytes; |
| 1755 | int nh_pos, h_pos; | 1756 | int nh_pos, h_pos; |
| @@ -1810,16 +1811,23 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
| 1810 | ret = NETDEV_TX_OK; | 1811 | ret = NETDEV_TX_OK; |
| 1811 | goto fail; | 1812 | goto fail; |
| 1812 | } | 1813 | } |
| 1814 | if (!is_multicast_ether_addr(skb->data)) | ||
| 1815 | mppath = mpp_path_lookup(skb->data, sdata); | ||
| 1813 | 1816 | ||
| 1817 | /* | ||
| 1818 | * Do not use address extension, if it is a packet from | ||
| 1819 | * the same interface and the destination is not being | ||
| 1820 | * proxied by any other mest point. | ||
| 1821 | */ | ||
| 1814 | if (compare_ether_addr(sdata->vif.addr, | 1822 | if (compare_ether_addr(sdata->vif.addr, |
| 1815 | skb->data + ETH_ALEN) == 0) { | 1823 | skb->data + ETH_ALEN) == 0 && |
| 1824 | (!mppath || !compare_ether_addr(mppath->mpp, skb->data))) { | ||
| 1816 | hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, | 1825 | hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, |
| 1817 | skb->data, skb->data + ETH_ALEN); | 1826 | skb->data, skb->data + ETH_ALEN); |
| 1818 | meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr, | 1827 | meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr, |
| 1819 | sdata, NULL, NULL); | 1828 | sdata, NULL, NULL); |
| 1820 | } else { | 1829 | } else { |
| 1821 | /* packet from other interface */ | 1830 | /* packet from other interface */ |
| 1822 | struct mesh_path *mppath; | ||
| 1823 | int is_mesh_mcast = 1; | 1831 | int is_mesh_mcast = 1; |
| 1824 | const u8 *mesh_da; | 1832 | const u8 *mesh_da; |
| 1825 | 1833 | ||
| @@ -1830,8 +1838,6 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
| 1830 | else { | 1838 | else { |
| 1831 | static const u8 bcast[ETH_ALEN] = | 1839 | static const u8 bcast[ETH_ALEN] = |
| 1832 | { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; | 1840 | { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; |
| 1833 | |||
| 1834 | mppath = mpp_path_lookup(skb->data, sdata); | ||
| 1835 | if (mppath) { | 1841 | if (mppath) { |
| 1836 | /* RA TA mDA mSA AE:DA SA */ | 1842 | /* RA TA mDA mSA AE:DA SA */ |
| 1837 | mesh_da = mppath->mpp; | 1843 | mesh_da = mppath->mpp; |
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index 58e75bbc1f91..28bc084dbfb9 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c | |||
| @@ -59,26 +59,22 @@ u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata, | |||
| 59 | { | 59 | { |
| 60 | struct ieee80211_local *local = sdata->local; | 60 | struct ieee80211_local *local = sdata->local; |
| 61 | struct sta_info *sta = NULL; | 61 | struct sta_info *sta = NULL; |
| 62 | u32 sta_flags = 0; | ||
| 63 | const u8 *ra = NULL; | 62 | const u8 *ra = NULL; |
| 64 | bool qos = false; | 63 | bool qos = false; |
| 65 | 64 | ||
| 66 | if (local->hw.queues < 4 || skb->len < 6) { | 65 | if (local->hw.queues < 4 || skb->len < 6) { |
| 67 | skb->priority = 0; /* required for correct WPA/11i MIC */ | 66 | skb->priority = 0; /* required for correct WPA/11i MIC */ |
| 68 | return min_t(u16, local->hw.queues - 1, | 67 | return min_t(u16, local->hw.queues - 1, IEEE80211_AC_BE); |
| 69 | ieee802_1d_to_ac[skb->priority]); | ||
| 70 | } | 68 | } |
| 71 | 69 | ||
| 72 | rcu_read_lock(); | 70 | rcu_read_lock(); |
| 73 | switch (sdata->vif.type) { | 71 | switch (sdata->vif.type) { |
| 74 | case NL80211_IFTYPE_AP_VLAN: | 72 | case NL80211_IFTYPE_AP_VLAN: |
| 75 | rcu_read_lock(); | ||
| 76 | sta = rcu_dereference(sdata->u.vlan.sta); | 73 | sta = rcu_dereference(sdata->u.vlan.sta); |
| 77 | if (sta) | 74 | if (sta) { |
| 78 | sta_flags = get_sta_flags(sta); | 75 | qos = get_sta_flags(sta) & WLAN_STA_WME; |
| 79 | rcu_read_unlock(); | ||
| 80 | if (sta) | ||
| 81 | break; | 76 | break; |
| 77 | } | ||
| 82 | case NL80211_IFTYPE_AP: | 78 | case NL80211_IFTYPE_AP: |
| 83 | ra = skb->data; | 79 | ra = skb->data; |
| 84 | break; | 80 | break; |
| @@ -107,17 +103,13 @@ u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata, | |||
| 107 | if (!sta && ra && !is_multicast_ether_addr(ra)) { | 103 | if (!sta && ra && !is_multicast_ether_addr(ra)) { |
| 108 | sta = sta_info_get(sdata, ra); | 104 | sta = sta_info_get(sdata, ra); |
| 109 | if (sta) | 105 | if (sta) |
| 110 | sta_flags = get_sta_flags(sta); | 106 | qos = get_sta_flags(sta) & WLAN_STA_WME; |
| 111 | } | 107 | } |
| 112 | |||
| 113 | if (sta_flags & WLAN_STA_WME) | ||
| 114 | qos = true; | ||
| 115 | |||
| 116 | rcu_read_unlock(); | 108 | rcu_read_unlock(); |
| 117 | 109 | ||
| 118 | if (!qos) { | 110 | if (!qos) { |
| 119 | skb->priority = 0; /* required for correct WPA/11i MIC */ | 111 | skb->priority = 0; /* required for correct WPA/11i MIC */ |
| 120 | return ieee802_1d_to_ac[skb->priority]; | 112 | return IEEE80211_AC_BE; |
| 121 | } | 113 | } |
| 122 | 114 | ||
| 123 | /* use the data classifier to determine what 802.1d tag the | 115 | /* use the data classifier to determine what 802.1d tag the |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 99d41831d76e..37693b6ef23a 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
| @@ -752,7 +752,7 @@ static void chan_reg_rule_print_dbg(struct ieee80211_channel *chan, | |||
| 752 | snprintf(max_antenna_gain, 32, "%d", power_rule->max_antenna_gain); | 752 | snprintf(max_antenna_gain, 32, "%d", power_rule->max_antenna_gain); |
| 753 | 753 | ||
| 754 | REG_DBG_PRINT("Updating information on frequency %d MHz " | 754 | REG_DBG_PRINT("Updating information on frequency %d MHz " |
| 755 | "for %d a MHz width channel with regulatory rule:\n", | 755 | "for a %d MHz width channel with regulatory rule:\n", |
| 756 | chan->center_freq, | 756 | chan->center_freq, |
| 757 | KHZ_TO_MHZ(desired_bw_khz)); | 757 | KHZ_TO_MHZ(desired_bw_khz)); |
| 758 | 758 | ||
