qcacld-3.0: Add support for the NAN Enable/Disable commands

Add changes in the NAN component and Target IF to support the
NAN Enable and Disable commands. Add changes to support all
the other generic NAN commands as well. Add a state machine
to keep track of the status of the NAN Discovery in the Target.

Add support for the NAN Enable/Disable commands

Change-Id: I20c303cad8b7a30deba50345032b33b1deba4802
CRs-Fixed: 2338054
This commit is contained in:
Nachiket Kukade
2018-11-02 21:09:00 +05:30
committed by nshrivas
parent 85aa3788b6
commit d5a7683c8a
7 changed files with 486 additions and 30 deletions

View File

@@ -2216,7 +2216,7 @@ static int os_if_nan_generic_req(struct wlan_objmgr_psoc *psoc,
status = ucfg_nan_discovery_req(nan_req, NAN_GENERIC_REQ);
if (QDF_IS_STATUS_SUCCESS(status))
cfg80211_err("Successfully sent a NAN request");
cfg80211_debug("Successfully sent a NAN request");
else
cfg80211_err("Unable to send a NAN request");
@@ -2248,9 +2248,9 @@ static int os_if_process_nan_disable_req(struct wlan_objmgr_psoc *psoc,
status = ucfg_nan_discovery_req(nan_req, NAN_DISABLE_REQ);
if (QDF_IS_STATUS_SUCCESS(status))
cfg80211_err("Successfully sent NAN Disable request");
cfg80211_debug("Successfully sent NAN Disable request");
else
cfg80211_err("Unable to disable NAN Discovery");
cfg80211_err("Unable to send NAN Disable request");
qdf_mem_free(nan_req);
return qdf_status_to_os_return(status);
@@ -2290,7 +2290,8 @@ static int os_if_process_nan_enable_req(struct wlan_objmgr_psoc *psoc,
return -ENOMEM;
}
nan_req->social_chan_2g = wlan_freq_to_chan(chan_freq_2g);
nan_req->social_chan_5g = wlan_freq_to_chan(chan_freq_5g);
if (chan_freq_5g)
nan_req->social_chan_5g = wlan_freq_to_chan(chan_freq_5g);
nan_req->psoc = psoc;
nan_req->params.request_data_len = buf_len;
@@ -2301,9 +2302,9 @@ static int os_if_process_nan_enable_req(struct wlan_objmgr_psoc *psoc,
status = ucfg_nan_discovery_req(nan_req, NAN_ENABLE_REQ);
if (QDF_IS_STATUS_SUCCESS(status))
cfg80211_err("Successfully sent NAN Enable");
cfg80211_debug("Successfully sent NAN Enable request");
else
cfg80211_err("Unable to enable NAN Discovery");
cfg80211_err("Unable to send NAN Enable request");
qdf_mem_free(nan_req);
return qdf_status_to_os_return(status);