aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/caif/caif_dev.h
diff options
context:
space:
mode:
authorsjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com>2011-05-13 02:44:05 +0000
committerDavid S. Miller <davem@davemloft.net>2011-05-15 17:45:55 -0400
commitbee925db9a77a5736596dcf6f91d0879f5ee915b (patch)
tree57a3b499d5b8ec3cb9d36be674e165fa1e7eed42 /include/net/caif/caif_dev.h
parentcaif: Protected in-flight packets using dev or sock refcont. (diff)
downloadwireguard-linux-bee925db9a77a5736596dcf6f91d0879f5ee915b.tar.xz
wireguard-linux-bee925db9a77a5736596dcf6f91d0879f5ee915b.zip
caif: prepare support for namespaces
Use struct net to reference CAIF configuration object instead of static variables. Refactor functions caif_connect_client, caif_disconnect_client and squach files cfcnfg.c and caif_config_utils. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/caif/caif_dev.h')
-rw-r--r--include/net/caif/caif_dev.h24
1 files changed, 6 insertions, 18 deletions
diff --git a/include/net/caif/caif_dev.h b/include/net/caif/caif_dev.h
index 6638435525fc..c011281d92c0 100644
--- a/include/net/caif/caif_dev.h
+++ b/include/net/caif/caif_dev.h
@@ -11,6 +11,7 @@
#include <net/caif/cfcnfg.h>
#include <linux/caif/caif_socket.h>
#include <linux/if.h>
+#include <linux/net.h>
/**
* struct caif_param - CAIF parameters.
@@ -62,16 +63,18 @@ struct caif_connect_request {
* E.g. CAIF Socket will call this function for each socket it connects
* and have one client_layer instance for each socket.
*/
-int caif_connect_client(struct caif_connect_request *conn_req,
+int caif_connect_client(struct net *net,
+ struct caif_connect_request *conn_req,
struct cflayer *client_layer, int *ifindex,
int *headroom, int *tailroom);
/**
* caif_disconnect_client - Disconnects a client from the CAIF stack.
*
- * @client_layer: Client layer to be removed.
+ * @client_layer: Client layer to be disconnected.
*/
-int caif_disconnect_client(struct cflayer *client_layer);
+int caif_disconnect_client(struct net *net, struct cflayer *client_layer);
+
/**
* caif_client_register_refcnt - register ref-count functions provided by client.
@@ -91,21 +94,6 @@ void caif_client_register_refcnt(struct cflayer *adapt_layer,
void (*hold)(struct cflayer *lyr),
void (*put)(struct cflayer *lyr));
/**
- * caif_connect_req_to_link_param - Translate configuration parameters
- * from socket format to internal format.
- * @cnfg: Pointer to configuration handler
- * @con_req: Configuration parameters supplied in function
- * caif_connect_client
- * @channel_setup_param: Parameters supplied to the CAIF Core stack for
- * setting up channels.
- *
- */
-
-int caif_connect_req_to_link_param(struct cfcnfg *cnfg,
- struct caif_connect_request *con_req,
- struct cfctrl_link_param *setup_param);
-
-/**
* caif_free_client - Free memory used to manage the client in the CAIF Stack.
*
* @client_layer: Client layer to be removed.