summaryrefslogtreecommitdiffstats
path: root/driver/include
diff options
context:
space:
mode:
Diffstat (limited to 'driver/include')
-rw-r--r--driver/include/mostcore.h17
-rw-r--r--driver/include/networking.h21
2 files changed, 15 insertions, 23 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;
};
diff --git a/driver/include/networking.h b/driver/include/networking.h
deleted file mode 100644
index 6f346d4..0000000
--- a/driver/include/networking.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Networking AIM - Networking Application Interface Module for MostCore
- *
- * Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * This file is licensed under GPLv2.
- */
-#ifndef _NETWORKING_H_
-#define _NETWORKING_H_
-
-#include "mostcore.h"
-
-void most_deliver_netinfo(struct most_interface *iface,
- unsigned char link_stat, unsigned char *mac_addr);
-
-#endif