Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ath10k: add inline wrapper for htt_h2t_aggr_cfg_msg

This is done in order to make the *htt_h2t_aggr_cfg_msg* op align better
with the rest of the htt ops (whom all have inline wrappers).

It also adds support for the case when the op is missing (function
pointer is NULL).

As a result of this, the name of the 32 bit implementation in htt_tx.c
was changed and the function was made static.

Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

authored by

Erik Stromdahl and committed by
Kalle Valo
74ee5715 889ca180

+18 -8
+1 -1
drivers/net/wireless/ath/ath10k/htt.c
··· 257 257 return status; 258 258 } 259 259 260 - status = htt->tx_ops->htt_h2t_aggr_cfg_msg(htt, 260 + status = ath10k_htt_h2t_aggr_cfg_msg(htt, 261 261 htt->max_num_ampdu, 262 262 htt->max_num_amsdu); 263 263 if (status) {
+13 -3
drivers/net/wireless/ath/ath10k/htt.h
··· 2086 2086 htt->tx_ops->htt_free_txbuff(htt); 2087 2087 } 2088 2088 2089 + static inline int ath10k_htt_h2t_aggr_cfg_msg(struct ath10k_htt *htt, 2090 + u8 max_subfrms_ampdu, 2091 + u8 max_subfrms_amsdu) 2092 + 2093 + { 2094 + if (!htt->tx_ops->htt_h2t_aggr_cfg_msg) 2095 + return -EOPNOTSUPP; 2096 + 2097 + return htt->tx_ops->htt_h2t_aggr_cfg_msg(htt, 2098 + max_subfrms_ampdu, 2099 + max_subfrms_amsdu); 2100 + } 2101 + 2089 2102 struct ath10k_htt_rx_ops { 2090 2103 size_t (*htt_get_rx_ring_size)(struct ath10k_htt *htt); 2091 2104 void (*htt_config_paddrs_ring)(struct ath10k_htt *htt, void *vaddr); ··· 2259 2246 int ath10k_htt_h2t_ver_req_msg(struct ath10k_htt *htt); 2260 2247 int ath10k_htt_h2t_stats_req(struct ath10k_htt *htt, u32 mask, u32 reset_mask, 2261 2248 u64 cookie); 2262 - int ath10k_htt_h2t_aggr_cfg_msg(struct ath10k_htt *htt, 2263 - u8 max_subfrms_ampdu, 2264 - u8 max_subfrms_amsdu); 2265 2249 void ath10k_htt_hif_tx_complete(struct ath10k *ar, struct sk_buff *skb); 2266 2250 int ath10k_htt_tx_fetch_resp(struct ath10k *ar, 2267 2251 __le32 token,
+4 -4
drivers/net/wireless/ath/ath10k/htt_tx.c
··· 978 978 return 0; 979 979 } 980 980 981 - int ath10k_htt_h2t_aggr_cfg_msg(struct ath10k_htt *htt, 982 - u8 max_subfrms_ampdu, 983 - u8 max_subfrms_amsdu) 981 + static int ath10k_htt_h2t_aggr_cfg_msg_32(struct ath10k_htt *htt, 982 + u8 max_subfrms_ampdu, 983 + u8 max_subfrms_amsdu) 984 984 { 985 985 struct ath10k *ar = htt->ar; 986 986 struct htt_aggr_conf *aggr_conf; ··· 1747 1747 .htt_tx = ath10k_htt_tx_32, 1748 1748 .htt_alloc_txbuff = ath10k_htt_tx_alloc_cont_txbuf_32, 1749 1749 .htt_free_txbuff = ath10k_htt_tx_free_cont_txbuf_32, 1750 - .htt_h2t_aggr_cfg_msg = ath10k_htt_h2t_aggr_cfg_msg, 1750 + .htt_h2t_aggr_cfg_msg = ath10k_htt_h2t_aggr_cfg_msg_32, 1751 1751 }; 1752 1752 1753 1753 static const struct ath10k_htt_tx_ops htt_tx_ops_64 = {