diff --git a/dp/inc/cdp_txrx_cfg.h b/dp/inc/cdp_txrx_cfg.h index 98ca251e9d15..ce24997fbf1b 100644 --- a/dp/inc/cdp_txrx_cfg.h +++ b/dp/inc/cdp_txrx_cfg.h @@ -70,4 +70,20 @@ ol_pdev_handle ol_pdev_cfg_attach(qdf_device_t osdev, void ol_vdev_rx_set_intrabss_fwd(ol_txrx_vdev_handle vdev, bool val); +/** + * ol_txrx_get_opmode() - Return operation mode of vdev + * @vdev: vdev handle + * + * Return: operation mode. + */ +int ol_txrx_get_opmode(ol_txrx_vdev_handle vdev); + +/** + * ol_txrx_is_rx_fwd_disabled() - returns the rx_fwd_disabled status on vdev + * @vdev: vdev handle + * + * Return: Rx Fwd disabled status + */ +uint8_t +ol_txrx_is_rx_fwd_disabled(ol_txrx_vdev_handle vdev); #endif /* _CDP_TXRX_CFG_H_ */ diff --git a/dp/inc/cdp_txrx_cmn.h b/dp/inc/cdp_txrx_cmn.h index 77706901936a..e595358bf2a0 100644 --- a/dp/inc/cdp_txrx_cmn.h +++ b/dp/inc/cdp_txrx_cmn.h @@ -399,6 +399,42 @@ void ol_txrx_print_level_set(unsigned level); #define TXRX_FW_MAC_FETCH_MGR_STATS 22 #define TXRX_FW_MAC_PREFETCH_MGR_STATS 23 +/** + * ol_txrx_get_vdev_mac_addr() - Return mac addr of vdev + * @vdev: vdev handle + * + * Return: vdev mac address + */ +uint8_t * +ol_txrx_get_vdev_mac_addr(ol_txrx_vdev_handle vdev); + +/** + * ol_txrx_get_vdev_struct_mac_addr() - Return handle to struct qdf_mac_addr of + * vdev + * @vdev: vdev handle + * + * Return: Handle to struct qdf_mac_addr + */ +struct qdf_mac_addr * +ol_txrx_get_vdev_struct_mac_addr(ol_txrx_vdev_handle vdev); + +/** + * ol_txrx_get_pdev_from_vdev() - Return handle to pdev of vdev + * @vdev: vdev handle + * + * Return: Handle to pdev + */ +ol_txrx_pdev_handle ol_txrx_get_pdev_from_vdev(ol_txrx_vdev_handle vdev); + +/** + * ol_txrx_get_ctrl_pdev_from_vdev() - Return control pdev of vdev + * @vdev: vdev handle + * + * Return: Handle to control pdev + */ +ol_pdev_handle +ol_txrx_get_ctrl_pdev_from_vdev(ol_txrx_vdev_handle vdev); + #endif /* _CDP_TXRX_CMN_H_ */ diff --git a/dp/inc/cdp_txrx_misc.h b/dp/inc/cdp_txrx_misc.h index c28102a5f51e..e7461a3f4045 100644 --- a/dp/inc/cdp_txrx_misc.h +++ b/dp/inc/cdp_txrx_misc.h @@ -61,11 +61,41 @@ enum ol_tx_spec { OL_TX_SPEC_NO_FREE = 0x20, /* give to cb rather than free */ }; +/** + * ol_tx_non_std() - Allow the control-path SW to send data frames + * + * @data_vdev - which vdev should transmit the tx data frames + * @tx_spec - what non-standard handling to apply to the tx data frames + * @msdu_list - NULL-terminated list of tx MSDUs + * + * Generally, all tx data frames come from the OS shim into the txrx layer. + * However, there are rare cases such as TDLS messaging where the UMAC + * control-path SW creates tx data frames. + * This UMAC SW can call this function to provide the tx data frames to + * the txrx layer. + * The UMAC SW can request a callback for these data frames after their + * transmission completes, by using the ol_txrx_data_tx_cb_set function + * to register a tx completion callback, and by specifying + * ol_tx_spec_no_free as the tx_spec arg when giving the frames to + * ol_tx_non_std. + * The MSDUs need to have the appropriate L2 header type (802.3 vs. 802.11), + * as specified by ol_cfg_frame_type(). + * + * Return: null - success, skb - failure + */ +qdf_nbuf_t ol_tx_non_std(ol_txrx_vdev_handle vdev, + enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list); -qdf_nbuf_t -ol_tx_non_std(ol_txrx_vdev_handle vdev, - enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list); - +/** + * ol_txrx_update_ibss_vdev_heart_beat_timer_of_vdev() - Update ibss vdev heart + * beat timer + * @vdev: vdev handle + * @timer_value_sec: new heart beat timer value + * + * Return: Old timer value set in vdev. + */ +uint16_t ol_txrx_set_ibss_vdev_heart_beat_timer(ol_txrx_vdev_handle vdev, + uint16_t timer_value_sec); #endif /* _CDP_TXRX_MISC_H_ */ diff --git a/dp/inc/cdp_txrx_ocb.h b/dp/inc/cdp_txrx_ocb.h new file mode 100644 index 000000000000..074637a263d5 --- /dev/null +++ b/dp/inc/cdp_txrx_ocb.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2016 The Linux Foundation. All rights reserved. + * + * Previously licensed under the ISC license by Qualcomm Atheros, Inc. + * + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * This file was originally distributed by Qualcomm Atheros, Inc. + * under proprietary terms before Copyright ownership was assigned + * to the Linux Foundation. + */ + +#ifndef _CDP_TXRX_OCB_H_ +#define _CDP_TXRX_OCB_H_ + +/** + * struct ol_txrx_ocb_set_chan - txrx OCB channel info + * @ocb_channel_count: Channel count + * @ocb_channel_info: OCB channel info + */ +struct ol_txrx_ocb_set_chan { + uint32_t ocb_channel_count; + struct ol_txrx_ocb_chan_info *ocb_channel_info; +}; + +/** + * ol_txrx_set_ocb_chan_info() - set OCB channel info to vdev. + * @vdev: vdev handle + * @ocb_set_chan: OCB channel information to be set in vdev. + * + * Return: NONE + */ +void ol_txrx_set_ocb_chan_info(ol_txrx_vdev_handle vdev, + struct ol_txrx_ocb_set_chan ocb_set_chan); +/** + * ol_txrx_get_ocb_chan_info() - return handle to vdev ocb_channel_info + * @vdev: vdev handle + * + * Return: handle to struct ol_txrx_ocb_chan_info + */ +struct ol_txrx_ocb_chan_info * +ol_txrx_get_ocb_chan_info(ol_txrx_vdev_handle vdev); +#endif /* _CDP_TXRX_OCB_H_ */ diff --git a/dp/inc/cdp_txrx_peer_ops.h b/dp/inc/cdp_txrx_peer_ops.h index 1bb90445ab73..c349f31bc4a1 100644 --- a/dp/inc/cdp_txrx_peer_ops.h +++ b/dp/inc/cdp_txrx_peer_ops.h @@ -60,6 +60,14 @@ struct ol_txrx_desc_type { QDF_STATUS ol_txrx_register_peer(struct ol_txrx_desc_type *sta_desc); +/** + * ol_txrx_vdev_peer_remove_cb - wma_remove_peer callback + */ +typedef void (*ol_txrx_vdev_peer_remove_cb)(void *handle, uint8_t *bssid, + uint8_t vdev_id, + ol_txrx_peer_handle peer, + bool roam_synch_in_progress); + QDF_STATUS ol_txrx_clear_peer(uint8_t sta_id); QDF_STATUS ol_txrx_change_peer_state(uint8_t sta_id, @@ -103,4 +111,66 @@ void *ol_txrx_get_vdev_by_sta_id(uint8_t sta_id); QDF_STATUS ol_txrx_register_ocb_peer(void *cds_ctx, uint8_t *mac_addr, uint8_t *peer_id); +/** + * ol_txrx_peer_get_peer_mac_addr() - return mac_addr from peer handle. + * @peer: handle to peer + * + * returns mac addrs for module which do not know peer type + * + * Return: the mac_addr from peer + */ +uint8_t *ol_txrx_peer_get_peer_mac_addr(ol_txrx_peer_handle peer); + +/** + * ol_txrx_get_peer_state() - Return peer state of peer + * @peer: peer handle + * + * Return: return peer state + */ +int ol_txrx_get_peer_state(ol_txrx_peer_handle peer); + +/** + * ol_txrx_get_vdev_for_peer() - Return vdev from peer handle + * @peer: peer handle + * + * Return: vdev handle from peer + */ +ol_txrx_vdev_handle +ol_txrx_get_vdev_for_peer(ol_txrx_peer_handle peer); + +/** + * ol_txrx_update_ibss_add_peer_num_of_vdev() - update and return peer num + * @vdev: vdev handle + * @peer_num_delta: peer nums to be adjusted + * + * Return: -1 for failure or total peer nums after adjustment. + */ +int16_t +ol_txrx_update_ibss_add_peer_num_of_vdev(ol_txrx_vdev_handle vdev, + int16_t peer_num_delta); +/** + * ol_txrx_remove_peers_for_vdev() - remove all vdev peers with lock held + * @vdev: vdev handle + * @callback: callback function to remove the peer. + * @callback_context: handle for callback function + * @remove_last_peer: Does it required to last peer. + * + * Return: NONE + */ +void +ol_txrx_remove_peers_for_vdev(ol_txrx_vdev_handle vdev, + ol_txrx_vdev_peer_remove_cb callback, + void *callback_context, bool remove_last_peer); +/** + * ol_txrx_remove_peers_for_vdev_no_lock() - remove vdev peers with no lock. + * @vdev: vdev handle + * @callback: callback function to remove the peer. + * @callback_context: handle for callback function + * + * Return: NONE + */ +void +ol_txrx_remove_peers_for_vdev_no_lock(ol_txrx_vdev_handle vdev, + ol_txrx_vdev_peer_remove_cb callback, + void *callback_context); #endif /* _CDP_TXRX_PEER_H_ */ diff --git a/dp/inc/cdp_txrx_pmf.h b/dp/inc/cdp_txrx_pmf.h new file mode 100644 index 000000000000..42218c77cf90 --- /dev/null +++ b/dp/inc/cdp_txrx_pmf.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2016 The Linux Foundation. All rights reserved. + * + * Previously licensed under the ISC license by Qualcomm Atheros, Inc. + * + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * This file was originally distributed by Qualcomm Atheros, Inc. + * under proprietary terms before Copyright ownership was assigned + * to the Linux Foundation. + */ +#ifndef _CDP_TXRX_PMF_H_ +#define _CDP_TXRX_PMF_H_ + +/** + * ol_txrx_get_pn_info() - Returns pn info from peer + * @peer: handle to peer + * @last_pn_valid: return last_rmf_pn_valid value from peer. + * @last_pn: return last_rmf_pn value from peer. + * @rmf_pn_replays: return rmf_pn_replays value from peer. + * + * Return: NONE + */ +void +ol_txrx_get_pn_info(ol_txrx_peer_handle peer, uint8_t **last_pn_valid, + uint64_t **last_pn, uint32_t **rmf_pn_replays); +#endif /* _CDP_TXRX_PMF_H_ */