aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-10-08 16:51:11 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-08 16:51:11 -0400
commit9cf8d1a3b8cb19fa49494c1b8f0f9e3a37f2c218 (patch)
tree0e9262488832ad27f6ba42680bf104872fa3c697 /drivers/net/wireless/iwlwifi/iwl-agn-rx.c
parent8391d07b80e8da957cd888870e23f8e218438622 (diff)
parente9a68707d736f4f73d7e209885d7b4c5c452b1dc (diff)
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-rx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rx.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
index 9490eced119..1e08eb45547 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
@@ -73,7 +73,8 @@ static void iwl_rx_calc_noise(struct iwl_priv *priv)
73 int bcn_silence_a, bcn_silence_b, bcn_silence_c; 73 int bcn_silence_a, bcn_silence_b, bcn_silence_c;
74 int last_rx_noise; 74 int last_rx_noise;
75 75
76 if (priv->cfg->bt_statistics) 76 if (priv->cfg->bt_params &&
77 priv->cfg->bt_params->bt_statistics)
77 rx_info = &(priv->_agn.statistics_bt.rx.general.common); 78 rx_info = &(priv->_agn.statistics_bt.rx.general.common);
78 else 79 else
79 rx_info = &(priv->_agn.statistics.rx.general); 80 rx_info = &(priv->_agn.statistics.rx.general);
@@ -124,7 +125,8 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv,
124 struct statistics_general_common *general, *accum_general; 125 struct statistics_general_common *general, *accum_general;
125 struct statistics_tx *tx, *accum_tx; 126 struct statistics_tx *tx, *accum_tx;
126 127
127 if (priv->cfg->bt_statistics) { 128 if (priv->cfg->bt_params &&
129 priv->cfg->bt_params->bt_statistics) {
128 prev_stats = (__le32 *)&priv->_agn.statistics_bt; 130 prev_stats = (__le32 *)&priv->_agn.statistics_bt;
129 accum_stats = (u32 *)&priv->_agn.accum_statistics_bt; 131 accum_stats = (u32 *)&priv->_agn.accum_statistics_bt;
130 size = sizeof(struct iwl_bt_notif_statistics); 132 size = sizeof(struct iwl_bt_notif_statistics);
@@ -183,7 +185,7 @@ bool iwl_good_plcp_health(struct iwl_priv *priv,
183 unsigned int plcp_msec; 185 unsigned int plcp_msec;
184 unsigned long plcp_received_jiffies; 186 unsigned long plcp_received_jiffies;
185 187
186 if (priv->cfg->plcp_delta_threshold == 188 if (priv->cfg->base_params->plcp_delta_threshold ==
187 IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE) { 189 IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE) {
188 IWL_DEBUG_RADIO(priv, "plcp_err check disabled\n"); 190 IWL_DEBUG_RADIO(priv, "plcp_err check disabled\n");
189 return rc; 191 return rc;
@@ -205,7 +207,8 @@ bool iwl_good_plcp_health(struct iwl_priv *priv,
205 struct statistics_rx_phy *ofdm; 207 struct statistics_rx_phy *ofdm;
206 struct statistics_rx_ht_phy *ofdm_ht; 208 struct statistics_rx_ht_phy *ofdm_ht;
207 209
208 if (priv->cfg->bt_statistics) { 210 if (priv->cfg->bt_params &&
211 priv->cfg->bt_params->bt_statistics) {
209 ofdm = &pkt->u.stats_bt.rx.ofdm; 212 ofdm = &pkt->u.stats_bt.rx.ofdm;
210 ofdm_ht = &pkt->u.stats_bt.rx.ofdm_ht; 213 ofdm_ht = &pkt->u.stats_bt.rx.ofdm_ht;
211 combined_plcp_delta = 214 combined_plcp_delta =
@@ -229,7 +232,7 @@ bool iwl_good_plcp_health(struct iwl_priv *priv,
229 232
230 if ((combined_plcp_delta > 0) && 233 if ((combined_plcp_delta > 0) &&
231 ((combined_plcp_delta * 100) / plcp_msec) > 234 ((combined_plcp_delta * 100) / plcp_msec) >
232 priv->cfg->plcp_delta_threshold) { 235 priv->cfg->base_params->plcp_delta_threshold) {
233 /* 236 /*
234 * if plcp_err exceed the threshold, 237 * if plcp_err exceed the threshold,
235 * the following data is printed in csv format: 238 * the following data is printed in csv format:
@@ -242,13 +245,13 @@ bool iwl_good_plcp_health(struct iwl_priv *priv,
242 * plcp_msec 245 * plcp_msec
243 */ 246 */
244 IWL_DEBUG_RADIO(priv, "plcp_err exceeded %u, " 247 IWL_DEBUG_RADIO(priv, "plcp_err exceeded %u, "
245 "%u, %u, %u, %u, %d, %u mSecs\n", 248 "%u, %u, %u, %u, %d, %u mSecs\n",
246 priv->cfg->plcp_delta_threshold, 249 priv->cfg->base_params->plcp_delta_threshold,
247 le32_to_cpu(ofdm->plcp_err), 250 le32_to_cpu(ofdm->plcp_err),
248 le32_to_cpu(ofdm->plcp_err), 251 le32_to_cpu(ofdm->plcp_err),
249 le32_to_cpu(ofdm_ht->plcp_err), 252 le32_to_cpu(ofdm_ht->plcp_err),
250 le32_to_cpu(ofdm_ht->plcp_err), 253 le32_to_cpu(ofdm_ht->plcp_err),
251 combined_plcp_delta, plcp_msec); 254 combined_plcp_delta, plcp_msec);
252 255
253 rc = false; 256 rc = false;
254 } 257 }
@@ -262,7 +265,8 @@ void iwl_rx_statistics(struct iwl_priv *priv,
262 int change; 265 int change;
263 struct iwl_rx_packet *pkt = rxb_addr(rxb); 266 struct iwl_rx_packet *pkt = rxb_addr(rxb);
264 267
265 if (priv->cfg->bt_statistics) { 268 if (priv->cfg->bt_params &&
269 priv->cfg->bt_params->bt_statistics) {
266 IWL_DEBUG_RX(priv, 270 IWL_DEBUG_RX(priv,
267 "Statistics notification received (%d vs %d).\n", 271 "Statistics notification received (%d vs %d).\n",
268 (int)sizeof(struct iwl_bt_notif_statistics), 272 (int)sizeof(struct iwl_bt_notif_statistics),
@@ -300,7 +304,8 @@ void iwl_rx_statistics(struct iwl_priv *priv,
300 304
301 iwl_recover_from_statistics(priv, pkt); 305 iwl_recover_from_statistics(priv, pkt);
302 306
303 if (priv->cfg->bt_statistics) 307 if (priv->cfg->bt_params &&
308 priv->cfg->bt_params->bt_statistics)
304 memcpy(&priv->_agn.statistics_bt, &pkt->u.stats_bt, 309 memcpy(&priv->_agn.statistics_bt, &pkt->u.stats_bt,
305 sizeof(priv->_agn.statistics_bt)); 310 sizeof(priv->_agn.statistics_bt));
306 else 311 else