forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/net/wireless/marvell/libertas_tf/libertas_tf.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Copyright (C) 2008, cozybit Inc.
34 * Copyright (C) 2007, Red Hat, Inc.
45 * Copyright (C) 2003-2006, Marvell International Ltd.
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or (at
9
- * your option) any later version.
106 */
117 #include <linux/spinlock.h>
128 #include <linux/device.h>
....@@ -173,10 +169,19 @@
173169
174170 struct if_usb_card;
175171
172
+struct lbtf_ops {
173
+ /** Hardware access */
174
+ int (*hw_host_to_card)(struct lbtf_private *priv, u8 type,
175
+ u8 *payload, u16 nb);
176
+ int (*hw_prog_firmware)(struct lbtf_private *priv);
177
+ int (*hw_reset_device)(struct lbtf_private *priv);
178
+};
179
+
176180 /** Private structure for the MV device */
177181 struct lbtf_private {
178182 void *card;
179183 struct ieee80211_hw *hw;
184
+ const struct lbtf_ops *ops;
180185
181186 /* Command response buffer */
182187 u8 cmd_resp_buff[LBS_UPLD_SIZE];
....@@ -188,11 +193,6 @@
188193
189194 struct work_struct cmd_work;
190195 struct work_struct tx_work;
191
- /** Hardware access */
192
- int (*hw_host_to_card) (struct lbtf_private *priv, u8 type, u8 *payload, u16 nb);
193
- int (*hw_prog_firmware) (struct if_usb_card *cardp);
194
- int (*hw_reset_device) (struct if_usb_card *cardp);
195
-
196196
197197 /** Wlan adapter data structure*/
198198 /** STATUS variables */
....@@ -250,7 +250,6 @@
250250 struct ieee80211_supported_band band;
251251 struct lbtf_offset_value offsetvalue;
252252
253
- u8 fw_ready;
254253 u8 surpriseremoved;
255254 struct sk_buff_head bc_ps_buf;
256255
....@@ -486,7 +485,8 @@
486485 /* main.c */
487486 struct chan_freq_power *lbtf_get_region_cfp_table(u8 region,
488487 int *cfp_no);
489
-struct lbtf_private *lbtf_add_card(void *card, struct device *dmdev);
488
+struct lbtf_private *lbtf_add_card(void *card, struct device *dmdev,
489
+ const struct lbtf_ops *ops);
490490 int lbtf_remove_card(struct lbtf_private *priv);
491491 int lbtf_start_card(struct lbtf_private *priv);
492492 int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb);