staging: hv: change rndis_filter_device_remove() to void return type
[deliverable/linux.git] / drivers / staging / hv / hyperv_net.h
index 03aa88592fd15adff08beef96ce037f12372db99..6226dd343f00b46f167a2412ea115e14b556b92a 100644 (file)
@@ -81,38 +81,10 @@ struct hv_netvsc_packet {
        struct hv_page_buffer page_buf[NETVSC_PACKET_MAXPAGE];
 };
 
-/* Represents the net vsc driver */
-struct netvsc_driver {
-       /* Must be the first field */
-       /* Which is a bug FIXME! */
-       struct hv_driver base;
-
-       u32 ring_buf_size;
-       u32 req_ext_size;
-
-       /*
-        * This is set by the caller to allow us to callback when we
-        * receive a packet from the "wire"
-        */
-       int (*recv_cb)(struct hv_device *dev,
-                                struct hv_netvsc_packet *packet);
-       void (*link_status_change)(struct hv_device *dev, u32 status);
-
-       /* Specific to this driver */
-       int (*send)(struct hv_device *dev, struct hv_netvsc_packet *packet);
-
-};
-
-static inline
-struct netvsc_driver *drv_to_netvscdrv(struct device_driver *d)
-{
-       struct hv_driver *hvdrv = drv_to_hv_drv(d);
-       return container_of(hvdrv, struct netvsc_driver, base);
-}
-
 struct netvsc_device_info {
        unsigned char mac_adr[6];
        bool link_state;        /* 0 - link up, 1 - link down */
+       int  ring_size;
 };
 
 /* Interface */
@@ -120,15 +92,23 @@ int netvsc_device_add(struct hv_device *device, void *additional_info);
 int netvsc_device_remove(struct hv_device *device);
 int netvsc_send(struct hv_device *device,
                struct hv_netvsc_packet *packet);
+void netvsc_linkstatus_callback(struct hv_device *device_obj,
+                               unsigned int status);
+int netvsc_recv_callback(struct hv_device *device_obj,
+                       struct hv_netvsc_packet *packet);
 int netvsc_initialize(struct hv_driver *drv);
 int rndis_filter_open(struct hv_device *dev);
 int rndis_filter_close(struct hv_device *dev);
 int rndis_filte_device_add(struct hv_device *dev,
                        void *additional_info);
-int rndis_filter_device_remove(struct hv_device *dev);
+void rndis_filter_device_remove(struct hv_device *dev);
+int rndis_filter_receive(struct hv_device *dev,
+                       struct hv_netvsc_packet *pkt);
 
 
 
+int rndis_filter_send(struct hv_device *dev,
+                       struct hv_netvsc_packet *pkt);
 
 #define NVSP_INVALID_PROTOCOL_VERSION  ((u32)0xFFFFFFFF)
 
@@ -1022,6 +1002,13 @@ struct rndis_message {
        union rndis_message_container msg;
 };
 
+
+struct rndis_filter_packet {
+       void *completion_ctx;
+       void (*completion)(void *context);
+       struct rndis_message msg;
+};
+
 /* Handy macros */
 
 /* get the size of an RNDIS message. Pass in the message type, */
@@ -1076,8 +1063,5 @@ struct rndis_message {
 #define NDIS_PACKET_TYPE_MAC_FRAME     0x00000800
 
 
-/* Interface */
-
-extern int rndis_filter_init(struct netvsc_driver *driver);
 
 #endif /* _HYPERV_NET_H */
This page took 0.028224 seconds and 5 git commands to generate.