Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9636e583 authored by Ron Rindjunsky's avatar Ron Rindjunsky Committed by John W. Linville
Browse files

iwlwifi: iwl5000 WiFi/WiMax coexistence



This patch adds WiFi/WiMax coexistence to iwl5000.

Signed-off-by: default avatarRon Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 99da1b48
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -494,6 +494,16 @@ static void iwl5000_tx_queue_set_status(struct iwl_priv *priv,
		       scd_retry ? "BA" : "AC", txq_id, tx_fifo_id);
		       scd_retry ? "BA" : "AC", txq_id, tx_fifo_id);
}
}


static int iwl5000_send_wimax_coex(struct iwl_priv *priv)
{
	struct iwl_wimax_coex_cmd coex_cmd;

	memset(&coex_cmd, 0, sizeof(coex_cmd));

	return iwl_send_cmd_pdu(priv, COEX_PRIORITY_TABLE_CMD,
				sizeof(coex_cmd), &coex_cmd);
}

static int iwl5000_alive_notify(struct iwl_priv *priv)
static int iwl5000_alive_notify(struct iwl_priv *priv)
{
{
	u32 a;
	u32 a;
@@ -568,6 +578,8 @@ static int iwl5000_alive_notify(struct iwl_priv *priv)
	iwl_release_nic_access(priv);
	iwl_release_nic_access(priv);
	spin_unlock_irqrestore(&priv->lock, flags);
	spin_unlock_irqrestore(&priv->lock, flags);


	iwl5000_send_wimax_coex(priv);

	/* Ask for statistics now, the uCode will send notification
	/* Ask for statistics now, the uCode will send notification
	 * periodically after association */
	 * periodically after association */
	iwl_send_statistics_request(priv, CMD_ASYNC);
	iwl_send_statistics_request(priv, CMD_ASYNC);
+54 −0
Original line number Original line Diff line number Diff line
@@ -93,6 +93,11 @@ enum {
	REPLY_LEDS_CMD = 0x48,
	REPLY_LEDS_CMD = 0x48,
	REPLY_TX_LINK_QUALITY_CMD = 0x4e, /* 4965 only */
	REPLY_TX_LINK_QUALITY_CMD = 0x4e, /* 4965 only */


	/* WiMAX coexistence */
	COEX_PRIORITY_TABLE_CMD = 0x5a,	/*5000 only */
	COEX_MEDIUM_NOTIFICATION = 0x5b,
	COEX_EVENT_CMD = 0x5c,

	/* 802.11h related */
	/* 802.11h related */
	RADAR_NOTIFICATION = 0x70,	/* not used */
	RADAR_NOTIFICATION = 0x70,	/* not used */
	REPLY_QUIET_CMD = 0x71,		/* not used */
	REPLY_QUIET_CMD = 0x71,		/* not used */
@@ -2797,6 +2802,55 @@ struct iwl4965_led_cmd {
	u8 reserved;
	u8 reserved;
} __attribute__ ((packed));
} __attribute__ ((packed));


/*
 * Coexistence WIFI/WIMAX  Command
 * COEX_PRIORITY_TABLE_CMD = 0x5a
 *
 */
enum {
	COEX_UNASSOC_IDLE		= 0,
	COEX_UNASSOC_MANUAL_SCAN	= 1,
	COEX_UNASSOC_AUTO_SCAN		= 2,
	COEX_CALIBRATION		= 3,
	COEX_PERIODIC_CALIBRATION	= 4,
	COEX_CONNECTION_ESTAB		= 5,
	COEX_ASSOCIATED_IDLE		= 6,
	COEX_ASSOC_MANUAL_SCAN		= 7,
	COEX_ASSOC_AUTO_SCAN		= 8,
	COEX_ASSOC_ACTIVE_LEVEL		= 9,
	COEX_RF_ON			= 10,
	COEX_RF_OFF			= 11,
	COEX_STAND_ALONE_DEBUG		= 12,
	COEX_IPAN_ASSOC_LEVEL		= 13,
	COEX_RSRVD1			= 14,
	COEX_RSRVD2			= 15,
	COEX_NUM_OF_EVENTS		= 16
};

struct iwl_wimax_coex_event_entry {
	u8 request_prio;
	u8 win_medium_prio;
	u8 reserved;
	u8 flags;
} __attribute__ ((packed));

/* COEX flag masks */

/* Staion table is valid */
#define COEX_FLAGS_STA_TABLE_VALID_MSK      (0x1)
/* UnMask wakeup src at unassociated sleep */
#define COEX_FLAGS_UNASSOC_WA_UNMASK_MSK    (0x4)
/* UnMask wakeup src at associated sleep */
#define COEX_FLAGS_ASSOC_WA_UNMASK_MSK      (0x8)
/* Enable CoEx feature. */
#define COEX_FLAGS_COEX_ENABLE_MSK          (0x80)

struct iwl_wimax_coex_cmd {
	u8 flags;
	u8 reserved[3];
	struct iwl_wimax_coex_event_entry sta_prio[COEX_NUM_OF_EVENTS];
} __attribute__ ((packed));

/******************************************************************************
/******************************************************************************
 * (13)
 * (13)
 * Union of all expected notifications/responses:
 * Union of all expected notifications/responses: