mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Configure the tdls offchannel params through IOCTL
Add support to configure tdls offchannel params through IOCTL commands. Change-Id: I90ba90b5ef980f837ce4759755efe190672ad911 CRs-Fixed: 2303145
This commit is contained in:
parent
252cb2bd7b
commit
113a9e602a
3 changed files with 69 additions and 42 deletions
|
|
@ -188,10 +188,49 @@ int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
|
|||
#endif
|
||||
#endif
|
||||
|
||||
int hdd_set_tdls_offchannel(struct hdd_context *hdd_ctx, int offchannel);
|
||||
/**
|
||||
* hdd_set_tdls_offchannel() - set tdls off-channel number
|
||||
* @hdd_ctx: Pointer to the HDD context
|
||||
* @adapter: Pointer to the HDD adapter
|
||||
* @offchannel: tdls off-channel number
|
||||
*
|
||||
* This function sets tdls off-channel number
|
||||
*
|
||||
* Return: 0 on success; negative errno otherwise
|
||||
*/
|
||||
int hdd_set_tdls_offchannel(struct hdd_context *hdd_ctx,
|
||||
struct hdd_adapter *adapter,
|
||||
int offchannel);
|
||||
|
||||
/**
|
||||
* hdd_set_tdls_secoffchanneloffset() - set secondary tdls off-channel offset
|
||||
* @hdd_ctx: Pointer to the HDD context
|
||||
* @adapter: Pointer to the HDD adapter
|
||||
* @offchanoffset: tdls off-channel offset
|
||||
*
|
||||
* This function sets secondary tdls off-channel offset
|
||||
*
|
||||
* Return: 0 on success; negative errno otherwise
|
||||
*/
|
||||
int hdd_set_tdls_secoffchanneloffset(struct hdd_context *hdd_ctx,
|
||||
struct hdd_adapter *adapter,
|
||||
int offchanoffset);
|
||||
int hdd_set_tdls_offchannelmode(struct hdd_adapter *adapter, int offchanmode);
|
||||
|
||||
/**
|
||||
* hdd_set_tdls_offchannelmode() - set tdls off-channel mode
|
||||
* @hdd_ctx: Pointer to the HDD context
|
||||
* @adapter: Pointer to the HDD adapter
|
||||
* @offchanmode: tdls off-channel mode
|
||||
* 1-Enable Channel Switch
|
||||
* 2-Disable Channel Switch
|
||||
*
|
||||
* This function sets tdls off-channel mode
|
||||
*
|
||||
* Return: 0 on success; negative errno otherwise
|
||||
*/
|
||||
int hdd_set_tdls_offchannelmode(struct hdd_context *hdd_ctx,
|
||||
struct hdd_adapter *adapter,
|
||||
int offchanmode);
|
||||
int hdd_set_tdls_scan_type(struct hdd_context *hdd_ctx, int val);
|
||||
int wlan_hdd_tdls_antenna_switch(struct hdd_context *hdd_ctx,
|
||||
struct hdd_adapter *adapter,
|
||||
|
|
|
|||
|
|
@ -6077,7 +6077,7 @@ static int drv_cmd_tdls_secondary_channel_offset(struct hdd_adapter *adapter,
|
|||
|
||||
hdd_debug("Tdls offchannel offset:%d", set_value);
|
||||
|
||||
ret = hdd_set_tdls_secoffchanneloffset(hdd_ctx, set_value);
|
||||
ret = hdd_set_tdls_secoffchanneloffset(hdd_ctx, adapter, set_value);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -6113,7 +6113,7 @@ static int drv_cmd_tdls_off_channel_mode(struct hdd_adapter *adapter,
|
|||
|
||||
hdd_debug("Tdls offchannel mode:%d", set_value);
|
||||
|
||||
ret = hdd_set_tdls_offchannelmode(adapter, set_value);
|
||||
ret = hdd_set_tdls_offchannelmode(hdd_ctx, adapter, set_value);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -6155,7 +6155,7 @@ static int drv_cmd_tdls_off_channel(struct hdd_adapter *adapter,
|
|||
|
||||
hdd_debug("Tdls offchannel num: %d", set_value);
|
||||
|
||||
ret = hdd_set_tdls_offchannel(hdd_ctx, set_value);
|
||||
ret = hdd_set_tdls_offchannel(hdd_ctx, adapter, set_value);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@ int wlan_hdd_tdls_get_all_peers(struct hdd_adapter *adapter,
|
|||
buf, buflen);
|
||||
}
|
||||
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
static const struct nla_policy
|
||||
wlan_hdd_tdls_config_enable_policy[QCA_WLAN_VENDOR_ATTR_TDLS_ENABLE_MAX +
|
||||
1] = {
|
||||
|
|
@ -742,52 +741,41 @@ int wlan_hdd_cfg80211_send_tdls_discover_req(struct wiphy *wiphy,
|
|||
#endif
|
||||
}
|
||||
|
||||
#endif /* End of FEATURE_WLAN_TDLS */
|
||||
|
||||
/**
|
||||
* hdd_set_tdls_offchannel() - set tdls off-channel number
|
||||
* @adapter: Pointer to the HDD adapter
|
||||
* @offchanmode: tdls off-channel number
|
||||
*
|
||||
* This function sets tdls off-channel number
|
||||
*
|
||||
* Return: 0 on success; negative errno otherwise
|
||||
*/
|
||||
int hdd_set_tdls_offchannel(struct hdd_context *hdd_ctx, int offchannel)
|
||||
int hdd_set_tdls_offchannel(struct hdd_context *hdd_ctx,
|
||||
struct hdd_adapter *adapter,
|
||||
int offchannel)
|
||||
{
|
||||
/* TODO */
|
||||
return 0;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (hdd_ctx->tdls_umac_comp_active)
|
||||
status = ucfg_set_tdls_offchannel(adapter->hdd_vdev,
|
||||
offchannel);
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_set_tdls_secoffchanneloffset() - set secondary tdls off-channel offset
|
||||
* @adapter: Pointer to the HDD adapter
|
||||
* @offchanmode: tdls off-channel offset
|
||||
*
|
||||
* This function sets 2nd tdls off-channel offset
|
||||
*
|
||||
* Return: 0 on success; negative errno otherwise
|
||||
*/
|
||||
int hdd_set_tdls_secoffchanneloffset(struct hdd_context *hdd_ctx,
|
||||
struct hdd_adapter *adapter,
|
||||
int offchanoffset)
|
||||
{
|
||||
/* TODO */
|
||||
return 0;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (hdd_ctx->tdls_umac_comp_active)
|
||||
status = ucfg_set_tdls_secoffchanneloffset(adapter->hdd_vdev,
|
||||
offchanoffset);
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_set_tdls_offchannelmode() - set tdls off-channel mode
|
||||
* @adapter: Pointer to the HDD adapter
|
||||
* @offchanmode: tdls off-channel mode
|
||||
*
|
||||
* This function sets tdls off-channel mode
|
||||
*
|
||||
* Return: 0 on success; negative errno otherwise
|
||||
*/
|
||||
int hdd_set_tdls_offchannelmode(struct hdd_adapter *adapter, int offchanmode)
|
||||
int hdd_set_tdls_offchannelmode(struct hdd_context *hdd_ctx,
|
||||
struct hdd_adapter *adapter,
|
||||
int offchanmode)
|
||||
{
|
||||
/* TODO */
|
||||
return 0;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (hdd_ctx->tdls_umac_comp_active)
|
||||
status = ucfg_set_tdls_offchan_mode(adapter->hdd_vdev,
|
||||
offchanmode);
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue