]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/net/wireless/marvell/libertas_tf/libertas_tf.h
libertas_tf: move hardware callbacks to a separate structure
[linux.git] / drivers / net / wireless / marvell / libertas_tf / libertas_tf.h
index ad77b92d0b41e260d2df08ad483940d1e95253a1..11d5ff68bc5e4fa1e89fbef2d4e92a45334165ca 100644 (file)
@@ -173,10 +173,19 @@ struct channel_range {
 
 struct if_usb_card;
 
+struct lbtf_ops {
+       /** Hardware access */
+       int (*hw_host_to_card)(struct lbtf_private *priv, u8 type,
+                              u8 *payload, u16 nb);
+       int (*hw_prog_firmware)(struct if_usb_card *cardp);
+       int (*hw_reset_device)(struct if_usb_card *cardp);
+};
+
 /** Private structure for the MV device */
 struct lbtf_private {
        void *card;
        struct ieee80211_hw *hw;
+       const struct lbtf_ops *ops;
 
        /* Command response buffer */
        u8 cmd_resp_buff[LBS_UPLD_SIZE];
@@ -188,11 +197,6 @@ struct lbtf_private {
 
        struct work_struct cmd_work;
        struct work_struct tx_work;
-       /** Hardware access */
-       int (*hw_host_to_card) (struct lbtf_private *priv, u8 type, u8 *payload, u16 nb);
-       int (*hw_prog_firmware) (struct if_usb_card *cardp);
-       int (*hw_reset_device) (struct if_usb_card *cardp);
-
 
        /** Wlan adapter data structure*/
        /** STATUS variables */
@@ -486,7 +490,8 @@ void lbtf_cmd_response_rx(struct lbtf_private *priv);
 /* main.c */
 struct chan_freq_power *lbtf_get_region_cfp_table(u8 region,
        int *cfp_no);
-struct lbtf_private *lbtf_add_card(void *card, struct device *dmdev);
+struct lbtf_private *lbtf_add_card(void *card, struct device *dmdev,
+                                  const struct lbtf_ops *ops);
 int lbtf_remove_card(struct lbtf_private *priv);
 int lbtf_start_card(struct lbtf_private *priv);
 int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb);