wil6210: multiple connect - initial support

Enable multiple (up to 8 - HW/FW limitation) simultaneous connections.
Each connection has its own CID (connection ID) that describes chip's
beam-forming entity. Tx Vring should refer to correct CID for frame to reach
its destination.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Vladimir Kondratiev
2014-02-27 16:20:43 +02:00
committed by John W. Linville
parent 59f7c0a957
commit 3df2cd3618
6 changed files with 148 additions and 15 deletions

View File

@@ -113,14 +113,20 @@ static void wil_connect_worker(struct work_struct *work)
rc = wil_vring_init_tx(wil, 0, WIL6210_TX_RING_SIZE, cid, 0);
wil->pending_connect_cid = -1;
if (rc == 0)
if (rc == 0) {
wil->sta[cid].status = wil_sta_connected;
wil_link_on(wil);
} else {
wil->sta[cid].status = wil_sta_unused;
}
}
int wil_priv_init(struct wil6210_priv *wil)
{
wil_dbg_misc(wil, "%s()\n", __func__);
memset(wil->sta, 0, sizeof(wil->sta));
mutex_init(&wil->mutex);
mutex_init(&wil->wmi_mutex);
@@ -370,3 +376,19 @@ int wil_down(struct wil6210_priv *wil)
return rc;
}
int wil_find_cid(struct wil6210_priv *wil, const u8 *mac)
{
int i;
int rc = -ENOENT;
for (i = 0; i < ARRAY_SIZE(wil->sta); i++) {
if ((wil->sta[i].status != wil_sta_unused) &&
(0 == memcmp(wil->sta[i].addr, mac, ETH_ALEN))) {
rc = i;
break;
}
}
return rc;
}