qcacld-3.0: Refactor HDD LPASS "connect" logic
Previously "qcacld-3.0: Refactor WLAN_FEATURE_LPSS" refactored some of the HDD LPASS logic. Continue that process by refactoring the "connect" logic such that the actual implementation is in the lpass feature file. Change-Id: Iac7bb28cbf6c1b361cf95f1eccba507cca0d5ad3 CRs-Fixed: 1070700
This commit is contained in:
@@ -160,9 +160,9 @@ static int wlan_hdd_gen_wlan_version_pack(struct wlan_version_data *data,
|
|||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
*/
|
*/
|
||||||
void wlan_hdd_send_status_pkg(hdd_adapter_t *adapter,
|
static void wlan_hdd_send_status_pkg(struct hdd_adapter_s *adapter,
|
||||||
hdd_station_ctx_t *sta_ctx,
|
struct hdd_station_ctx *sta_ctx,
|
||||||
uint8_t is_on, uint8_t is_connected)
|
uint8_t is_on, uint8_t is_connected)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct wlan_status_data data;
|
struct wlan_status_data data;
|
||||||
@@ -261,6 +261,32 @@ static void wlan_hdd_send_all_scan_intf_info(struct hdd_context_s *hdd_ctx)
|
|||||||
wlan_hdd_send_status_pkg(adapter, NULL, 1, 0);
|
wlan_hdd_send_status_pkg(adapter, NULL, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hdd_lpass_notify_connect() - Notify LPASS of interface connect
|
||||||
|
* @adapter: The adapter that connected
|
||||||
|
*
|
||||||
|
* This function is used to notify the LPASS feature that an adapter
|
||||||
|
* has connected.
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void hdd_lpass_notify_connect(struct hdd_adapter_s *adapter)
|
||||||
|
{
|
||||||
|
struct hdd_station_ctx *sta_ctx;
|
||||||
|
|
||||||
|
/* only send once per connection */
|
||||||
|
if (adapter->rssi_send)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* don't send if driver is unloading */
|
||||||
|
if (cds_is_driver_unloading())
|
||||||
|
return;
|
||||||
|
|
||||||
|
adapter->rssi_send = true;
|
||||||
|
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
||||||
|
wlan_hdd_send_status_pkg(adapter, sta_ctx, 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hdd_lpass_notify_disconnect() - Notify LPASS of interface disconnect
|
* hdd_lpass_notify_disconnect() - Notify LPASS of interface disconnect
|
||||||
* @adapter: The adapter that connected
|
* @adapter: The adapter that connected
|
||||||
|
@@ -32,9 +32,16 @@ struct hdd_context_s;
|
|||||||
struct hdd_adapter_s;
|
struct hdd_adapter_s;
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_LPSS
|
#ifdef WLAN_FEATURE_LPSS
|
||||||
void wlan_hdd_send_status_pkg(hdd_adapter_t *adapter,
|
/**
|
||||||
hdd_station_ctx_t *sta_ctx,
|
* hdd_lpass_notify_connect() - Notify LPASS of interface connect
|
||||||
uint8_t is_on, uint8_t is_connected);
|
* @adapter: The adapter that connected
|
||||||
|
*
|
||||||
|
* This function is used to notify the LPASS feature that an adapter
|
||||||
|
* has connected.
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void hdd_lpass_notify_connect(struct hdd_adapter_s *adapter);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hdd_lpass_notify_disconnect() - Notify LPASS of interface disconnect
|
* hdd_lpass_notify_disconnect() - Notify LPASS of interface disconnect
|
||||||
@@ -80,13 +87,9 @@ void hdd_lpass_notify_start(struct hdd_context_s *hdd_ctx);
|
|||||||
*/
|
*/
|
||||||
void hdd_lpass_notify_stop(struct hdd_context_s *hdd_ctx);
|
void hdd_lpass_notify_stop(struct hdd_context_s *hdd_ctx);
|
||||||
#else
|
#else
|
||||||
static inline void wlan_hdd_send_status_pkg(hdd_adapter_t *adapter,
|
static inline void hdd_lpass_notify_connect(struct hdd_adapter_s *adapter)
|
||||||
hdd_station_ctx_t *sta_ctx,
|
|
||||||
uint8_t is_on, uint8_t is_connected)
|
|
||||||
{
|
{
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void hdd_lpass_notify_disconnect(struct hdd_adapter_s *adapter)
|
static inline void hdd_lpass_notify_disconnect(struct hdd_adapter_s *adapter)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@@ -1700,13 +1700,13 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
|
|||||||
sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
|
sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_LPSS
|
/*
|
||||||
if (!pAdapter->rssi_send) {
|
* we notify connect to lpass here instead of during actual
|
||||||
pAdapter->rssi_send = true;
|
* connect processing because rssi info is not accurate during
|
||||||
if (cds_is_driver_unloading())
|
* actual connection. lpass will ensure the notification is
|
||||||
wlan_hdd_send_status_pkg(pAdapter, pHddStaCtx, 1, 1);
|
* only processed once per association.
|
||||||
}
|
*/
|
||||||
#endif
|
hdd_lpass_notify_connect(pAdapter);
|
||||||
|
|
||||||
wlan_hdd_get_station_stats(pAdapter);
|
wlan_hdd_get_station_stats(pAdapter);
|
||||||
rate_flags = pAdapter->hdd_stats.ClassA_stat.tx_rate_flags;
|
rate_flags = pAdapter->hdd_stats.ClassA_stat.tx_rate_flags;
|
||||||
|
Reference in New Issue
Block a user