summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnson <jjohnson@codeaurora.org>2016-09-23 15:28:47 -0700
committerqcabuildsw <qcabuildsw@localhost>2016-10-03 16:48:42 -0700
commitcef59bbc3b5d2c3d379703bbc7f3a204e1c5b15b (patch)
tree314cee1b8defec1a446f5b077af7825870a66b3d
parent2ae6f714b0aaa9676d41074bffd6c08696a5dbb9 (diff)
qcacld-3.0: Refactor HDD LPASS "disconnect" logic
Previously "qcacld-3.0: Refactor WLAN_FEATURE_LPSS" refactored some of the HDD LPASS logic. Continue that process by refactoring the "disconnect" logic such that the actual implementation is in the lpass feature file. Change-Id: I7250582c8e0ba7423babfd6acfd23ff492d05037 CRs-Fixed: 1070700
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c5
-rw-r--r--core/hdd/src/wlan_hdd_lpass.c18
-rw-r--r--core/hdd/src/wlan_hdd_lpass.h14
3 files changed, 33 insertions, 4 deletions
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index 0c40894ec775..048cb47f333d 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -1392,10 +1392,7 @@ static void hdd_send_association_event(struct net_device *dev,
NULL,
pAdapter->device_mode);
}
-#ifdef WLAN_FEATURE_LPSS
- pAdapter->rssi_send = false;
- wlan_hdd_send_status_pkg(pAdapter, pHddStaCtx, 1, 0);
-#endif
+ hdd_lpass_notify_disconnect(pAdapter);
#ifdef FEATURE_WLAN_TDLS
hdd_info("Disassoc: Check and enable or disable TDLS state ");
if ((pAdapter->device_mode == QDF_STA_MODE ||
diff --git a/core/hdd/src/wlan_hdd_lpass.c b/core/hdd/src/wlan_hdd_lpass.c
index 4564430bb6c1..9ece01e39e11 100644
--- a/core/hdd/src/wlan_hdd_lpass.c
+++ b/core/hdd/src/wlan_hdd_lpass.c
@@ -262,6 +262,24 @@ static void wlan_hdd_send_all_scan_intf_info(struct hdd_context_s *hdd_ctx)
}
/**
+ * hdd_lpass_notify_disconnect() - Notify LPASS of interface disconnect
+ * @adapter: The adapter that connected
+ *
+ * This function is used to notify the LPASS feature that an adapter
+ * has disconnected.
+ *
+ * Return: none
+ */
+void hdd_lpass_notify_disconnect(struct hdd_adapter_s *adapter)
+{
+ struct hdd_station_ctx *sta_ctx;
+
+ adapter->rssi_send = false;
+ sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
+ wlan_hdd_send_status_pkg(adapter, sta_ctx, 1, 0);
+}
+
+/**
* hdd_lpass_notify_mode_change() - Notify LPASS of interface mode change
* @adapter: The adapter whose mode was changed
*
diff --git a/core/hdd/src/wlan_hdd_lpass.h b/core/hdd/src/wlan_hdd_lpass.h
index 098063529ef2..480544af45e5 100644
--- a/core/hdd/src/wlan_hdd_lpass.h
+++ b/core/hdd/src/wlan_hdd_lpass.h
@@ -37,6 +37,17 @@ void wlan_hdd_send_status_pkg(hdd_adapter_t *adapter,
uint8_t is_on, uint8_t is_connected);
/**
+ * hdd_lpass_notify_disconnect() - Notify LPASS of interface disconnect
+ * @adapter: The adapter that connected
+ *
+ * This function is used to notify the LPASS feature that an adapter
+ * has disconnected.
+ *
+ * Return: none
+ */
+void hdd_lpass_notify_disconnect(struct hdd_adapter_s *adapter);
+
+/**
* hdd_lpass_notify_mode_change() - Notify LPASS of interface mode change
* @adapter: The adapter whose mode was changed
*
@@ -76,6 +87,9 @@ static inline void wlan_hdd_send_status_pkg(hdd_adapter_t *adapter,
return;
}
+static inline void hdd_lpass_notify_disconnect(struct hdd_adapter_s *adapter)
+{
+}
static inline void hdd_lpass_notify_mode_change(struct hdd_adapter_s *adapter)
{
}