summaryrefslogtreecommitdiffstats
path: root/driver/include/mostcore.h
diff options
context:
space:
mode:
Diffstat (limited to 'driver/include/mostcore.h')
-rw-r--r--driver/include/mostcore.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/driver/include/mostcore.h b/driver/include/mostcore.h
index 5f8339b..dc87121 100644
--- a/driver/include/mostcore.h
+++ b/driver/include/mostcore.h
@@ -23,8 +23,9 @@
#define __MOST_CORE_H__
#include <linux/types.h>
+#include <linux/kobject.h> /* struct kobj_type */
+#include <linux/sysfs.h> /* struct attribute */
-struct kobject;
struct module;
/**
@@ -141,6 +142,7 @@ struct most_channel_config {
u16 extra_len;
u16 subbuffer_size;
u16 packets_per_xact;
+ u16 dbr_size;
};
/*
@@ -233,20 +235,31 @@ struct mbo {
* The callback returns a negative value on error, otherwise 0.
* @request_netinfo: triggers retrieving of network info from the HDM by
* means of "Message exchange over MDP/MEP"
+ * The call of the function request_netinfo with the parameter on_netinfo as
+ * NULL prohibits use of the previously obtained function pointer.
* @priv Private field used by mostcore to store context information.
*/
struct most_interface {
struct module *mod;
+ struct device *dev;
enum most_interface_type interface;
const char *description;
int num_channels;
struct most_channel_capability *channel_vector;
+ void *(*dma_alloc)(struct mbo *mbo, u32 size);
+ void (*dma_free)(struct mbo *mbo, u32 size);
int (*configure)(struct most_interface *iface, int channel_idx,
struct most_channel_config *channel_config);
int (*enqueue)(struct most_interface *iface, int channel_idx,
struct mbo *mbo);
int (*poison_channel)(struct most_interface *iface, int channel_idx);
- void (*request_netinfo)(struct most_interface *iface, int channel_idx);
+ void (*request_netinfo)(struct most_interface *iface, int channel_idx,
+ void (*on_netinfo)(struct most_interface *iface,
+ unsigned char link_stat,
+ unsigned char *mac_addr));
+ struct attribute *attrs[14];
+ struct kobj_type ktype;
+ enum { NONE_ATTRS /* default */, XACT_ATTRS, DBR_ATTRS } extra_attrs;
void *priv;
};