2 * @ingroup adf_net_public
4 * This file defines the device and virtual device switch tables.
12 * @brief per device switch structure
14 typedef struct _adf_dev_sw{
16 * @brief Handler for device open - mandatory interface
18 a_status_t (*drv_open) (adf_drv_handle_t hdl);
20 * @brief Handler for device close - mandatory interface
22 void (*drv_close) (adf_drv_handle_t hdl);
24 * @brief Handler for transmit - mandatory interface
26 a_status_t (*drv_tx) (adf_drv_handle_t hdl, adf_nbuf_t pkt);
28 * @brief Handler for configuration command - mandatory interface
30 a_status_t (*drv_cmd) (adf_drv_handle_t hdl, adf_net_cmd_t cmd,
31 adf_net_cmd_data_t *data);
33 * @brief Handler for ioctl - mandatory interface
35 a_status_t (*drv_ioctl) (adf_drv_handle_t hdl, int num,
38 * @brief Handler for transmission timeout - mandatory interface
40 a_status_t (*drv_tx_timeout)(adf_drv_handle_t hdl);
42 * @brief Handler for wireless configuration - optional interface
44 a_status_t (*drv_wcmd) (adf_drv_handle_t hdl, adf_net_wcmd_type_t cmd,
45 adf_net_wcmd_data_t *data);
47 * @brief Handler for polling if polling/deferred processing required -
50 adf_net_poll_resp_t (*drv_poll) (adf_drv_handle_t hdl, int quota,
53 * @brief Handler for per cpu deffered callback (e.g. for RSS) - optional
56 adf_net_poll_resp_t (*drv_poll_cpu) (adf_drv_handle_t hdl, int quota,
57 int *work_done, void *arg);
59 * @brief Handler for disabling receive interrupts for polling.
60 * adf_drv should do proper locking - these are not called in atomic context
62 void (*drv_poll_int_disable)(adf_drv_handle_t hdl);
64 * @brief Handler for enabling receive interrupts for polling.
65 * adf_drv should do proper locking - these are not called in atomic context
67 void (*drv_poll_int_enable) (adf_drv_handle_t hdl);
72 * @brief Virtual device switch structure
74 typedef struct _adf_vdev_sw{
76 * @brief Handler for device open
78 a_status_t (*drv_open) (adf_drv_handle_t hdl);
80 * @brief Handler for device close
82 void (*drv_close) (adf_drv_handle_t hdl);
84 * @brief Handler for transmit
86 a_status_t (*drv_tx) (adf_drv_handle_t hdl, adf_nbuf_t pkt);
88 * @brief Handler for configuration command
90 a_status_t (*drv_cmd) (adf_drv_handle_t hdl, adf_net_cmd_t cmd,
91 adf_net_cmd_data_t *data);
93 * @brief Handler for wireless configuration
95 a_status_t (*drv_wcmd) (adf_drv_handle_t hdl, adf_net_wcmd_type_t cmd,
96 adf_net_wcmd_data_t *data);
98 * @brief Handler for transmission timeout
100 a_status_t (*drv_tx_timeout) (adf_drv_handle_t hdl);
102 * @brief Handler for ioctl
104 a_status_t (*drv_ioctl) (adf_drv_handle_t hdl, int num, void *data);