aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 234891d8cc1..303cc8193ad 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -1,6 +1,6 @@
1/****************************************************************************** 1/******************************************************************************
2 * 2 *
3 * Copyright(c) 2003 - 2009 Intel Corporation. All rights reserved. 3 * Copyright(c) 2003 - 2010 Intel Corporation. All rights reserved.
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify it 5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as 6 * under the terms of version 2 of the GNU General Public License as
@@ -45,8 +45,8 @@
45#include "iwl-sta.h" 45#include "iwl-sta.h"
46#include "iwl-3945.h" 46#include "iwl-3945.h"
47#include "iwl-eeprom.h" 47#include "iwl-eeprom.h"
48#include "iwl-helpers.h"
49#include "iwl-core.h" 48#include "iwl-core.h"
49#include "iwl-helpers.h"
50#include "iwl-led.h" 50#include "iwl-led.h"
51#include "iwl-3945-led.h" 51#include "iwl-3945-led.h"
52 52
@@ -1951,11 +1951,7 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv)
1951 } 1951 }
1952 1952
1953 /* Add the broadcast address so we can send broadcast frames */ 1953 /* Add the broadcast address so we can send broadcast frames */
1954 if (iwl_add_station(priv, iwl_bcast_addr, false, CMD_SYNC, NULL) == 1954 priv->cfg->ops->lib->add_bcast_station(priv);
1955 IWL_INVALID_STATION) {
1956 IWL_ERR(priv, "Error adding BROADCAST address for transmit.\n");
1957 return -EIO;
1958 }
1959 1955
1960 /* If we have set the ASSOC_MSK and we are in BSS mode then 1956 /* If we have set the ASSOC_MSK and we are in BSS mode then
1961 * add the IWL_AP_ID to the station rate table */ 1957 * add the IWL_AP_ID to the station rate table */
@@ -2474,11 +2470,9 @@ int iwl3945_hw_set_hw_params(struct iwl_priv *priv)
2474 memset((void *)&priv->hw_params, 0, 2470 memset((void *)&priv->hw_params, 0,
2475 sizeof(struct iwl_hw_params)); 2471 sizeof(struct iwl_hw_params));
2476 2472
2477 priv->shared_virt = 2473 priv->shared_virt = dma_alloc_coherent(&priv->pci_dev->dev,
2478 pci_alloc_consistent(priv->pci_dev, 2474 sizeof(struct iwl3945_shared),
2479 sizeof(struct iwl3945_shared), 2475 &priv->shared_phys, GFP_KERNEL);
2480 &priv->shared_phys);
2481
2482 if (!priv->shared_virt) { 2476 if (!priv->shared_virt) {
2483 IWL_ERR(priv, "failed to allocate pci memory\n"); 2477 IWL_ERR(priv, "failed to allocate pci memory\n");
2484 mutex_unlock(&priv->mutex); 2478 mutex_unlock(&priv->mutex);
@@ -2796,6 +2790,7 @@ static struct iwl_lib_ops iwl3945_lib = {
2796 .post_associate = iwl3945_post_associate, 2790 .post_associate = iwl3945_post_associate,
2797 .isr = iwl_isr_legacy, 2791 .isr = iwl_isr_legacy,
2798 .config_ap = iwl3945_config_ap, 2792 .config_ap = iwl3945_config_ap,
2793 .add_bcast_station = iwl3945_add_bcast_station,
2799}; 2794};
2800 2795
2801static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = { 2796static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = {
@@ -2804,7 +2799,7 @@ static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = {
2804 .rts_tx_cmd_flag = iwlcore_rts_tx_cmd_flag, 2799 .rts_tx_cmd_flag = iwlcore_rts_tx_cmd_flag,
2805}; 2800};
2806 2801
2807static struct iwl_ops iwl3945_ops = { 2802static const struct iwl_ops iwl3945_ops = {
2808 .ucode = &iwl3945_ucode, 2803 .ucode = &iwl3945_ucode,
2809 .lib = &iwl3945_lib, 2804 .lib = &iwl3945_lib,
2810 .hcmd = &iwl3945_hcmd, 2805 .hcmd = &iwl3945_hcmd,
@@ -2830,6 +2825,7 @@ static struct iwl_cfg iwl3945_bg_cfg = {
2830 .ht_greenfield_support = false, 2825 .ht_greenfield_support = false,
2831 .led_compensation = 64, 2826 .led_compensation = 64,
2832 .broken_powersave = true, 2827 .broken_powersave = true,
2828 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
2833}; 2829};
2834 2830
2835static struct iwl_cfg iwl3945_abg_cfg = { 2831static struct iwl_cfg iwl3945_abg_cfg = {
@@ -2847,9 +2843,10 @@ static struct iwl_cfg iwl3945_abg_cfg = {
2847 .ht_greenfield_support = false, 2843 .ht_greenfield_support = false,
2848 .led_compensation = 64, 2844 .led_compensation = 64,
2849 .broken_powersave = true, 2845 .broken_powersave = true,
2846 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
2850}; 2847};
2851 2848
2852struct pci_device_id iwl3945_hw_card_ids[] = { 2849DEFINE_PCI_DEVICE_TABLE(iwl3945_hw_card_ids) = {
2853 {IWL_PCI_DEVICE(0x4222, 0x1005, iwl3945_bg_cfg)}, 2850 {IWL_PCI_DEVICE(0x4222, 0x1005, iwl3945_bg_cfg)},
2854 {IWL_PCI_DEVICE(0x4222, 0x1034, iwl3945_bg_cfg)}, 2851 {IWL_PCI_DEVICE(0x4222, 0x1034, iwl3945_bg_cfg)},
2855 {IWL_PCI_DEVICE(0x4222, 0x1044, iwl3945_bg_cfg)}, 2852 {IWL_PCI_DEVICE(0x4222, 0x1044, iwl3945_bg_cfg)},