mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacld-3.0: Stop bus_bw timer as part of stop_adapter for NDI
bus_bw timer start happens when first NDP is connected and stop happens when last peer is departed indication is received from firmware. But as part of driver unload, driver issues stop_bss and firmware doesn't send any NDP END indication after receiving this. So the timer started as part of first NDP confirm is not stopped. Try to stop the timer after processing the sme_disconnect which is issued as part of stop_adapter for NDI mode. Also, in STA+NDI concurrency scenario, bus bandwidth timer is stopped on STA disconnection since hdd_any_adapter_is_assoc checks only for other active STA or SAP. Add an NDI active check so that timer is not stopped when NDPs are present on an NDI. Change-Id: Ibec447846fefad153261830c34bf2fa914636c7a CRs-Fixed: 2625586
This commit is contained in:
parent
ff3fcbfa29
commit
ef993fd575
3 changed files with 40 additions and 9 deletions
|
|
@ -6269,6 +6269,8 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx,
|
|||
(SME_DISCONNECT_TIMEOUT));
|
||||
if (!rc)
|
||||
hdd_warn("disconn_comp_var wait fail");
|
||||
if (adapter->device_mode == QDF_NDI_MODE)
|
||||
hdd_cleanup_ndi(hdd_ctx, adapter);
|
||||
}
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
hdd_warn("failed to post disconnect");
|
||||
|
|
@ -13845,6 +13847,11 @@ static bool hdd_any_adapter_is_assoc(struct hdd_context *hdd_ctx)
|
|||
WLAN_HDD_GET_AP_CTX_PTR(adapter)->ap_active) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (adapter->device_mode == QDF_NDI_MODE &&
|
||||
WLAN_HDD_GET_STATION_CTX_PTR(adapter)->
|
||||
conn_info.conn_state == eConnectionState_NdiConnected)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -888,6 +888,25 @@ int hdd_ndp_new_peer_handler(uint8_t vdev_id, uint16_t sta_id,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void hdd_cleanup_ndi(struct hdd_context *hdd_ctx,
|
||||
struct hdd_adapter *adapter)
|
||||
{
|
||||
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
||||
|
||||
if (sta_ctx->conn_info.conn_state != eConnectionState_NdiConnected) {
|
||||
hdd_debug("NDI has no NDPs");
|
||||
return;
|
||||
}
|
||||
sta_ctx->conn_info.conn_state = eConnectionState_NdiDisconnected;
|
||||
hdd_conn_set_connection_state(adapter,
|
||||
eConnectionState_NdiDisconnected);
|
||||
hdd_info("Stop netif tx queues.");
|
||||
wlan_hdd_netif_queue_control(adapter, WLAN_STOP_ALL_NETIF_QUEUE,
|
||||
WLAN_CONTROL_PATH);
|
||||
hdd_bus_bw_compute_reset_prev_txrx_stats(adapter);
|
||||
hdd_bus_bw_compute_timer_try_stop(hdd_ctx);
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_ndp_peer_departed_handler() - Handle NDP peer departed indication
|
||||
* @adapter: pointer to adapter context
|
||||
|
|
@ -927,14 +946,7 @@ void hdd_ndp_peer_departed_handler(uint8_t vdev_id, uint16_t sta_id,
|
|||
|
||||
if (last_peer) {
|
||||
hdd_info("No more ndp peers.");
|
||||
sta_ctx->conn_info.conn_state = eConnectionState_NdiDisconnected;
|
||||
hdd_conn_set_connection_state(adapter,
|
||||
eConnectionState_NdiDisconnected);
|
||||
hdd_info("Stop netif tx queues.");
|
||||
wlan_hdd_netif_queue_control(adapter, WLAN_STOP_ALL_NETIF_QUEUE,
|
||||
WLAN_CONTROL_PATH);
|
||||
hdd_bus_bw_compute_reset_prev_txrx_stats(adapter);
|
||||
hdd_bus_bw_compute_timer_try_stop(hdd_ctx);
|
||||
hdd_cleanup_ndi(hdd_ctx, adapter);
|
||||
}
|
||||
|
||||
hdd_exit();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -99,5 +99,17 @@ int hdd_ndp_new_peer_handler(uint8_t vdev_id, uint16_t sta_id,
|
|||
struct qdf_mac_addr *peer_mac_addr, bool fist_peer);
|
||||
void hdd_ndp_peer_departed_handler(uint8_t vdev_id, uint16_t sta_id,
|
||||
struct qdf_mac_addr *peer_mac_addr, bool last_peer);
|
||||
/**
|
||||
* hdd_cleanup_ndi(): Cleanup NDI state/resources
|
||||
* @hdd_ctx: HDD context
|
||||
* @adapter: Pointer to the NDI adapter
|
||||
*
|
||||
* Cleanup NDI state/resources allocated when NDPs are created on that NDI.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
|
||||
void hdd_cleanup_ndi(struct hdd_context *hdd_ctx,
|
||||
struct hdd_adapter *adapter);
|
||||
|
||||
#endif /* __WLAN_HDD_NAN_DATAPATH_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue