aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-04-27 17:10:00 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-05-10 18:08:49 -0400
commitf401241310f4260505b1c462807c83aac5e5bbc8 (patch)
tree2969392aa39aaa4de0d31c7226e2930f0809d08a /drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
parent0af0d04b8db7712498558541cbedeeebdbabf70f (diff)
iwlwifi: wimax co-exist code clean up
wifi/wimax co-exist command is part of _agn device configuration sequence; move it to iwl-agn-ucode.c which is more appropriate place for the function. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-ucode.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-ucode.c60
1 files changed, 59 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
index ae476c234a7c..c3e3283426a9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
@@ -52,6 +52,37 @@ static const s8 iwlagn_default_queue_to_tx_fifo[] = {
52 IWL_TX_FIFO_UNUSED, 52 IWL_TX_FIFO_UNUSED,
53}; 53};
54 54
55static struct iwl_wimax_coex_event_entry cu_priorities[COEX_NUM_OF_EVENTS] = {
56 {COEX_CU_UNASSOC_IDLE_RP, COEX_CU_UNASSOC_IDLE_WP,
57 0, COEX_UNASSOC_IDLE_FLAGS},
58 {COEX_CU_UNASSOC_MANUAL_SCAN_RP, COEX_CU_UNASSOC_MANUAL_SCAN_WP,
59 0, COEX_UNASSOC_MANUAL_SCAN_FLAGS},
60 {COEX_CU_UNASSOC_AUTO_SCAN_RP, COEX_CU_UNASSOC_AUTO_SCAN_WP,
61 0, COEX_UNASSOC_AUTO_SCAN_FLAGS},
62 {COEX_CU_CALIBRATION_RP, COEX_CU_CALIBRATION_WP,
63 0, COEX_CALIBRATION_FLAGS},
64 {COEX_CU_PERIODIC_CALIBRATION_RP, COEX_CU_PERIODIC_CALIBRATION_WP,
65 0, COEX_PERIODIC_CALIBRATION_FLAGS},
66 {COEX_CU_CONNECTION_ESTAB_RP, COEX_CU_CONNECTION_ESTAB_WP,
67 0, COEX_CONNECTION_ESTAB_FLAGS},
68 {COEX_CU_ASSOCIATED_IDLE_RP, COEX_CU_ASSOCIATED_IDLE_WP,
69 0, COEX_ASSOCIATED_IDLE_FLAGS},
70 {COEX_CU_ASSOC_MANUAL_SCAN_RP, COEX_CU_ASSOC_MANUAL_SCAN_WP,
71 0, COEX_ASSOC_MANUAL_SCAN_FLAGS},
72 {COEX_CU_ASSOC_AUTO_SCAN_RP, COEX_CU_ASSOC_AUTO_SCAN_WP,
73 0, COEX_ASSOC_AUTO_SCAN_FLAGS},
74 {COEX_CU_ASSOC_ACTIVE_LEVEL_RP, COEX_CU_ASSOC_ACTIVE_LEVEL_WP,
75 0, COEX_ASSOC_ACTIVE_LEVEL_FLAGS},
76 {COEX_CU_RF_ON_RP, COEX_CU_RF_ON_WP, 0, COEX_CU_RF_ON_FLAGS},
77 {COEX_CU_RF_OFF_RP, COEX_CU_RF_OFF_WP, 0, COEX_RF_OFF_FLAGS},
78 {COEX_CU_STAND_ALONE_DEBUG_RP, COEX_CU_STAND_ALONE_DEBUG_WP,
79 0, COEX_STAND_ALONE_DEBUG_FLAGS},
80 {COEX_CU_IPAN_ASSOC_LEVEL_RP, COEX_CU_IPAN_ASSOC_LEVEL_WP,
81 0, COEX_IPAN_ASSOC_LEVEL_FLAGS},
82 {COEX_CU_RSRVD1_RP, COEX_CU_RSRVD1_WP, 0, COEX_RSRVD1_FLAGS},
83 {COEX_CU_RSRVD2_RP, COEX_CU_RSRVD2_WP, 0, COEX_RSRVD2_FLAGS}
84};
85
55/* 86/*
56 * ucode 87 * ucode
57 */ 88 */
@@ -320,6 +351,33 @@ restart:
320 queue_work(priv->workqueue, &priv->restart); 351 queue_work(priv->workqueue, &priv->restart);
321} 352}
322 353
354static int iwlagn_send_wimax_coex(struct iwl_priv *priv)
355{
356 struct iwl_wimax_coex_cmd coex_cmd;
357
358 if (priv->cfg->support_wimax_coexist) {
359 /* UnMask wake up src at associated sleep */
360 coex_cmd.flags = COEX_FLAGS_ASSOC_WA_UNMASK_MSK;
361
362 /* UnMask wake up src at unassociated sleep */
363 coex_cmd.flags |= COEX_FLAGS_UNASSOC_WA_UNMASK_MSK;
364 memcpy(coex_cmd.sta_prio, cu_priorities,
365 sizeof(struct iwl_wimax_coex_event_entry) *
366 COEX_NUM_OF_EVENTS);
367
368 /* enabling the coexistence feature */
369 coex_cmd.flags |= COEX_FLAGS_COEX_ENABLE_MSK;
370
371 /* enabling the priorities tables */
372 coex_cmd.flags |= COEX_FLAGS_STA_TABLE_VALID_MSK;
373 } else {
374 /* coexistence is disabled */
375 memset(&coex_cmd, 0, sizeof(coex_cmd));
376 }
377 return iwl_send_cmd_pdu(priv, COEX_PRIORITY_TABLE_CMD,
378 sizeof(coex_cmd), &coex_cmd);
379}
380
323int iwlagn_alive_notify(struct iwl_priv *priv) 381int iwlagn_alive_notify(struct iwl_priv *priv)
324{ 382{
325 u32 a; 383 u32 a;
@@ -407,7 +465,7 @@ int iwlagn_alive_notify(struct iwl_priv *priv)
407 465
408 spin_unlock_irqrestore(&priv->lock, flags); 466 spin_unlock_irqrestore(&priv->lock, flags);
409 467
410 iwl_send_wimax_coex(priv); 468 iwlagn_send_wimax_coex(priv);
411 469
412 iwlagn_set_Xtal_calib(priv); 470 iwlagn_set_Xtal_calib(priv);
413 iwl_send_calib_results(priv); 471 iwl_send_calib_results(priv);