diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2008-05-15 01:54:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-21 21:48:05 -0400 |
commit | 9636e583d2c641f8cb32d0681f5052b2885edd79 (patch) | |
tree | 07b9eabffc5ddfa2a1882413504daafef0fc2c84 /drivers/net | |
parent | 99da1b48fc77484aa8da85a45d9c3c1e00243659 (diff) |
iwlwifi: iwl5000 WiFi/WiMax coexistence
This patch adds WiFi/WiMax coexistence to iwl5000.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-commands.h | 54 |
2 files changed, 66 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 5e818eedb0ec..520c7eaf1b0d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -494,6 +494,16 @@ static void iwl5000_tx_queue_set_status(struct iwl_priv *priv, | |||
494 | scd_retry ? "BA" : "AC", txq_id, tx_fifo_id); | 494 | scd_retry ? "BA" : "AC", txq_id, tx_fifo_id); |
495 | } | 495 | } |
496 | 496 | ||
497 | static int iwl5000_send_wimax_coex(struct iwl_priv *priv) | ||
498 | { | ||
499 | struct iwl_wimax_coex_cmd coex_cmd; | ||
500 | |||
501 | memset(&coex_cmd, 0, sizeof(coex_cmd)); | ||
502 | |||
503 | return iwl_send_cmd_pdu(priv, COEX_PRIORITY_TABLE_CMD, | ||
504 | sizeof(coex_cmd), &coex_cmd); | ||
505 | } | ||
506 | |||
497 | static int iwl5000_alive_notify(struct iwl_priv *priv) | 507 | static int iwl5000_alive_notify(struct iwl_priv *priv) |
498 | { | 508 | { |
499 | u32 a; | 509 | u32 a; |
@@ -568,6 +578,8 @@ static int iwl5000_alive_notify(struct iwl_priv *priv) | |||
568 | iwl_release_nic_access(priv); | 578 | iwl_release_nic_access(priv); |
569 | spin_unlock_irqrestore(&priv->lock, flags); | 579 | spin_unlock_irqrestore(&priv->lock, flags); |
570 | 580 | ||
581 | iwl5000_send_wimax_coex(priv); | ||
582 | |||
571 | /* Ask for statistics now, the uCode will send notification | 583 | /* Ask for statistics now, the uCode will send notification |
572 | * periodically after association */ | 584 | * periodically after association */ |
573 | iwl_send_statistics_request(priv, CMD_ASYNC); | 585 | iwl_send_statistics_request(priv, CMD_ASYNC); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index dd84326c97d2..5b9e9bf0ac8f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
@@ -93,6 +93,11 @@ enum { | |||
93 | REPLY_LEDS_CMD = 0x48, | 93 | REPLY_LEDS_CMD = 0x48, |
94 | REPLY_TX_LINK_QUALITY_CMD = 0x4e, /* 4965 only */ | 94 | REPLY_TX_LINK_QUALITY_CMD = 0x4e, /* 4965 only */ |
95 | 95 | ||
96 | /* WiMAX coexistence */ | ||
97 | COEX_PRIORITY_TABLE_CMD = 0x5a, /*5000 only */ | ||
98 | COEX_MEDIUM_NOTIFICATION = 0x5b, | ||
99 | COEX_EVENT_CMD = 0x5c, | ||
100 | |||
96 | /* 802.11h related */ | 101 | /* 802.11h related */ |
97 | RADAR_NOTIFICATION = 0x70, /* not used */ | 102 | RADAR_NOTIFICATION = 0x70, /* not used */ |
98 | REPLY_QUIET_CMD = 0x71, /* not used */ | 103 | REPLY_QUIET_CMD = 0x71, /* not used */ |
@@ -2797,6 +2802,55 @@ struct iwl4965_led_cmd { | |||
2797 | u8 reserved; | 2802 | u8 reserved; |
2798 | } __attribute__ ((packed)); | 2803 | } __attribute__ ((packed)); |
2799 | 2804 | ||
2805 | /* | ||
2806 | * Coexistence WIFI/WIMAX Command | ||
2807 | * COEX_PRIORITY_TABLE_CMD = 0x5a | ||
2808 | * | ||
2809 | */ | ||
2810 | enum { | ||
2811 | COEX_UNASSOC_IDLE = 0, | ||
2812 | COEX_UNASSOC_MANUAL_SCAN = 1, | ||
2813 | COEX_UNASSOC_AUTO_SCAN = 2, | ||
2814 | COEX_CALIBRATION = 3, | ||
2815 | COEX_PERIODIC_CALIBRATION = 4, | ||
2816 | COEX_CONNECTION_ESTAB = 5, | ||
2817 | COEX_ASSOCIATED_IDLE = 6, | ||
2818 | COEX_ASSOC_MANUAL_SCAN = 7, | ||
2819 | COEX_ASSOC_AUTO_SCAN = 8, | ||
2820 | COEX_ASSOC_ACTIVE_LEVEL = 9, | ||
2821 | COEX_RF_ON = 10, | ||
2822 | COEX_RF_OFF = 11, | ||
2823 | COEX_STAND_ALONE_DEBUG = 12, | ||
2824 | COEX_IPAN_ASSOC_LEVEL = 13, | ||
2825 | COEX_RSRVD1 = 14, | ||
2826 | COEX_RSRVD2 = 15, | ||
2827 | COEX_NUM_OF_EVENTS = 16 | ||
2828 | }; | ||
2829 | |||
2830 | struct iwl_wimax_coex_event_entry { | ||
2831 | u8 request_prio; | ||
2832 | u8 win_medium_prio; | ||
2833 | u8 reserved; | ||
2834 | u8 flags; | ||
2835 | } __attribute__ ((packed)); | ||
2836 | |||
2837 | /* COEX flag masks */ | ||
2838 | |||
2839 | /* Staion table is valid */ | ||
2840 | #define COEX_FLAGS_STA_TABLE_VALID_MSK (0x1) | ||
2841 | /* UnMask wakeup src at unassociated sleep */ | ||
2842 | #define COEX_FLAGS_UNASSOC_WA_UNMASK_MSK (0x4) | ||
2843 | /* UnMask wakeup src at associated sleep */ | ||
2844 | #define COEX_FLAGS_ASSOC_WA_UNMASK_MSK (0x8) | ||
2845 | /* Enable CoEx feature. */ | ||
2846 | #define COEX_FLAGS_COEX_ENABLE_MSK (0x80) | ||
2847 | |||
2848 | struct iwl_wimax_coex_cmd { | ||
2849 | u8 flags; | ||
2850 | u8 reserved[3]; | ||
2851 | struct iwl_wimax_coex_event_entry sta_prio[COEX_NUM_OF_EVENTS]; | ||
2852 | } __attribute__ ((packed)); | ||
2853 | |||
2800 | /****************************************************************************** | 2854 | /****************************************************************************** |
2801 | * (13) | 2855 | * (13) |
2802 | * Union of all expected notifications/responses: | 2856 | * Union of all expected notifications/responses: |