brcm80211: fmac: introduce common bus interface struct brcmf_bus
[linux-2.6-microblaze.git] / drivers / net / wireless / brcm80211 / brcmfmac / dhd.h
index 6da519e..a557971 100644 (file)
@@ -571,8 +571,13 @@ struct brcmf_dcmd {
        uint needed;            /* bytes needed (optional) */
 };
 
+struct brcmf_bus {
+       u8 type;                /* bus type */
+       void *bus_priv;         /* pointer to bus private structure */
+};
+
 /* Forward decls for struct brcmf_pub (see below) */
-struct brcmf_bus;              /* device bus info */
+struct brcmf_sdio;             /* device bus info */
 struct brcmf_proto;    /* device communication protocol info */
 struct brcmf_info;     /* device driver info */
 struct brcmf_cfg80211_dev; /* cfg80211 device info */
@@ -580,7 +585,7 @@ struct brcmf_cfg80211_dev; /* cfg80211 device info */
 /* Common structure for module and instance linkage */
 struct brcmf_pub {
        /* Linkage ponters */
-       struct brcmf_bus *bus;
+       struct brcmf_sdio *bus;
        struct brcmf_proto *prot;
        struct brcmf_info *info;
        struct brcmf_cfg80211_dev *config;
@@ -681,7 +686,7 @@ extern uint brcmf_c_mkiovar(char *name, char *data, uint datalen,
  * Returned structure should have bus and prot pointers filled in.
  * bus_hdrlen specifies required headroom for bus module header.
  */
-extern struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus,
+extern struct brcmf_pub *brcmf_attach(struct brcmf_sdio *bus,
                                      uint bus_hdrlen);
 extern int brcmf_net_attach(struct brcmf_pub *drvr, int idx);
 extern int brcmf_netdev_wait_pend8021x(struct net_device *ndev);
@@ -699,7 +704,16 @@ extern bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q,
 
 /* Receive frame for delivery to OS.  Callee disposes of rxp. */
 extern void brcmf_rx_frame(struct brcmf_pub *drvr, int ifidx,
-                        struct sk_buff *rxp, int numpkt);
+                          struct sk_buff_head *rxlist);
+static inline void brcmf_rx_packet(struct brcmf_pub *drvr, int ifidx,
+                                  struct sk_buff *pkt)
+{
+       struct sk_buff_head q;
+
+       skb_queue_head_init(&q);
+       skb_queue_tail(&q, pkt);
+       brcmf_rx_frame(drvr, ifidx, &q);
+}
 
 /* Return pointer to interface name */
 extern char *brcmf_ifname(struct brcmf_pub *drvr, int idx);
@@ -724,8 +738,6 @@ extern int brcmf_c_host_event(struct brcmf_info *drvr_priv, int *idx,
                              void *pktdata, struct brcmf_event_msg *,
                              void **data_ptr);
 
-extern void brcmf_c_init(void);
-
 extern int brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx,
                        char *name, u8 *mac_addr);
 extern void brcmf_del_if(struct brcmf_info *drvr_priv, int ifidx);