Gentoo Archives: gentoo-commits

From: "Mike Pagano (mpagano)" <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] linux-patches r1859 - genpatches-2.6/trunk/2.6.37
Date: Thu, 06 Jan 2011 15:34:48
Message-Id: 20110106153438.2BF0520051@flycatcher.gentoo.org
1 Author: mpagano
2 Date: 2011-01-06 15:34:34 +0000 (Thu, 06 Jan 2011)
3 New Revision: 1859
4
5 Added:
6 genpatches-2.6/trunk/2.6.37/2400_iwlwifi-fw-reload-rf-fix.patch
7 Modified:
8 genpatches-2.6/trunk/2.6.37/0000_README
9 Log:
10 iwlwifi: patch to not reload fw if WiMAX owns the RF.
11
12 Modified: genpatches-2.6/trunk/2.6.37/0000_README
13 ===================================================================
14 --- genpatches-2.6/trunk/2.6.37/0000_README 2011-01-05 13:53:51 UTC (rev 1858)
15 +++ genpatches-2.6/trunk/2.6.37/0000_README 2011-01-06 15:34:34 UTC (rev 1859)
16 @@ -39,6 +39,10 @@
17 Individual Patch Descriptions:
18 --------------------------------------------------------------------------
19
20 +Patch: 2400_iwlwifi-fw-reload-rf-fix.patch
21 +From: http://www.spinics.net/lists/linux-wireless/msg61225.html
22 +Desc: Do not reload fw if WiMAX own the RF
23 +
24 Patch: 4200_fbcondecor-0.9.6.patch
25 From: http://dev.gentoo.org/~spock
26 Desc: Bootsplash successor by Michal Januszewski
27
28 Added: genpatches-2.6/trunk/2.6.37/2400_iwlwifi-fw-reload-rf-fix.patch
29 ===================================================================
30 --- genpatches-2.6/trunk/2.6.37/2400_iwlwifi-fw-reload-rf-fix.patch (rev 0)
31 +++ genpatches-2.6/trunk/2.6.37/2400_iwlwifi-fw-reload-rf-fix.patch 2011-01-06 15:34:34 UTC (rev 1859)
32 @@ -0,0 +1,110 @@
33 +diff -urN linux-2.6.37-tuxonice.orig/drivers/net/wireless/iwlwifi/iwl-5000.c linux-2.6.37-tuxonice/drivers/net/wireless/iwlwifi/iwl-5000.c
34 +--- linux-2.6.37-tuxonice.orig/drivers/net/wireless/iwlwifi/iwl-5000.c 2011-01-05 03:50:19.000000000 +0300
35 ++++ linux-2.6.37-tuxonice/drivers/net/wireless/iwlwifi/iwl-5000.c 2011-01-05 15:49:25.000000000 +0300
36 +@@ -593,6 +593,7 @@
37 + .mod_params = &iwlagn_mod_params,
38 + .base_params = &iwl5000_base_params,
39 + .ht_params = &iwl5000_ht_params,
40 ++ .internal_wimax_coex = true,
41 + };
42 +
43 + struct iwl_cfg iwl5150_agn_cfg = {
44 +@@ -610,6 +611,7 @@
45 + .base_params = &iwl5000_base_params,
46 + .ht_params = &iwl5000_ht_params,
47 + .need_dc_calib = true,
48 ++ .internal_wimax_coex = true,
49 + };
50 +
51 + struct iwl_cfg iwl5150_abg_cfg = {
52 +@@ -626,6 +628,7 @@
53 + .mod_params = &iwlagn_mod_params,
54 + .base_params = &iwl5000_base_params,
55 + .need_dc_calib = true,
56 ++ .internal_wimax_coex = true,
57 + };
58 +
59 + MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
60 +diff -urN linux-2.6.37-tuxonice.orig/drivers/net/wireless/iwlwifi/iwl-6000.c linux-2.6.37-tuxonice/drivers/net/wireless/iwlwifi/iwl-6000.c
61 +--- linux-2.6.37-tuxonice.orig/drivers/net/wireless/iwlwifi/iwl-6000.c 2011-01-05 03:50:19.000000000 +0300
62 ++++ linux-2.6.37-tuxonice/drivers/net/wireless/iwlwifi/iwl-6000.c 2011-01-05 15:50:26.000000000 +0300
63 +@@ -796,6 +796,7 @@
64 + .base_params = &iwl6050_base_params,
65 + .ht_params = &iwl6000_ht_params,
66 + .need_dc_calib = true,
67 ++ .internal_wimax_coex = true,
68 + };
69 +
70 + struct iwl_cfg iwl6050g2_bgn_cfg = {
71 +@@ -830,6 +831,7 @@
72 + .mod_params = &iwlagn_mod_params,
73 + .base_params = &iwl6050_base_params,
74 + .need_dc_calib = true,
75 ++ .internal_wimax_coex = true,
76 + };
77 +
78 + struct iwl_cfg iwl6000_3agn_cfg = {
79 +@@ -847,6 +849,7 @@
80 + .base_params = &iwl6000_base_params,
81 + .ht_params = &iwl6000_ht_params,
82 + .need_dc_calib = true,
83 ++ .internal_wimax_coex = true,
84 + };
85 +
86 + struct iwl_cfg iwl130_bgn_cfg = {
87 +diff -urN linux-2.6.37-tuxonice.orig/drivers/net/wireless/iwlwifi/iwl-core.c linux-2.6.37-tuxonice/drivers/net/wireless/iwlwifi/iwl-core.c
88 +--- linux-2.6.37-tuxonice.orig/drivers/net/wireless/iwlwifi/iwl-core.c 2011-01-05 03:50:19.000000000 +0300
89 ++++ linux-2.6.37-tuxonice/drivers/net/wireless/iwlwifi/iwl-core.c 2011-01-05 15:49:25.000000000 +0300
90 +@@ -1020,6 +1020,22 @@
91 + /* Cancel currently queued command. */
92 + clear_bit(STATUS_HCMD_ACTIVE, &priv->status);
93 +
94 ++ /* W/A for WiFi/WiMAX coex and WiMAX own the RF */
95 ++ if (priv->cfg->internal_wimax_coex &&
96 ++ (!(iwl_read_prph(priv, APMG_CLK_CTRL_REG) &
97 ++ APMS_CLK_VAL_MRB_FUNC_MODE) ||
98 ++ (iwl_read_prph(priv, APMG_PS_CTRL_REG) &
99 ++ APMG_PS_CTRL_VAL_RESET_REQ))) {
100 ++ wake_up_interruptible(&priv->wait_command_queue);
101 ++ /*
102 ++ * Keep the restart process from trying to send host
103 ++ * commands by clearing the INIT status bit
104 ++ */
105 ++ clear_bit(STATUS_READY, &priv->status);
106 ++ IWL_ERR(priv, "RF is used by WiMAX\n");
107 ++ return;
108 ++ }
109 ++
110 + IWL_ERR(priv, "Loaded firmware version: %s\n",
111 + priv->hw->wiphy->fw_version);
112 +
113 +diff -urN linux-2.6.37-tuxonice.orig/drivers/net/wireless/iwlwifi/iwl-core.h linux-2.6.37-tuxonice/drivers/net/wireless/iwlwifi/iwl-core.h
114 +--- linux-2.6.37-tuxonice.orig/drivers/net/wireless/iwlwifi/iwl-core.h 2011-01-05 03:50:19.000000000 +0300
115 ++++ linux-2.6.37-tuxonice/drivers/net/wireless/iwlwifi/iwl-core.h 2011-01-05 15:49:25.000000000 +0300
116 +@@ -344,6 +344,7 @@
117 + * @need_dc_calib: need to perform init dc calibration
118 + * @need_temp_offset_calib: need to perform temperature offset calibration
119 + * @scan_antennas: available antenna for scan operation
120 ++ * @internal_wimax_coex: internal wifi/wimax combo device
121 + *
122 + * We enable the driver to be backward compatible wrt API version. The
123 + * driver specifies which APIs it supports (with @ucode_api_max being the
124 +@@ -388,6 +389,7 @@
125 + enum iwl_pa_type pa_type; /* if used set to IWL_PA_SYSTEM */
126 + const bool need_dc_calib; /* if used set to true */
127 + const bool need_temp_offset_calib; /* if used set to true */
128 ++ const bool internal_wimax_coex;
129 + u8 scan_rx_antennas[IEEE80211_NUM_BANDS];
130 + u8 scan_tx_antennas[IEEE80211_NUM_BANDS];
131 + const bool use_new_eeprom_reading; /* temporary, remove later */
132 +diff -urN linux-2.6.37-tuxonice.orig/drivers/net/wireless/iwlwifi/iwl-prph.h linux-2.6.37-tuxonice/drivers/net/wireless/iwlwifi/iwl-prph.h
133 +--- linux-2.6.37-tuxonice.orig/drivers/net/wireless/iwlwifi/iwl-prph.h 2011-01-05 03:50:19.000000000 +0300
134 ++++ linux-2.6.37-tuxonice/drivers/net/wireless/iwlwifi/iwl-prph.h 2011-01-05 15:49:25.000000000 +0300
135 +@@ -83,6 +83,7 @@
136 + #define APMG_DIGITAL_SVR_REG (APMG_BASE + 0x0058)
137 + #define APMG_ANALOG_SVR_REG (APMG_BASE + 0x006C)
138 +
139 ++#define APMS_CLK_VAL_MRB_FUNC_MODE (0x00000001)
140 + #define APMG_CLK_VAL_DMA_CLK_RQT (0x00000200)
141 + #define APMG_CLK_VAL_BSM_CLK_RQT (0x00000800)
142 +