mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-08 11:45:53 -05:00
qcacmn: Add debug functions to P2P component
In order to facilitate debugging P2P issues, add debug information to P2P component. Change-Id: I0192b1ee25bb74dc512b01ad451b03d1a45a5446 CRs-Fixed: 2105782
This commit is contained in:
parent
44c6d56027
commit
fcfdd4e018
6 changed files with 567 additions and 0 deletions
|
|
@ -507,6 +507,32 @@ static QDF_STATUS process_peer_for_noa(struct wlan_objmgr_vdev *vdev,
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_P2P_DEBUG
|
||||
/**
|
||||
* wlan_p2p_init_connection_status() - init connection status
|
||||
* @p2p_soc_obj: pointer to p2p psoc object
|
||||
*
|
||||
* This function initial p2p connection status.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void wlan_p2p_init_connection_status(
|
||||
struct p2p_soc_priv_obj *p2p_soc_obj)
|
||||
{
|
||||
if (!p2p_soc_obj) {
|
||||
p2p_err("invalid p2p soc obj");
|
||||
return;
|
||||
}
|
||||
|
||||
p2p_soc_obj->connection_status = P2P_NOT_ACTIVE;
|
||||
}
|
||||
#else
|
||||
static void wlan_p2p_init_connection_status(
|
||||
struct p2p_soc_priv_obj *p2p_soc_obj)
|
||||
{
|
||||
}
|
||||
#endif /* WLAN_FEATURE_P2P_DEBUG */
|
||||
|
||||
QDF_STATUS p2p_component_init(void)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
|
|
@ -738,6 +764,8 @@ QDF_STATUS p2p_psoc_start(struct wlan_objmgr_psoc *soc,
|
|||
start_param->lo_event_cb_data = req->lo_event_cb_data;
|
||||
p2p_soc_obj->start_param = start_param;
|
||||
|
||||
wlan_p2p_init_connection_status(p2p_soc_obj);
|
||||
|
||||
/* register p2p lo stop and noa event */
|
||||
tgt_p2p_register_lo_ev_handler(soc);
|
||||
tgt_p2p_register_noa_ev_handler(soc);
|
||||
|
|
@ -1021,3 +1049,210 @@ void p2p_peer_authorized(struct wlan_objmgr_vdev *vdev, uint8_t *mac_addr)
|
|||
}
|
||||
p2p_debug("peer is authorized");
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_P2P_DEBUG
|
||||
static struct p2p_soc_priv_obj *
|
||||
get_p2p_soc_obj_by_vdev(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct p2p_soc_priv_obj *p2p_soc_obj;
|
||||
struct wlan_objmgr_psoc *soc;
|
||||
|
||||
if (!vdev) {
|
||||
p2p_err("vdev context passed is NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
soc = wlan_vdev_get_psoc(vdev);
|
||||
if (!soc) {
|
||||
p2p_err("soc context is NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
p2p_soc_obj = wlan_objmgr_psoc_get_comp_private_obj(soc,
|
||||
WLAN_UMAC_COMP_P2P);
|
||||
if (!p2p_soc_obj)
|
||||
p2p_err("P2P soc context is NULL");
|
||||
|
||||
return p2p_soc_obj;
|
||||
}
|
||||
|
||||
QDF_STATUS p2p_status_scan(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct p2p_soc_priv_obj *p2p_soc_obj;
|
||||
enum tQDF_ADAPTER_MODE mode;
|
||||
|
||||
p2p_soc_obj = get_p2p_soc_obj_by_vdev(vdev);
|
||||
if (!p2p_soc_obj) {
|
||||
p2p_err("P2P soc context is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
mode = wlan_vdev_mlme_get_opmode(vdev);
|
||||
if (mode != QDF_P2P_CLIENT_MODE &&
|
||||
mode != QDF_P2P_DEVICE_MODE) {
|
||||
p2p_debug("this is not P2P CLIENT or DEVICE, mode:%d",
|
||||
mode);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
p2p_debug("connection status:%d", p2p_soc_obj->connection_status);
|
||||
switch (p2p_soc_obj->connection_status) {
|
||||
case P2P_GO_NEG_COMPLETED:
|
||||
case P2P_GO_NEG_PROCESS:
|
||||
p2p_soc_obj->connection_status =
|
||||
P2P_CLIENT_CONNECTING_STATE_1;
|
||||
p2p_debug("[P2P State] Changing state from Go nego completed to Connection is started");
|
||||
p2p_debug("P2P Scanning is started for 8way Handshake");
|
||||
break;
|
||||
case P2P_CLIENT_DISCONNECTED_STATE:
|
||||
p2p_soc_obj->connection_status =
|
||||
P2P_CLIENT_CONNECTING_STATE_2;
|
||||
p2p_debug("[P2P State] Changing state from Disconnected state to Connection is started");
|
||||
p2p_debug("P2P Scanning is started for 4way Handshake");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS p2p_status_connect(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct p2p_soc_priv_obj *p2p_soc_obj;
|
||||
enum tQDF_ADAPTER_MODE mode;
|
||||
|
||||
p2p_soc_obj = get_p2p_soc_obj_by_vdev(vdev);
|
||||
if (!p2p_soc_obj) {
|
||||
p2p_err("P2P soc context is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
mode = wlan_vdev_mlme_get_opmode(vdev);
|
||||
if (mode != QDF_P2P_CLIENT_MODE) {
|
||||
p2p_debug("this is not P2P CLIENT, mode:%d", mode);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
p2p_debug("connection status:%d", p2p_soc_obj->connection_status);
|
||||
switch (p2p_soc_obj->connection_status) {
|
||||
case P2P_CLIENT_CONNECTING_STATE_1:
|
||||
p2p_soc_obj->connection_status =
|
||||
P2P_CLIENT_CONNECTED_STATE_1;
|
||||
p2p_debug("[P2P State] Changing state from Connecting state to Connected State for 8-way Handshake");
|
||||
break;
|
||||
case P2P_CLIENT_DISCONNECTED_STATE:
|
||||
p2p_debug("No scan before 4-way handshake");
|
||||
/*
|
||||
* Fall thru since no scan before 4-way handshake and
|
||||
* won't enter state P2P_CLIENT_CONNECTING_STATE_2:
|
||||
*/
|
||||
case P2P_CLIENT_CONNECTING_STATE_2:
|
||||
p2p_soc_obj->connection_status =
|
||||
P2P_CLIENT_COMPLETED_STATE;
|
||||
p2p_debug("[P2P State] Changing state from Connecting state to P2P Client Connection Completed");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS p2p_status_disconnect(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct p2p_soc_priv_obj *p2p_soc_obj;
|
||||
enum tQDF_ADAPTER_MODE mode;
|
||||
|
||||
p2p_soc_obj = get_p2p_soc_obj_by_vdev(vdev);
|
||||
if (!p2p_soc_obj) {
|
||||
p2p_err("P2P soc context is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
mode = wlan_vdev_mlme_get_opmode(vdev);
|
||||
if (mode != QDF_P2P_CLIENT_MODE) {
|
||||
p2p_debug("this is not P2P CLIENT, mode:%d", mode);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
p2p_debug("connection status:%d", p2p_soc_obj->connection_status);
|
||||
switch (p2p_soc_obj->connection_status) {
|
||||
case P2P_CLIENT_CONNECTED_STATE_1:
|
||||
p2p_soc_obj->connection_status =
|
||||
P2P_CLIENT_DISCONNECTED_STATE;
|
||||
p2p_debug("[P2P State] 8 way Handshake completed and moved to disconnected state");
|
||||
break;
|
||||
case P2P_CLIENT_COMPLETED_STATE:
|
||||
p2p_soc_obj->connection_status = P2P_NOT_ACTIVE;
|
||||
p2p_debug("[P2P State] P2P Client is removed and moved to inactive state");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS p2p_status_start_bss(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct p2p_soc_priv_obj *p2p_soc_obj;
|
||||
enum tQDF_ADAPTER_MODE mode;
|
||||
|
||||
p2p_soc_obj = get_p2p_soc_obj_by_vdev(vdev);
|
||||
if (!p2p_soc_obj) {
|
||||
p2p_err("P2P soc context is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
mode = wlan_vdev_mlme_get_opmode(vdev);
|
||||
if (mode != QDF_P2P_GO_MODE) {
|
||||
p2p_debug("this is not P2P GO, mode:%d", mode);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
p2p_debug("connection status:%d", p2p_soc_obj->connection_status);
|
||||
switch (p2p_soc_obj->connection_status) {
|
||||
case P2P_GO_NEG_COMPLETED:
|
||||
p2p_soc_obj->connection_status =
|
||||
P2P_GO_COMPLETED_STATE;
|
||||
p2p_debug("[P2P State] From Go nego completed to Non-autonomous Group started");
|
||||
break;
|
||||
case P2P_NOT_ACTIVE:
|
||||
p2p_soc_obj->connection_status =
|
||||
P2P_GO_COMPLETED_STATE;
|
||||
p2p_debug("[P2P State] From Inactive to Autonomous Group started");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS p2p_status_stop_bss(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct p2p_soc_priv_obj *p2p_soc_obj;
|
||||
enum tQDF_ADAPTER_MODE mode;
|
||||
|
||||
p2p_soc_obj = get_p2p_soc_obj_by_vdev(vdev);
|
||||
if (!p2p_soc_obj) {
|
||||
p2p_err("P2P soc context is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
mode = wlan_vdev_mlme_get_opmode(vdev);
|
||||
if (mode != QDF_P2P_GO_MODE) {
|
||||
p2p_debug("this is not P2P GO, mode:%d", mode);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
p2p_debug("connection status:%d", p2p_soc_obj->connection_status);
|
||||
if (p2p_soc_obj->connection_status == P2P_GO_COMPLETED_STATE) {
|
||||
p2p_soc_obj->connection_status = P2P_NOT_ACTIVE;
|
||||
p2p_debug("[P2P State] From GO completed to Inactive state GO got removed");
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* WLAN_FEATURE_P2P_DEBUG */
|
||||
|
|
|
|||
|
|
@ -129,6 +129,32 @@ struct p2p_noa_event {
|
|||
struct p2p_noa_info *noa_info;
|
||||
};
|
||||
|
||||
#ifdef WLAN_FEATURE_P2P_DEBUG
|
||||
/**
|
||||
* enum p2p_connection_status - p2p connection status
|
||||
* @P2P_NOT_ACTIVE: P2P not active status
|
||||
* @P2P_GO_NEG_PROCESS: P2P GO negotiation in process
|
||||
* @P2P_GO_NEG_COMPLETED: P2P GO negotiation complete
|
||||
* @P2P_CLIENT_CONNECTING_STATE_1: P2P client connecting state 1
|
||||
* @P2P_GO_COMPLETED_STATE: P2P GO complete state
|
||||
* @P2P_CLIENT_CONNECTED_STATE_1: P2P client connected state 1
|
||||
* @P2P_CLIENT_DISCONNECTED_STATE: P2P client disconnected state
|
||||
* @P2P_CLIENT_CONNECTING_STATE_2: P2P client connecting state 2
|
||||
* @P2P_CLIENT_COMPLETED_STATE: P2P client complete state
|
||||
*/
|
||||
enum p2p_connection_status {
|
||||
P2P_NOT_ACTIVE,
|
||||
P2P_GO_NEG_PROCESS,
|
||||
P2P_GO_NEG_COMPLETED,
|
||||
P2P_CLIENT_CONNECTING_STATE_1,
|
||||
P2P_GO_COMPLETED_STATE,
|
||||
P2P_CLIENT_CONNECTED_STATE_1,
|
||||
P2P_CLIENT_DISCONNECTED_STATE,
|
||||
P2P_CLIENT_CONNECTING_STATE_2,
|
||||
P2P_CLIENT_COMPLETED_STATE
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct p2p_soc_priv_obj - Per SoC p2p private object
|
||||
* @soc: Pointer to SoC context
|
||||
|
|
@ -140,6 +166,7 @@ struct p2p_noa_event {
|
|||
* data to HDD
|
||||
* @cancel_roc_done: Cancel roc done event
|
||||
* @roc_runtime_lock: Runtime lock for roc request
|
||||
* @connection_status:Global P2P connection status
|
||||
*/
|
||||
struct p2p_soc_priv_obj {
|
||||
struct wlan_objmgr_psoc *soc;
|
||||
|
|
@ -150,6 +177,9 @@ struct p2p_soc_priv_obj {
|
|||
struct p2p_start_param *start_param;
|
||||
qdf_event_t cancel_roc_done;
|
||||
qdf_runtime_lock_t roc_runtime_lock;
|
||||
#ifdef WLAN_FEATURE_P2P_DEBUG
|
||||
enum p2p_connection_status connection_status;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -305,4 +335,80 @@ QDF_STATUS p2p_process_lo_stop(
|
|||
*/
|
||||
QDF_STATUS p2p_process_noa(struct p2p_noa_event *noa_event);
|
||||
|
||||
#ifdef WLAN_FEATURE_P2P_DEBUG
|
||||
/**
|
||||
* p2p_status_scan() - Update P2P connection status
|
||||
* @vdev: vdev context
|
||||
*
|
||||
* This function updates P2P connection status when scanning
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
QDF_STATUS p2p_status_scan(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* p2p_status_connect() - Update P2P connection status
|
||||
* @vdev: vdev context
|
||||
*
|
||||
* This function updates P2P connection status when connecting.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
QDF_STATUS p2p_status_connect(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* p2p_status_disconnect() - Update P2P connection status
|
||||
* @vdev: vdev context
|
||||
*
|
||||
* This function updates P2P connection status when disconnecting.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
QDF_STATUS p2p_status_disconnect(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* p2p_status_start_bss() - Update P2P connection status
|
||||
* @vdev: vdev context
|
||||
*
|
||||
* This function updates P2P connection status when starting BSS.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
QDF_STATUS p2p_status_start_bss(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* p2p_status_stop_bss() - Update P2P connection status
|
||||
* @vdev: vdev context
|
||||
*
|
||||
* This function updates P2P connection status when stopping BSS.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
QDF_STATUS p2p_status_stop_bss(struct wlan_objmgr_vdev *vdev);
|
||||
#else
|
||||
static inline QDF_STATUS p2p_status_scan(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS p2p_status_connect(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS p2p_status_disconnect(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS p2p_status_start_bss(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS p2p_status_stop_bss(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* WLAN_FEATURE_P2P_DEBUG */
|
||||
#endif /* _WLAN_P2P_MAIN_H_ */
|
||||
|
|
|
|||
|
|
@ -665,6 +665,117 @@ static QDF_STATUS p2p_get_frame_info(uint8_t *data_buf, uint32_t length,
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_P2P_DEBUG
|
||||
/**
|
||||
* p2p_tx_update_connection_status() - Update P2P connection status
|
||||
* with tx frame
|
||||
* @p2p_soc_obj: P2P soc private object
|
||||
* @tx_frame_info: frame information
|
||||
* @mac_to: Pointer to dest MAC address
|
||||
*
|
||||
* This function updates P2P connection status with tx frame.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
static QDF_STATUS p2p_tx_update_connection_status(
|
||||
struct p2p_soc_priv_obj *p2p_soc_obj,
|
||||
struct p2p_frame_info *tx_frame_info,
|
||||
uint8_t *mac_to)
|
||||
{
|
||||
if (!p2p_soc_obj || !tx_frame_info || !mac_to) {
|
||||
p2p_err("invalid p2p_soc_obj:%pK or tx_frame_info:%pK or mac_to:%pK",
|
||||
p2p_soc_obj, tx_frame_info, mac_to);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (tx_frame_info->public_action_type !=
|
||||
P2P_PUBLIC_ACTION_NOT_SUPPORT)
|
||||
p2p_debug("%s ---> OTA to "QDF_MAC_ADDRESS_STR,
|
||||
p2p_get_frame_type_str(tx_frame_info),
|
||||
QDF_MAC_ADDR_ARRAY(mac_to));
|
||||
|
||||
if ((tx_frame_info->public_action_type ==
|
||||
P2P_PUBLIC_ACTION_PROV_DIS_REQ) &&
|
||||
(p2p_soc_obj->connection_status == P2P_NOT_ACTIVE)) {
|
||||
p2p_soc_obj->connection_status = P2P_GO_NEG_PROCESS;
|
||||
p2p_debug("[P2P State]Inactive state to GO negotiation progress state");
|
||||
} else if ((tx_frame_info->public_action_type ==
|
||||
P2P_PUBLIC_ACTION_NEG_CNF) &&
|
||||
(p2p_soc_obj->connection_status ==
|
||||
P2P_GO_NEG_PROCESS)) {
|
||||
p2p_soc_obj->connection_status = P2P_GO_NEG_COMPLETED;
|
||||
p2p_debug("[P2P State]GO nego progress to GO nego completed state");
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* p2p_rx_update_connection_status() - Update P2P connection status
|
||||
* with rx frame
|
||||
* @p2p_soc_obj: P2P soc private object
|
||||
* @rx_frame_info: frame information
|
||||
* @mac_from: Pointer to source MAC address
|
||||
*
|
||||
* This function updates P2P connection status with rx frame.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
static QDF_STATUS p2p_rx_update_connection_status(
|
||||
struct p2p_soc_priv_obj *p2p_soc_obj,
|
||||
struct p2p_frame_info *rx_frame_info,
|
||||
uint8_t *mac_from)
|
||||
{
|
||||
if (!p2p_soc_obj || !rx_frame_info || !mac_from) {
|
||||
p2p_err("invalid p2p_soc_obj:%pK or rx_frame_info:%pK, mac_from:%pK",
|
||||
p2p_soc_obj, rx_frame_info, mac_from);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (rx_frame_info->public_action_type !=
|
||||
P2P_PUBLIC_ACTION_NOT_SUPPORT)
|
||||
p2p_debug("%s <--- OTA from "QDF_MAC_ADDRESS_STR,
|
||||
p2p_get_frame_type_str(rx_frame_info),
|
||||
QDF_MAC_ADDR_ARRAY(mac_from));
|
||||
|
||||
if ((rx_frame_info->public_action_type ==
|
||||
P2P_PUBLIC_ACTION_PROV_DIS_REQ) &&
|
||||
(p2p_soc_obj->connection_status == P2P_NOT_ACTIVE)) {
|
||||
p2p_soc_obj->connection_status = P2P_GO_NEG_PROCESS;
|
||||
p2p_debug("[P2P State]Inactive state to GO negotiation progress state");
|
||||
} else if ((rx_frame_info->public_action_type ==
|
||||
P2P_PUBLIC_ACTION_NEG_CNF) &&
|
||||
(p2p_soc_obj->connection_status ==
|
||||
P2P_GO_NEG_PROCESS)) {
|
||||
p2p_soc_obj->connection_status = P2P_GO_NEG_COMPLETED;
|
||||
p2p_debug("[P2P State]GO negotiation progress to GO negotiation completed state");
|
||||
} else if ((rx_frame_info->public_action_type ==
|
||||
P2P_PUBLIC_ACTION_INVIT_REQ) &&
|
||||
(p2p_soc_obj->connection_status == P2P_NOT_ACTIVE)) {
|
||||
p2p_soc_obj->connection_status = P2P_GO_NEG_COMPLETED;
|
||||
p2p_debug("[P2P State]Inactive state to GO negotiation completed state Autonomous GO formation");
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#else
|
||||
static QDF_STATUS p2p_tx_update_connection_status(
|
||||
struct p2p_soc_priv_obj *p2p_soc_obj,
|
||||
struct p2p_frame_info *tx_frame_info,
|
||||
uint8_t *mac_to)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS p2p_rx_update_connection_status(
|
||||
struct p2p_soc_priv_obj *p2p_soc_obj,
|
||||
struct p2p_frame_info *rx_frame_info,
|
||||
uint8_t *mac_from)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* p2p_packet_alloc() - allocate qdf nbuf
|
||||
* @size: buffe size
|
||||
|
|
@ -1428,6 +1539,7 @@ QDF_STATUS p2p_process_mgmt_tx(struct tx_action_context *tx_ctx)
|
|||
{
|
||||
struct p2p_soc_priv_obj *p2p_soc_obj;
|
||||
struct p2p_roc_context *curr_roc_ctx;
|
||||
uint8_t *mac_to;
|
||||
QDF_STATUS status;
|
||||
|
||||
status = p2p_tx_context_check_valid(tx_ctx);
|
||||
|
|
@ -1459,6 +1571,11 @@ QDF_STATUS p2p_process_mgmt_tx(struct tx_action_context *tx_ctx)
|
|||
goto fail;
|
||||
}
|
||||
|
||||
/* update P2P connection status with tx frame info */
|
||||
mac_to = &(tx_ctx->buf[DST_MAC_ADDR_OFFSET]);
|
||||
p2p_tx_update_connection_status(p2p_soc_obj,
|
||||
&(tx_ctx->frame_info), mac_to);
|
||||
|
||||
status = p2p_vdev_check_valid(tx_ctx);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
p2p_debug("invalid vdev or vdev mode");
|
||||
|
|
@ -1596,6 +1713,7 @@ QDF_STATUS p2p_process_rx_mgmt(
|
|||
struct p2p_soc_priv_obj *p2p_soc_obj;
|
||||
struct p2p_start_param *start_param;
|
||||
struct p2p_frame_info frame_info;
|
||||
uint8_t *mac_from;
|
||||
|
||||
p2p_soc_obj = rx_mgmt_event->p2p_soc_obj;
|
||||
rx_mgmt = rx_mgmt_event->rx_mgmt;
|
||||
|
|
@ -1615,6 +1733,11 @@ QDF_STATUS p2p_process_rx_mgmt(
|
|||
p2p_get_frame_info(rx_mgmt->buf, rx_mgmt->frame_len,
|
||||
&frame_info);
|
||||
|
||||
/* update P2P connection status with rx frame info */
|
||||
mac_from = &(rx_mgmt->buf[SRC_MAC_ADDR_OFFSET]);
|
||||
p2p_rx_update_connection_status(p2p_soc_obj,
|
||||
&frame_info, mac_from);
|
||||
|
||||
p2p_debug("action_sub_type %u, action_type %d",
|
||||
frame_info.public_action_type,
|
||||
frame_info.action_type);
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@
|
|||
#define P2P_ACTION_FRAME_ACK_WAIT 300
|
||||
#define P2P_ACTION_FRAME_TX_TIMEOUT 2000
|
||||
|
||||
#define DST_MAC_ADDR_OFFSET 4
|
||||
#define SRC_MAC_ADDR_OFFSET (DST_MAC_ADDR_OFFSET + QDF_MAC_ADDR_SIZE)
|
||||
|
||||
#define P2P_NOA_STREAM_ARR_SIZE (P2P_MAX_NOA_ATTR_LEN + (2 * P2P_IE_HEADER_LEN))
|
||||
|
||||
#define P2P_GET_TYPE_FRM_FC(__fc__) (((__fc__) & 0x0F) >> 2)
|
||||
|
|
|
|||
|
|
@ -297,4 +297,54 @@ void p2p_peer_authorized(struct wlan_objmgr_vdev *vdev, uint8_t *mac_addr);
|
|||
QDF_STATUS ucfg_p2p_set_noa(struct wlan_objmgr_psoc *soc,
|
||||
uint32_t vdev_id, bool disable_noa);
|
||||
|
||||
/**
|
||||
* ucfg_p2p_status_scan() - Show P2P connection status when scanning
|
||||
* @vdev: vdev context
|
||||
*
|
||||
* This function shows P2P connection status when scanning.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
QDF_STATUS ucfg_p2p_status_scan(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* ucfg_p2p_status_connect() - Update P2P connection status
|
||||
* @vdev: vdev context
|
||||
*
|
||||
* Updates P2P connection status by up layer when connecting.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
QDF_STATUS ucfg_p2p_status_connect(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* ucfg_p2p_status_disconnect() - Update P2P connection status
|
||||
* @vdev: vdev context
|
||||
*
|
||||
* Updates P2P connection status by up layer when disconnecting.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
QDF_STATUS ucfg_p2p_status_disconnect(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* ucfg_p2p_status_start_bss() - Update P2P connection status
|
||||
* @vdev: vdev context
|
||||
*
|
||||
* Updates P2P connection status by up layer when starting bss.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
QDF_STATUS ucfg_p2p_status_start_bss(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* ucfg_p2p_status_stop_bss() - Update P2P connection status
|
||||
* @vdev: vdev context
|
||||
*
|
||||
* Updates P2P connection status by up layer when stopping bss.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
QDF_STATUS ucfg_p2p_status_stop_bss(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
#endif /* _WLAN_P2P_UCFG_API_H_ */
|
||||
|
|
|
|||
|
|
@ -421,3 +421,53 @@ QDF_STATUS ucfg_p2p_set_noa(struct wlan_objmgr_psoc *soc,
|
|||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_p2p_status_scan(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
if (!vdev) {
|
||||
p2p_err("vdev is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
return p2p_status_scan(vdev);
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_p2p_status_connect(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
if (!vdev) {
|
||||
p2p_err("vdev is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
return p2p_status_connect(vdev);
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_p2p_status_disconnect(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
if (!vdev) {
|
||||
p2p_err("vdev is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
return p2p_status_disconnect(vdev);
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_p2p_status_start_bss(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
if (!vdev) {
|
||||
p2p_err("vdev is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
return p2p_status_start_bss(vdev);
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_p2p_status_stop_bss(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
if (!vdev) {
|
||||
p2p_err("vdev is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
return p2p_status_stop_bss(vdev);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue