aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 55d61000e342..f65fd6e5fecc 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -226,6 +226,7 @@ static int iwl4965_rx_init(struct iwl4965_priv *priv, struct iwl4965_rx_queue *r
226{ 226{
227 int rc; 227 int rc;
228 unsigned long flags; 228 unsigned long flags;
229 unsigned int rb_size;
229 230
230 spin_lock_irqsave(&priv->lock, flags); 231 spin_lock_irqsave(&priv->lock, flags);
231 rc = iwl4965_grab_nic_access(priv); 232 rc = iwl4965_grab_nic_access(priv);
@@ -234,6 +235,11 @@ static int iwl4965_rx_init(struct iwl4965_priv *priv, struct iwl4965_rx_queue *r
234 return rc; 235 return rc;
235 } 236 }
236 237
238 if (iwl4965_param_amsdu_size_8K)
239 rb_size = FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K;
240 else
241 rb_size = FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_4K;
242
237 /* Stop Rx DMA */ 243 /* Stop Rx DMA */
238 iwl4965_write_direct32(priv, FH_MEM_RCSR_CHNL0_CONFIG_REG, 0); 244 iwl4965_write_direct32(priv, FH_MEM_RCSR_CHNL0_CONFIG_REG, 0);
239 245
@@ -253,7 +259,7 @@ static int iwl4965_rx_init(struct iwl4965_priv *priv, struct iwl4965_rx_queue *r
253 iwl4965_write_direct32(priv, FH_MEM_RCSR_CHNL0_CONFIG_REG, 259 iwl4965_write_direct32(priv, FH_MEM_RCSR_CHNL0_CONFIG_REG,
254 FH_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL | 260 FH_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL |
255 FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL | 261 FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL |
256 IWL_FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_4K | 262 rb_size |
257 /*0x10 << 4 | */ 263 /*0x10 << 4 | */
258 (RX_QUEUE_SIZE_LOG << 264 (RX_QUEUE_SIZE_LOG <<
259 FH_RCSR_RX_CONFIG_RBDCB_SIZE_BITSHIFT)); 265 FH_RCSR_RX_CONFIG_RBDCB_SIZE_BITSHIFT));
@@ -1771,7 +1777,11 @@ int iwl4965_hw_set_hw_setting(struct iwl4965_priv *priv)
1771 priv->hw_setting.tx_cmd_len = sizeof(struct iwl4965_tx_cmd); 1777 priv->hw_setting.tx_cmd_len = sizeof(struct iwl4965_tx_cmd);
1772 priv->hw_setting.max_rxq_size = RX_QUEUE_SIZE; 1778 priv->hw_setting.max_rxq_size = RX_QUEUE_SIZE;
1773 priv->hw_setting.max_rxq_log = RX_QUEUE_SIZE_LOG; 1779 priv->hw_setting.max_rxq_log = RX_QUEUE_SIZE_LOG;
1774 1780 if (iwl4965_param_amsdu_size_8K)
1781 priv->hw_setting.rx_buf_size = IWL_RX_BUF_SIZE_8K;
1782 else
1783 priv->hw_setting.rx_buf_size = IWL_RX_BUF_SIZE_4K;
1784 priv->hw_setting.max_pkt_size = priv->hw_setting.rx_buf_size - 256;
1775 priv->hw_setting.max_stations = IWL4965_STATION_COUNT; 1785 priv->hw_setting.max_stations = IWL4965_STATION_COUNT;
1776 priv->hw_setting.bcast_sta_id = IWL4965_BROADCAST_ID; 1786 priv->hw_setting.bcast_sta_id = IWL4965_BROADCAST_ID;
1777 return 0; 1787 return 0;
@@ -3619,7 +3629,7 @@ static void iwl4965_handle_data_packet(struct iwl4965_priv *priv, int is_data,
3619 rx_start->byte_count = amsdu->byte_count; 3629 rx_start->byte_count = amsdu->byte_count;
3620 rx_end = (__le32 *) (((u8 *) hdr) + len); 3630 rx_end = (__le32 *) (((u8 *) hdr) + len);
3621 } 3631 }
3622 if (len > IWL_RX_BUF_SIZE || len < 16) { 3632 if (len > priv->hw_setting.max_pkt_size || len < 16) {
3623 IWL_WARNING("byte count out of range [16,4K]" 3633 IWL_WARNING("byte count out of range [16,4K]"
3624 " : %d\n", len); 3634 " : %d\n", len);
3625 return; 3635 return;
@@ -3785,6 +3795,10 @@ void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info, int mode)
3785 ht_info->cap |= (u16)IEEE80211_HT_CAP_SGI_20; 3795 ht_info->cap |= (u16)IEEE80211_HT_CAP_SGI_20;
3786 ht_info->cap |= (u16)(IEEE80211_HT_CAP_MIMO_PS & 3796 ht_info->cap |= (u16)(IEEE80211_HT_CAP_MIMO_PS &
3787 (IWL_MIMO_PS_NONE << 2)); 3797 (IWL_MIMO_PS_NONE << 2));
3798 if (iwl4965_param_amsdu_size_8K) {
3799 printk(KERN_DEBUG "iwl4965 in A-MSDU 8K support mode\n");
3800 ht_info->cap |= (u16)IEEE80211_HT_CAP_MAX_AMSDU;
3801 }
3788 3802
3789 ht_info->ampdu_factor = CFG_HT_RX_AMPDU_FACTOR_DEF; 3803 ht_info->ampdu_factor = CFG_HT_RX_AMPDU_FACTOR_DEF;
3790 ht_info->ampdu_density = CFG_HT_MPDU_DENSITY_DEF; 3804 ht_info->ampdu_density = CFG_HT_MPDU_DENSITY_DEF;