xref: /wlan-dirver/qca-wifi-host-cmn/hif/src/sdio/hif_sdio_dev.h (revision 4865edfd190c086bbe2c69aae12a8226f877b91e)
1 /*
2  * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef HIF_SDIO_DEV_H_
20 #define HIF_SDIO_DEV_H_
21 
22 #include "qdf_net_types.h"
23 #include "a_types.h"
24 #include "athdefs.h"
25 #include "a_osapi.h"
26 #include <hif.h>
27 #include "athstartpack.h"
28 #include "hif_internal.h"
29 
30 struct hif_sdio_device *hif_dev_from_hif(struct hif_sdio_dev *hif_device);
31 
32 struct hif_sdio_device *hif_dev_create(struct hif_sdio_dev *hif_device,
33 				struct hif_msg_callbacks *callbacks,
34 				void *target);
35 
36 void hif_dev_destroy(struct hif_sdio_device *htc_sdio_device);
37 
38 QDF_STATUS hif_dev_setup(struct hif_sdio_device *htc_sdio_device);
39 
40 QDF_STATUS hif_dev_enable_interrupts(struct hif_sdio_device *htc_sdio_device);
41 
42 QDF_STATUS hif_dev_disable_interrupts(struct hif_sdio_device *htc_sdio_device);
43 
44 QDF_STATUS hif_dev_send_buffer(struct hif_sdio_device *htc_sdio_device,
45 			     unsigned int transfer_id, uint8_t pipe,
46 			     unsigned int nbytes, qdf_nbuf_t buf);
47 
48 QDF_STATUS hif_dev_map_service_to_pipe(struct hif_sdio_device *pdev,
49 				       uint16_t service_id,
50 				       uint8_t *ul_pipe,
51 				       uint8_t *dl_pipe,
52 				       bool swap_mapping);
53 
54 #endif /* HIF_SDIO_DEV_H_ */
55