diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-1000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-2000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 32 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 24 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debug.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-led.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-pci.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-power.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rx.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-shared.h | 100 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.c | 1 |
18 files changed, 140 insertions, 48 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index ccdbed567171..4314c61c40bb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include "iwl-agn.h" | 43 | #include "iwl-agn.h" |
44 | #include "iwl-helpers.h" | 44 | #include "iwl-helpers.h" |
45 | #include "iwl-agn-hw.h" | 45 | #include "iwl-agn-hw.h" |
46 | #include "iwl-shared.h" | ||
46 | 47 | ||
47 | /* Highest firmware API version supported */ | 48 | /* Highest firmware API version supported */ |
48 | #define IWL1000_UCODE_API_MAX 6 | 49 | #define IWL1000_UCODE_API_MAX 6 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c index 3e1cdd36caef..e623870c0fe7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-2000.c +++ b/drivers/net/wireless/iwlwifi/iwl-2000.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include "iwl-helpers.h" | 44 | #include "iwl-helpers.h" |
45 | #include "iwl-agn-hw.h" | 45 | #include "iwl-agn-hw.h" |
46 | #include "iwl-6000-hw.h" | 46 | #include "iwl-6000-hw.h" |
47 | #include "iwl-shared.h" | ||
47 | 48 | ||
48 | /* Highest firmware API version supported */ | 49 | /* Highest firmware API version supported */ |
49 | #define IWL2030_UCODE_API_MAX 6 | 50 | #define IWL2030_UCODE_API_MAX 6 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index a9adee5634d8..c79f1f7830b0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include "iwl-agn-hw.h" | 46 | #include "iwl-agn-hw.h" |
47 | #include "iwl-5000-hw.h" | 47 | #include "iwl-5000-hw.h" |
48 | #include "iwl-trans.h" | 48 | #include "iwl-trans.h" |
49 | #include "iwl-shared.h" | ||
49 | 50 | ||
50 | /* Highest firmware API version supported */ | 51 | /* Highest firmware API version supported */ |
51 | #define IWL5000_UCODE_API_MAX 5 | 52 | #define IWL5000_UCODE_API_MAX 5 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 850f9242a165..bf84fa697209 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include "iwl-agn-hw.h" | 45 | #include "iwl-agn-hw.h" |
46 | #include "iwl-6000-hw.h" | 46 | #include "iwl-6000-hw.h" |
47 | #include "iwl-trans.h" | 47 | #include "iwl-trans.h" |
48 | #include "iwl-shared.h" | ||
48 | 49 | ||
49 | /* Highest firmware API version supported */ | 50 | /* Highest firmware API version supported */ |
50 | #define IWL6000_UCODE_API_MAX 4 | 51 | #define IWL6000_UCODE_API_MAX 4 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 4edb6cfc5488..dd95f47854d4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "iwl-agn.h" | 40 | #include "iwl-agn.h" |
41 | #include "iwl-sta.h" | 41 | #include "iwl-sta.h" |
42 | #include "iwl-trans.h" | 42 | #include "iwl-trans.h" |
43 | #include "iwl-shared.h" | ||
43 | 44 | ||
44 | static inline u32 iwlagn_get_scd_ssn(struct iwlagn_tx_resp *tx_resp) | 45 | static inline u32 iwlagn_get_scd_ssn(struct iwlagn_tx_resp *tx_resp) |
45 | { | 46 | { |
@@ -609,6 +610,8 @@ struct iwl_mod_params iwlagn_mod_params = { | |||
609 | .bt_coex_active = true, | 610 | .bt_coex_active = true, |
610 | .no_sleep_autoadjust = true, | 611 | .no_sleep_autoadjust = true, |
611 | .power_level = IWL_POWER_INDEX_1, | 612 | .power_level = IWL_POWER_INDEX_1, |
613 | .bt_ch_announce = 1, | ||
614 | .wanted_ucode_alternative = 1, | ||
612 | /* the rest are 0 by default */ | 615 | /* the rest are 0 by default */ |
613 | }; | 616 | }; |
614 | 617 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index d562e9359d97..2829bf843d0c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "iwl-agn-calib.h" | 31 | #include "iwl-agn-calib.h" |
32 | #include "iwl-helpers.h" | 32 | #include "iwl-helpers.h" |
33 | #include "iwl-trans.h" | 33 | #include "iwl-trans.h" |
34 | #include "iwl-shared.h" | ||
34 | 35 | ||
35 | static int iwlagn_disable_bss(struct iwl_priv *priv, | 36 | static int iwlagn_disable_bss(struct iwl_priv *priv, |
36 | struct iwl_rxon_context *ctx, | 37 | struct iwl_rxon_context *ctx, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 7f50d9d6f7cf..cb8a9f9a22df 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include "iwl-sta.h" | 51 | #include "iwl-sta.h" |
52 | #include "iwl-agn-calib.h" | 52 | #include "iwl-agn-calib.h" |
53 | #include "iwl-agn.h" | 53 | #include "iwl-agn.h" |
54 | #include "iwl-shared.h" | ||
54 | #include "iwl-bus.h" | 55 | #include "iwl-bus.h" |
55 | #include "iwl-trans.h" | 56 | #include "iwl-trans.h" |
56 | 57 | ||
@@ -79,9 +80,6 @@ MODULE_VERSION(DRV_VERSION); | |||
79 | MODULE_AUTHOR(DRV_COPYRIGHT " " DRV_AUTHOR); | 80 | MODULE_AUTHOR(DRV_COPYRIGHT " " DRV_AUTHOR); |
80 | MODULE_LICENSE("GPL"); | 81 | MODULE_LICENSE("GPL"); |
81 | 82 | ||
82 | static int iwlagn_ant_coupling; | ||
83 | static bool iwlagn_bt_ch_announce = 1; | ||
84 | |||
85 | void iwl_update_chain_flags(struct iwl_priv *priv) | 83 | void iwl_update_chain_flags(struct iwl_priv *priv) |
86 | { | 84 | { |
87 | struct iwl_rxon_context *ctx; | 85 | struct iwl_rxon_context *ctx; |
@@ -818,8 +816,6 @@ static int iwlagn_load_legacy_firmware(struct iwl_priv *priv, | |||
818 | return 0; | 816 | return 0; |
819 | } | 817 | } |
820 | 818 | ||
821 | static int iwlagn_wanted_ucode_alternative = 1; | ||
822 | |||
823 | static int iwlagn_load_firmware(struct iwl_priv *priv, | 819 | static int iwlagn_load_firmware(struct iwl_priv *priv, |
824 | const struct firmware *ucode_raw, | 820 | const struct firmware *ucode_raw, |
825 | struct iwlagn_firmware_pieces *pieces, | 821 | struct iwlagn_firmware_pieces *pieces, |
@@ -829,7 +825,8 @@ static int iwlagn_load_firmware(struct iwl_priv *priv, | |||
829 | struct iwl_ucode_tlv *tlv; | 825 | struct iwl_ucode_tlv *tlv; |
830 | size_t len = ucode_raw->size; | 826 | size_t len = ucode_raw->size; |
831 | const u8 *data; | 827 | const u8 *data; |
832 | int wanted_alternative = iwlagn_wanted_ucode_alternative, tmp; | 828 | int wanted_alternative = iwlagn_mod_params.wanted_ucode_alternative; |
829 | int tmp; | ||
833 | u64 alternatives; | 830 | u64 alternatives; |
834 | u32 tlv_len; | 831 | u32 tlv_len; |
835 | enum iwl_ucode_tlv_type tlv_type; | 832 | enum iwl_ucode_tlv_type tlv_type; |
@@ -1619,7 +1616,7 @@ int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log, | |||
1619 | } | 1616 | } |
1620 | 1617 | ||
1621 | /* enable/disable bt channel inhibition */ | 1618 | /* enable/disable bt channel inhibition */ |
1622 | priv->bt_ch_announce = iwlagn_bt_ch_announce; | 1619 | priv->bt_ch_announce = iwlagn_mod_params.bt_ch_announce; |
1623 | 1620 | ||
1624 | #ifdef CONFIG_IWLWIFI_DEBUG | 1621 | #ifdef CONFIG_IWLWIFI_DEBUG |
1625 | if (!(iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS) && !full_log) | 1622 | if (!(iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS) && !full_log) |
@@ -3618,11 +3615,12 @@ int iwl_probe(struct iwl_bus *bus, struct iwl_cfg *cfg) | |||
3618 | 3615 | ||
3619 | /* is antenna coupling more than 35dB ? */ | 3616 | /* is antenna coupling more than 35dB ? */ |
3620 | priv->bt_ant_couple_ok = | 3617 | priv->bt_ant_couple_ok = |
3621 | (iwlagn_ant_coupling > IWL_BT_ANTENNA_COUPLING_THRESHOLD) ? | 3618 | (iwlagn_mod_params.ant_coupling > |
3622 | true : false; | 3619 | IWL_BT_ANTENNA_COUPLING_THRESHOLD) ? |
3620 | true : false; | ||
3623 | 3621 | ||
3624 | /* enable/disable bt channel inhibition */ | 3622 | /* enable/disable bt channel inhibition */ |
3625 | priv->bt_ch_announce = iwlagn_bt_ch_announce; | 3623 | priv->bt_ch_announce = iwlagn_mod_params.bt_ch_announce; |
3626 | IWL_DEBUG_INFO(priv, "BT channel inhibition is %s\n", | 3624 | IWL_DEBUG_INFO(priv, "BT channel inhibition is %s\n", |
3627 | (priv->bt_ch_announce) ? "On" : "Off"); | 3625 | (priv->bt_ch_announce) ? "On" : "Off"); |
3628 | 3626 | ||
@@ -3863,7 +3861,8 @@ module_exit(iwl_exit); | |||
3863 | module_init(iwl_init); | 3861 | module_init(iwl_init); |
3864 | 3862 | ||
3865 | #ifdef CONFIG_IWLWIFI_DEBUG | 3863 | #ifdef CONFIG_IWLWIFI_DEBUG |
3866 | module_param_named(debug, iwl_debug_level, uint, S_IRUGO | S_IWUSR); | 3864 | module_param_named(debug, iwlagn_mod_params.debug_level, uint, |
3865 | S_IRUGO | S_IWUSR); | ||
3867 | MODULE_PARM_DESC(debug, "debug output mask"); | 3866 | MODULE_PARM_DESC(debug, "debug output mask"); |
3868 | #endif | 3867 | #endif |
3869 | 3868 | ||
@@ -3879,16 +3878,19 @@ MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size"); | |||
3879 | module_param_named(fw_restart, iwlagn_mod_params.restart_fw, int, S_IRUGO); | 3878 | module_param_named(fw_restart, iwlagn_mod_params.restart_fw, int, S_IRUGO); |
3880 | MODULE_PARM_DESC(fw_restart, "restart firmware in case of error"); | 3879 | MODULE_PARM_DESC(fw_restart, "restart firmware in case of error"); |
3881 | 3880 | ||
3882 | module_param_named(ucode_alternative, iwlagn_wanted_ucode_alternative, int, | 3881 | module_param_named(ucode_alternative, |
3883 | S_IRUGO); | 3882 | iwlagn_mod_params.wanted_ucode_alternative, |
3883 | int, S_IRUGO); | ||
3884 | MODULE_PARM_DESC(ucode_alternative, | 3884 | MODULE_PARM_DESC(ucode_alternative, |
3885 | "specify ucode alternative to use from ucode file"); | 3885 | "specify ucode alternative to use from ucode file"); |
3886 | 3886 | ||
3887 | module_param_named(antenna_coupling, iwlagn_ant_coupling, int, S_IRUGO); | 3887 | module_param_named(antenna_coupling, iwlagn_mod_params.ant_coupling, |
3888 | int, S_IRUGO); | ||
3888 | MODULE_PARM_DESC(antenna_coupling, | 3889 | MODULE_PARM_DESC(antenna_coupling, |
3889 | "specify antenna coupling in dB (defualt: 0 dB)"); | 3890 | "specify antenna coupling in dB (defualt: 0 dB)"); |
3890 | 3891 | ||
3891 | module_param_named(bt_ch_inhibition, iwlagn_bt_ch_announce, bool, S_IRUGO); | 3892 | module_param_named(bt_ch_inhibition, iwlagn_mod_params.bt_ch_announce, |
3893 | bool, S_IRUGO); | ||
3892 | MODULE_PARM_DESC(bt_ch_inhibition, | 3894 | MODULE_PARM_DESC(bt_ch_inhibition, |
3893 | "Disable BT channel inhibition (default: enable)"); | 3895 | "Disable BT channel inhibition (default: enable)"); |
3894 | 3896 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index a2f2f2896112..ea2a5fe8da8f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h | |||
@@ -108,8 +108,6 @@ extern struct iwl_cfg iwl105_bgn_cfg; | |||
108 | extern struct iwl_cfg iwl135_bg_cfg; | 108 | extern struct iwl_cfg iwl135_bg_cfg; |
109 | extern struct iwl_cfg iwl135_bgn_cfg; | 109 | extern struct iwl_cfg iwl135_bgn_cfg; |
110 | 110 | ||
111 | extern struct iwl_mod_params iwlagn_mod_params; | ||
112 | |||
113 | extern struct ieee80211_ops iwlagn_hw_ops; | 111 | extern struct ieee80211_ops iwlagn_hw_ops; |
114 | 112 | ||
115 | int iwl_reset_ict(struct iwl_priv *priv); | 113 | int iwl_reset_ict(struct iwl_priv *priv); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 0d8fd5b0cd7c..6c11f0dce0d1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -42,11 +42,10 @@ | |||
42 | #include "iwl-sta.h" | 42 | #include "iwl-sta.h" |
43 | #include "iwl-agn.h" | 43 | #include "iwl-agn.h" |
44 | #include "iwl-helpers.h" | 44 | #include "iwl-helpers.h" |
45 | #include "iwl-shared.h" | ||
45 | #include "iwl-agn.h" | 46 | #include "iwl-agn.h" |
46 | #include "iwl-trans.h" | 47 | #include "iwl-trans.h" |
47 | 48 | ||
48 | u32 iwl_debug_level; | ||
49 | |||
50 | const u8 iwl_bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; | 49 | const u8 iwl_bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; |
51 | 50 | ||
52 | #define MAX_BIT_RATE_40_MHZ 150 /* Mbps */ | 51 | #define MAX_BIT_RATE_40_MHZ 150 /* Mbps */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 2c8b4a513a12..fe46d0f71362 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -101,23 +101,6 @@ struct iwl_lib_ops { | |||
101 | void (*temperature)(struct iwl_priv *priv); | 101 | void (*temperature)(struct iwl_priv *priv); |
102 | }; | 102 | }; |
103 | 103 | ||
104 | struct iwl_mod_params { | ||
105 | int sw_crypto; /* def: 0 = using hardware encryption */ | ||
106 | int num_of_queues; /* def: HW dependent */ | ||
107 | int disable_11n; /* def: 0 = 11n capabilities enabled */ | ||
108 | int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */ | ||
109 | int antenna; /* def: 0 = both antennas (use diversity) */ | ||
110 | int restart_fw; /* def: 1 = restart firmware */ | ||
111 | bool plcp_check; /* def: true = enable plcp health check */ | ||
112 | bool ack_check; /* def: false = disable ack health check */ | ||
113 | bool wd_disable; /* def: false = enable stuck queue check */ | ||
114 | bool bt_coex_active; /* def: true = enable bt coex */ | ||
115 | int led_mode; /* def: 0 = system default */ | ||
116 | bool no_sleep_autoadjust; /* def: true = disable autoadjust */ | ||
117 | bool power_save; /* def: false = disable power save */ | ||
118 | int power_level; /* def: 1 = power level */ | ||
119 | }; | ||
120 | |||
121 | /* | 104 | /* |
122 | * @max_ll_items: max number of OTP blocks | 105 | * @max_ll_items: max number of OTP blocks |
123 | * @shadow_ram_support: shadow support for OTP memory | 106 | * @shadow_ram_support: shadow support for OTP memory |
@@ -389,13 +372,6 @@ u32 iwl_usecs_to_beacons(struct iwl_priv *priv, u32 usec, u32 beacon_interval); | |||
389 | __le32 iwl_add_beacon_time(struct iwl_priv *priv, u32 base, | 372 | __le32 iwl_add_beacon_time(struct iwl_priv *priv, u32 base, |
390 | u32 addon, u32 beacon_interval); | 373 | u32 addon, u32 beacon_interval); |
391 | 374 | ||
392 | #ifdef CONFIG_PM | ||
393 | int iwl_suspend(struct iwl_priv *priv); | ||
394 | int iwl_resume(struct iwl_priv *priv); | ||
395 | #endif /* !CONFIG_PM */ | ||
396 | |||
397 | int iwl_probe(struct iwl_bus *bus, struct iwl_cfg *cfg); | ||
398 | void __devexit iwl_remove(struct iwl_priv * priv); | ||
399 | 375 | ||
400 | /***************************************************** | 376 | /***************************************************** |
401 | * Error Handling Debugging | 377 | * Error Handling Debugging |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h index f9a407e40aff..0869eaa1308e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debug.h +++ b/drivers/net/wireless/iwlwifi/iwl-debug.h | |||
@@ -30,7 +30,6 @@ | |||
30 | #define __iwl_debug_h__ | 30 | #define __iwl_debug_h__ |
31 | 31 | ||
32 | struct iwl_priv; | 32 | struct iwl_priv; |
33 | extern u32 iwl_debug_level; | ||
34 | 33 | ||
35 | #define IWL_ERR(p, f, a...) dev_err(p->bus->dev, f, ## a) | 34 | #define IWL_ERR(p, f, a...) dev_err(p->bus->dev, f, ## a) |
36 | #define IWL_WARN(p, f, a...) dev_warn(p->bus->dev, f, ## a) | 35 | #define IWL_WARN(p, f, a...) dev_warn(p->bus->dev, f, ## a) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index dd34c7c502fa..d0e65c82cce3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -50,6 +50,7 @@ | |||
50 | #include "iwl-agn-tt.h" | 50 | #include "iwl-agn-tt.h" |
51 | #include "iwl-bus.h" | 51 | #include "iwl-bus.h" |
52 | #include "iwl-trans.h" | 52 | #include "iwl-trans.h" |
53 | #include "iwl-shared.h" | ||
53 | 54 | ||
54 | #define DRV_NAME "iwlagn" | 55 | #define DRV_NAME "iwlagn" |
55 | 56 | ||
@@ -1513,7 +1514,7 @@ struct iwl_priv { | |||
1513 | #ifdef CONFIG_IWLWIFI_DEBUG | 1514 | #ifdef CONFIG_IWLWIFI_DEBUG |
1514 | /* debugging info */ | 1515 | /* debugging info */ |
1515 | u32 debug_level; /* per device debugging will override global | 1516 | u32 debug_level; /* per device debugging will override global |
1516 | iwl_debug_level if set */ | 1517 | iwlagn_mod_params.debug_level if set */ |
1517 | #endif /* CONFIG_IWLWIFI_DEBUG */ | 1518 | #endif /* CONFIG_IWLWIFI_DEBUG */ |
1518 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 1519 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
1519 | /* debugfs */ | 1520 | /* debugfs */ |
@@ -1562,6 +1563,8 @@ static inline void iwl_txq_ctx_deactivate(struct iwl_priv *priv, int txq_id) | |||
1562 | clear_bit(txq_id, &priv->txq_ctx_active_msk); | 1563 | clear_bit(txq_id, &priv->txq_ctx_active_msk); |
1563 | } | 1564 | } |
1564 | 1565 | ||
1566 | extern struct iwl_mod_params iwlagn_mod_params; | ||
1567 | |||
1565 | #ifdef CONFIG_IWLWIFI_DEBUG | 1568 | #ifdef CONFIG_IWLWIFI_DEBUG |
1566 | /* | 1569 | /* |
1567 | * iwl_get_debug_level: Return active debug level for device | 1570 | * iwl_get_debug_level: Return active debug level for device |
@@ -1575,12 +1578,12 @@ static inline u32 iwl_get_debug_level(struct iwl_priv *priv) | |||
1575 | if (priv->debug_level) | 1578 | if (priv->debug_level) |
1576 | return priv->debug_level; | 1579 | return priv->debug_level; |
1577 | else | 1580 | else |
1578 | return iwl_debug_level; | 1581 | return iwlagn_mod_params.debug_level; |
1579 | } | 1582 | } |
1580 | #else | 1583 | #else |
1581 | static inline u32 iwl_get_debug_level(struct iwl_priv *priv) | 1584 | static inline u32 iwl_get_debug_level(struct iwl_priv *priv) |
1582 | { | 1585 | { |
1583 | return iwl_debug_level; | 1586 | return iwlagn_mod_params.debug_level; |
1584 | } | 1587 | } |
1585 | #endif | 1588 | #endif |
1586 | 1589 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c index 1a5252d8ca73..d8049febe047 100644 --- a/drivers/net/wireless/iwlwifi/iwl-led.c +++ b/drivers/net/wireless/iwlwifi/iwl-led.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "iwl-agn.h" | 40 | #include "iwl-agn.h" |
41 | #include "iwl-io.h" | 41 | #include "iwl-io.h" |
42 | #include "iwl-trans.h" | 42 | #include "iwl-trans.h" |
43 | #include "iwl-shared.h" | ||
43 | 44 | ||
44 | /* Throughput OFF time(ms) ON time (ms) | 45 | /* Throughput OFF time(ms) ON time (ms) |
45 | * >300 25 25 | 46 | * >300 25 25 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c index 69d4ec467dca..a2441dd2fd50 100644 --- a/drivers/net/wireless/iwlwifi/iwl-pci.c +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c | |||
@@ -64,8 +64,11 @@ | |||
64 | #include <linux/pci-aspm.h> | 64 | #include <linux/pci-aspm.h> |
65 | 65 | ||
66 | #include "iwl-bus.h" | 66 | #include "iwl-bus.h" |
67 | #include "iwl-shared.h" | ||
67 | #include "iwl-agn.h" | 68 | #include "iwl-agn.h" |
68 | #include "iwl-core.h" | 69 | |
70 | /* TODO: iwl_set_bit and friends should be implemented in bus layer | ||
71 | * this would allow us not to include iwl-io.h here */ | ||
69 | #include "iwl-io.h" | 72 | #include "iwl-io.h" |
70 | 73 | ||
71 | /* PCI registers */ | 74 | /* PCI registers */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index cd64df05f9ed..b60e692a4765 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include "iwl-debug.h" | 43 | #include "iwl-debug.h" |
44 | #include "iwl-power.h" | 44 | #include "iwl-power.h" |
45 | #include "iwl-trans.h" | 45 | #include "iwl-trans.h" |
46 | #include "iwl-shared.h" | ||
46 | 47 | ||
47 | /* | 48 | /* |
48 | * Setting power level allows the card to go to sleep when not busy. | 49 | * Setting power level allows the card to go to sleep when not busy. |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 8e314003b63a..8b3a08958cc8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "iwl-helpers.h" | 40 | #include "iwl-helpers.h" |
41 | #include "iwl-agn-calib.h" | 41 | #include "iwl-agn-calib.h" |
42 | #include "iwl-agn.h" | 42 | #include "iwl-agn.h" |
43 | #include "iwl-shared.h" | ||
43 | 44 | ||
44 | 45 | ||
45 | /****************************************************************************** | 46 | /****************************************************************************** |
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h new file mode 100644 index 000000000000..5d48d059fcd8 --- /dev/null +++ b/drivers/net/wireless/iwlwifi/iwl-shared.h | |||
@@ -0,0 +1,100 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * This file is provided under a dual BSD/GPLv2 license. When using or | ||
4 | * redistributing this file, you may do so under either license. | ||
5 | * | ||
6 | * GPL LICENSE SUMMARY | ||
7 | * | ||
8 | * Copyright(c) 2007 - 2011 Intel Corporation. All rights reserved. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of version 2 of the GNU General Public License as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, but | ||
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, | ||
22 | * USA | ||
23 | * | ||
24 | * The full GNU General Public License is included in this distribution | ||
25 | * in the file called LICENSE.GPL. | ||
26 | * | ||
27 | * Contact Information: | ||
28 | * Intel Linux Wireless <ilw@linux.intel.com> | ||
29 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
30 | * | ||
31 | * BSD LICENSE | ||
32 | * | ||
33 | * Copyright(c) 2005 - 2011 Intel Corporation. All rights reserved. | ||
34 | * All rights reserved. | ||
35 | * | ||
36 | * Redistribution and use in source and binary forms, with or without | ||
37 | * modification, are permitted provided that the following conditions | ||
38 | * are met: | ||
39 | * | ||
40 | * * Redistributions of source code must retain the above copyright | ||
41 | * notice, this list of conditions and the following disclaimer. | ||
42 | * * Redistributions in binary form must reproduce the above copyright | ||
43 | * notice, this list of conditions and the following disclaimer in | ||
44 | * the documentation and/or other materials provided with the | ||
45 | * distribution. | ||
46 | * * Neither the name Intel Corporation nor the names of its | ||
47 | * contributors may be used to endorse or promote products derived | ||
48 | * from this software without specific prior written permission. | ||
49 | * | ||
50 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
51 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
52 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
53 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
54 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
55 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
56 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
57 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
58 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
59 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
60 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
61 | * | ||
62 | *****************************************************************************/ | ||
63 | #ifndef __iwl_shared_h__ | ||
64 | #define __iwl_shared_h__ | ||
65 | |||
66 | struct iwl_cfg; | ||
67 | struct iwl_priv; | ||
68 | |||
69 | extern struct iwl_mod_params iwlagn_mod_params; | ||
70 | |||
71 | struct iwl_mod_params { | ||
72 | int sw_crypto; /* def: 0 = using hardware encryption */ | ||
73 | int num_of_queues; /* def: HW dependent */ | ||
74 | int disable_11n; /* def: 0 = 11n capabilities enabled */ | ||
75 | int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */ | ||
76 | int antenna; /* def: 0 = both antennas (use diversity) */ | ||
77 | int restart_fw; /* def: 1 = restart firmware */ | ||
78 | bool plcp_check; /* def: true = enable plcp health check */ | ||
79 | bool ack_check; /* def: false = disable ack health check */ | ||
80 | bool wd_disable; /* def: false = enable stuck queue check */ | ||
81 | bool bt_coex_active; /* def: true = enable bt coex */ | ||
82 | int led_mode; /* def: 0 = system default */ | ||
83 | bool no_sleep_autoadjust; /* def: true = disable autoadjust */ | ||
84 | bool power_save; /* def: false = disable power save */ | ||
85 | int power_level; /* def: 1 = power level */ | ||
86 | u32 debug_level; /* levels are IWL_DL_* */ | ||
87 | int ant_coupling; | ||
88 | bool bt_ch_announce; | ||
89 | int wanted_ucode_alternative; | ||
90 | }; | ||
91 | |||
92 | #ifdef CONFIG_PM | ||
93 | int iwl_suspend(struct iwl_priv *priv); | ||
94 | int iwl_resume(struct iwl_priv *priv); | ||
95 | #endif /* !CONFIG_PM */ | ||
96 | |||
97 | int iwl_probe(struct iwl_bus *bus, struct iwl_cfg *cfg); | ||
98 | void __devexit iwl_remove(struct iwl_priv * priv); | ||
99 | |||
100 | #endif /* #__iwl_shared_h__ */ | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.c b/drivers/net/wireless/iwlwifi/iwl-trans.c index 3001bfb46e25..e4a70fed8cf8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans.c | |||
@@ -68,6 +68,7 @@ | |||
68 | /*TODO remove uneeded includes when the transport layer tx_free will be here */ | 68 | /*TODO remove uneeded includes when the transport layer tx_free will be here */ |
69 | #include "iwl-agn.h" | 69 | #include "iwl-agn.h" |
70 | #include "iwl-core.h" | 70 | #include "iwl-core.h" |
71 | #include "iwl-shared.h" | ||
71 | 72 | ||
72 | static int iwl_trans_rx_alloc(struct iwl_priv *priv) | 73 | static int iwl_trans_rx_alloc(struct iwl_priv *priv) |
73 | { | 74 | { |