mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacld-3.0: Make ndp_ctx part of station context
qcacld-2.0 to qcacld-3.0 propagation Make ndp_ctx part of station context, that way NAN data is assumed to be another device role like P2P client and IBSS in the station mode. CRs-Fixed: 962367 Change-Id: I93e2c14c59d4cbdfaadcd31e73fe0e3681843ce3
This commit is contained in:
parent
616d9c51ae
commit
8360d4c9d4
4 changed files with 39 additions and 55 deletions
|
|
@ -670,6 +670,9 @@ struct hdd_station_ctx {
|
|||
uint8_t broadcast_ibss_staid;
|
||||
|
||||
struct hdd_mon_set_ch_info ch_info;
|
||||
#ifdef WLAN_FEATURE_NAN_DATAPATH
|
||||
struct nan_datapath_ctx ndp_ctx;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define BSS_STOP 0
|
||||
|
|
@ -957,9 +960,6 @@ struct hdd_adapter_s {
|
|||
union {
|
||||
hdd_station_ctx_t station;
|
||||
hdd_ap_ctx_t ap;
|
||||
#ifdef WLAN_FEATURE_NAN_DATAPATH
|
||||
struct nan_datapath_ctx ndp_ctx;
|
||||
#endif
|
||||
} sessionCtx;
|
||||
|
||||
#ifdef WLAN_FEATURE_TSF
|
||||
|
|
@ -1079,13 +1079,15 @@ struct hdd_adapter_s {
|
|||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_NAN_DATAPATH
|
||||
#define WLAN_HDD_GET_NDP_CTX_PTR(adapter) (&(adapter)->sessionCtx.ndp_ctx)
|
||||
#define WLAN_HDD_GET_NDP_WEXT_STATE_PTR(adapter) \
|
||||
(&(adapter)->sessionCtx.ndp_ctx.wext_state)
|
||||
#define WLAN_HDD_GET_NDP_CTX_PTR(adapter) \
|
||||
(&(adapter)->sessionCtx.station.ndp_ctx)
|
||||
#define WLAN_HDD_IS_NDP_ENABLED(hdd_ctx) ((hdd_ctx)->nan_datapath_enabled)
|
||||
#else
|
||||
#define WLAN_HDD_GET_NDP_CTX_PTR(adapter) (NULL)
|
||||
#define WLAN_HDD_GET_NDP_WEXT_STATE_PTR(adapter) (NULL)
|
||||
/* WLAN_HDD_GET_NDP_CTX_PTR and WLAN_HDD_GET_NDP_WEXT_STATE_PTR are not defined
|
||||
* intentionally so that all references to these must be within NDP code.
|
||||
* non-NDP code can call WLAN_HDD_IS_NDP_ENABLED(), and when it is enabled,
|
||||
* invoke NDP code to do all work.
|
||||
*/
|
||||
#define WLAN_HDD_IS_NDP_ENABLED(hdd_ctx) (false)
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ static int hdd_ndi_start_bss(hdd_adapter_t *adapter,
|
|||
int ret;
|
||||
uint32_t roam_id;
|
||||
hdd_wext_state_t *wext_state =
|
||||
WLAN_HDD_GET_NDP_WEXT_STATE_PTR(adapter);
|
||||
WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
|
||||
tCsrRoamProfile *roam_profile = &wext_state->roamProfile;
|
||||
|
||||
ENTER();
|
||||
|
|
|
|||
|
|
@ -40,17 +40,6 @@ struct wireless_dev;
|
|||
#define NDP_APP_INFO_LEN 255
|
||||
#define NDP_QOS_INFO_LEN 255
|
||||
|
||||
#ifdef WLAN_FEATURE_NAN_DATAPATH
|
||||
#define WLAN_HDD_NDP_GET_SSID(adapter) ( \
|
||||
&(adapter)->sessionCtx.ndp_ctx.conn_info.SSID)
|
||||
|
||||
#define WLAN_HDD_NDP_GET_BSSID(adapter) ( \
|
||||
&(adapter)->sessionCtx.ndp_ctx.conn_info.bssId)
|
||||
#else
|
||||
#define WLAN_HDD_NDP_GET_SSID(adapter) (NULL)
|
||||
#define WLAN_HDD_NDP_GET_BSSID(adapter) (NULL)
|
||||
#endif /* WLAN_FEATURE_NAN_DATAPATH */
|
||||
|
||||
/**
|
||||
* enum qca_wlan_vendor_attr_ndp_params - vendor attribute parameters
|
||||
* @QCA_WLAN_VENDOR_ATTR_NDP_SUBCMD: NDP Sub command
|
||||
|
|
@ -182,10 +171,6 @@ enum nan_datapath_state {
|
|||
* @active_ndp_sessions: active ndp sessions per adapter
|
||||
* @ndp_create_transaction_id: transaction id for create req
|
||||
* @ndp_delete_transaction_id: transaction id for delete req
|
||||
* @wext_state: Wext state variable
|
||||
* @conn_info: NDP connection info
|
||||
* @roam_info: NDP roam info
|
||||
* @gtk_offload_req_params: GTK offload request params
|
||||
* @ndp_key_installed: NDP security key installed
|
||||
* @ndp_enc_key: NDP encryption key info
|
||||
* @ndp_debug_state: debug state info
|
||||
|
|
@ -195,11 +180,6 @@ struct nan_datapath_ctx {
|
|||
uint32_t active_ndp_sessions;
|
||||
uint16_t ndp_create_transaction_id;
|
||||
uint16_t ndp_delete_transaction_id;
|
||||
hdd_wext_state_t wext_state;
|
||||
connection_info_t conn_info;
|
||||
#ifdef WLAN_FEATURE_GTK_OFFLOAD
|
||||
tSirGtkOffloadParams gtk_offload_req_params;
|
||||
#endif
|
||||
bool ndp_key_installed;
|
||||
tCsrRoamSetKey ndp_enc_key;
|
||||
uint32_t ndp_debug_state;
|
||||
|
|
|
|||
|
|
@ -1603,12 +1603,9 @@ void hdd_statistics_cb(void *pStats, void *pContext)
|
|||
void hdd_clear_roam_profile_ie(hdd_adapter_t *pAdapter)
|
||||
{
|
||||
int i = 0;
|
||||
hdd_wext_state_t *pWextState;
|
||||
hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
||||
|
||||
if (QDF_NDI_MODE == pAdapter->device_mode)
|
||||
pWextState = WLAN_HDD_GET_NDP_WEXT_STATE_PTR(pAdapter);
|
||||
else
|
||||
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
||||
ENTER();
|
||||
|
||||
/* clear WPA/RSN/WSC IE information in the profile */
|
||||
pWextState->roamProfile.nWPAReqIELength = 0;
|
||||
|
|
@ -1659,7 +1656,7 @@ void hdd_clear_roam_profile_ie(hdd_adapter_t *pAdapter)
|
|||
#endif
|
||||
|
||||
qdf_zero_macaddr(&pWextState->req_bssId);
|
||||
|
||||
EXIT();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -10875,30 +10872,34 @@ const struct iw_handler_def we_handler_def = {
|
|||
.get_wireless_stats = NULL,
|
||||
};
|
||||
|
||||
/* hdd_set_wext() - configures bss parameters
|
||||
* @pAdapter: handle to adapter context
|
||||
*
|
||||
* Returns: none
|
||||
*/
|
||||
int hdd_set_wext(hdd_adapter_t *pAdapter)
|
||||
{
|
||||
hdd_wext_state_t *pwextBuf;
|
||||
hdd_station_ctx_t *pHddStaCtx;
|
||||
tCsrSSIDInfo *ssid_list;
|
||||
struct qdf_mac_addr *bssid;
|
||||
hdd_wext_state_t *pwextBuf = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
||||
hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
|
||||
if (QDF_NDI_MODE == pAdapter->device_mode) {
|
||||
pwextBuf = WLAN_HDD_GET_NDP_WEXT_STATE_PTR(pAdapter);
|
||||
ssid_list = WLAN_HDD_NDP_GET_SSID(pAdapter);
|
||||
bssid = WLAN_HDD_NDP_GET_BSSID(pAdapter);
|
||||
} else {
|
||||
pwextBuf = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
||||
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
ssid_list = &pHddStaCtx->conn_info.SSID;
|
||||
bssid = &pHddStaCtx->conn_info.bssId;
|
||||
ENTER();
|
||||
|
||||
if (!pwextBuf) {
|
||||
hdd_err("ERROR: pwextBuf is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!pHddStaCtx) {
|
||||
hdd_err("ERROR: pHddStaCtx is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/* Now configure the roaming profile links. To SSID and bssid. */
|
||||
pwextBuf->roamProfile.SSIDs.numOfSSIDs = 0;
|
||||
pwextBuf->roamProfile.SSIDs.SSIDList = ssid_list;
|
||||
pwextBuf->roamProfile.SSIDs.SSIDList = &pHddStaCtx->conn_info.SSID;
|
||||
|
||||
pwextBuf->roamProfile.BSSIDs.numOfBSSIDs = 0;
|
||||
pwextBuf->roamProfile.BSSIDs.bssid = bssid;
|
||||
pwextBuf->roamProfile.BSSIDs.bssid = &pHddStaCtx->conn_info.bssId;
|
||||
|
||||
/*Set the numOfChannels to zero to scan all the channels */
|
||||
pwextBuf->roamProfile.ChannelInfo.numOfChannels = 0;
|
||||
|
|
@ -10927,6 +10928,7 @@ int hdd_set_wext(hdd_adapter_t *pAdapter)
|
|||
|
||||
hdd_clear_roam_profile_ie(pAdapter);
|
||||
|
||||
EXIT();
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
}
|
||||
|
|
@ -10942,15 +10944,15 @@ int hdd_set_wext(hdd_adapter_t *pAdapter)
|
|||
int hdd_register_wext(struct net_device *dev)
|
||||
{
|
||||
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
hdd_wext_state_t *pwextBuf;
|
||||
hdd_wext_state_t *pwextBuf = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
||||
QDF_STATUS status;
|
||||
|
||||
ENTER();
|
||||
|
||||
if (QDF_NDI_MODE == pAdapter->device_mode)
|
||||
pwextBuf = WLAN_HDD_GET_NDP_WEXT_STATE_PTR(pAdapter);
|
||||
else
|
||||
pwextBuf = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
||||
if (!pwextBuf) {
|
||||
hdd_err(FL("ERROR: pwextBuf is NULL"));
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/* Zero the memory. This zeros the profile structure */
|
||||
memset(pwextBuf, 0, sizeof(hdd_wext_state_t));
|
||||
|
|
|
|||
Loading…
Reference in a new issue