diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/acx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/acx.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c index 679bb37f0ca4..0b9cacc74903 100644 --- a/drivers/net/wireless/wl12xx/acx.c +++ b/drivers/net/wireless/wl12xx/acx.c | |||
@@ -1342,6 +1342,57 @@ out: | |||
1342 | return ret; | 1342 | return ret; |
1343 | } | 1343 | } |
1344 | 1344 | ||
1345 | /* Configure BA session initiator/receiver parameters setting in the FW. */ | ||
1346 | int wl1271_acx_set_ba_session(struct wl1271 *wl, | ||
1347 | enum ieee80211_back_parties direction, | ||
1348 | u8 tid_index, u8 policy) | ||
1349 | { | ||
1350 | struct wl1271_acx_ba_session_policy *acx; | ||
1351 | int ret; | ||
1352 | |||
1353 | wl1271_debug(DEBUG_ACX, "acx ba session setting"); | ||
1354 | |||
1355 | acx = kzalloc(sizeof(*acx), GFP_KERNEL); | ||
1356 | if (!acx) { | ||
1357 | ret = -ENOMEM; | ||
1358 | goto out; | ||
1359 | } | ||
1360 | |||
1361 | /* ANY role */ | ||
1362 | acx->role_id = 0xff; | ||
1363 | acx->tid = tid_index; | ||
1364 | acx->enable = policy; | ||
1365 | acx->ba_direction = direction; | ||
1366 | |||
1367 | switch (direction) { | ||
1368 | case WLAN_BACK_INITIATOR: | ||
1369 | acx->win_size = wl->conf.ht.tx_ba_win_size; | ||
1370 | acx->inactivity_timeout = wl->conf.ht.inactivity_timeout; | ||
1371 | break; | ||
1372 | case WLAN_BACK_RECIPIENT: | ||
1373 | acx->win_size = RX_BA_WIN_SIZE; | ||
1374 | acx->inactivity_timeout = 0; | ||
1375 | break; | ||
1376 | default: | ||
1377 | wl1271_error("Incorrect acx command id=%x\n", direction); | ||
1378 | ret = -EINVAL; | ||
1379 | goto out; | ||
1380 | } | ||
1381 | |||
1382 | ret = wl1271_cmd_configure(wl, | ||
1383 | ACX_BA_SESSION_POLICY_CFG, | ||
1384 | acx, | ||
1385 | sizeof(*acx)); | ||
1386 | if (ret < 0) { | ||
1387 | wl1271_warning("acx ba session setting failed: %d", ret); | ||
1388 | goto out; | ||
1389 | } | ||
1390 | |||
1391 | out: | ||
1392 | kfree(acx); | ||
1393 | return ret; | ||
1394 | } | ||
1395 | |||
1345 | int wl1271_acx_tsf_info(struct wl1271 *wl, u64 *mactime) | 1396 | int wl1271_acx_tsf_info(struct wl1271 *wl, u64 *mactime) |
1346 | { | 1397 | { |
1347 | struct wl1271_acx_fw_tsf_information *tsf_info; | 1398 | struct wl1271_acx_fw_tsf_information *tsf_info; |