]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - drivers/net/wireless/ti/wlcore/hw_ops.h
9384b4d56c24a9dc1386732c86d1ac74ca75832b
2 * This file is part of wlcore
4 * Copyright (C) 2011 Texas Instruments Inc.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22 #ifndef __WLCORE_HW_OPS_H__
23 #define __WLCORE_HW_OPS_H__
29 wlcore_hw_calc_tx_blocks(struct wl1271
*wl
, u32 len
, u32 spare_blks
)
31 if (!wl
->ops
->calc_tx_blocks
)
34 return wl
->ops
->calc_tx_blocks(wl
, len
, spare_blks
);
38 wlcore_hw_set_tx_desc_blocks(struct wl1271
*wl
, struct wl1271_tx_hw_descr
*desc
,
39 u32 blks
, u32 spare_blks
)
41 if (!wl
->ops
->set_tx_desc_blocks
)
44 return wl
->ops
->set_tx_desc_blocks(wl
, desc
, blks
, spare_blks
);
48 wlcore_hw_set_tx_desc_data_len(struct wl1271
*wl
,
49 struct wl1271_tx_hw_descr
*desc
,
52 if (!wl
->ops
->set_tx_desc_data_len
)
55 wl
->ops
->set_tx_desc_data_len(wl
, desc
, skb
);
58 static inline enum wl_rx_buf_align
59 wlcore_hw_get_rx_buf_align(struct wl1271
*wl
, u32 rx_desc
)
62 if (!wl
->ops
->get_rx_buf_align
)
65 return wl
->ops
->get_rx_buf_align(wl
, rx_desc
);
69 wlcore_hw_prepare_read(struct wl1271
*wl
, u32 rx_desc
, u32 len
)
71 if (wl
->ops
->prepare_read
)
72 wl
->ops
->prepare_read(wl
, rx_desc
, len
);
76 wlcore_hw_get_rx_packet_len(struct wl1271
*wl
, void *rx_data
, u32 data_len
)
78 if (!wl
->ops
->get_rx_packet_len
)
81 return wl
->ops
->get_rx_packet_len(wl
, rx_data
, data_len
);
84 static inline void wlcore_hw_tx_delayed_compl(struct wl1271
*wl
)
86 if (wl
->ops
->tx_delayed_compl
)
87 wl
->ops
->tx_delayed_compl(wl
);
90 static inline void wlcore_hw_tx_immediate_compl(struct wl1271
*wl
)
92 if (wl
->ops
->tx_immediate_compl
)
93 wl
->ops
->tx_immediate_compl(wl
);
97 wlcore_hw_init_vif(struct wl1271
*wl
, struct wl12xx_vif
*wlvif
)
99 if (wl
->ops
->init_vif
)
100 return wl
->ops
->init_vif(wl
, wlvif
);
106 wlcore_hw_sta_get_ap_rate_mask(struct wl1271
*wl
, struct wl12xx_vif
*wlvif
)
108 if (!wl
->ops
->sta_get_ap_rate_mask
)
111 return wl
->ops
->sta_get_ap_rate_mask(wl
, wlvif
);
114 static inline int wlcore_identify_fw(struct wl1271
*wl
)
116 if (wl
->ops
->identify_fw
)
117 return wl
->ops
->identify_fw(wl
);