summaryrefslogtreecommitdiffstats
path: root/include/net/caif/cfcnfg.h
diff options
context:
space:
mode:
authorsjur.brandeland@stericsson.com2011-05-13 04:44:05 +0200
committerDavid S. Miller2011-05-15 23:45:55 +0200
commitbee925db9a77a5736596dcf6f91d0879f5ee915b (patch)
tree57a3b499d5b8ec3cb9d36be674e165fa1e7eed42 /include/net/caif/cfcnfg.h
parentcaif: Protected in-flight packets using dev or sock refcont. (diff)
downloadkernel-qcow2-linux-bee925db9a77a5736596dcf6f91d0879f5ee915b.tar.gz
kernel-qcow2-linux-bee925db9a77a5736596dcf6f91d0879f5ee915b.tar.xz
kernel-qcow2-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/cfcnfg.h')
-rw-r--r--include/net/caif/cfcnfg.h71
1 files changed, 8 insertions, 63 deletions
diff --git a/include/net/caif/cfcnfg.h b/include/net/caif/cfcnfg.h
index e0a1eb5d7eaf..3e93a4a4b677 100644
--- a/include/net/caif/cfcnfg.h
+++ b/include/net/caif/cfcnfg.h
@@ -46,6 +46,12 @@ enum cfcnfg_phy_preference {
};
/**
+ * cfcnfg_create() - Get the CAIF configuration object given network.
+ * @net: Network for the CAIF configuration object.
+ */
+struct cfcnfg *get_cfcnfg(struct net *net);
+
+/**
* cfcnfg_create() - Create the CAIF configuration object.
*/
struct cfcnfg *cfcnfg_create(void);
@@ -65,17 +71,15 @@ void cfcnfg_remove(struct cfcnfg *cfg);
* @dev: Pointer to link layer device
* @phy_layer: Specify the physical layer. The transmit function
* MUST be set in the structure.
- * @phyid: The assigned physical ID for this layer, used in
- * cfcnfg_add_adapt_layer to specify PHY for the link.
* @pref: The phy (link layer) preference.
* @fcs: Specify if checksum is used in CAIF Framing Layer.
- * @stx: Specify if Start Of Frame extension is used.
+ * @stx: Specify if Start Of Frame eXtention is used.
*/
void
cfcnfg_add_phy_layer(struct cfcnfg *cnfg, enum cfcnfg_phy_type phy_type,
struct net_device *dev, struct cflayer *phy_layer,
- u16 *phyid, enum cfcnfg_phy_preference pref,
+ enum cfcnfg_phy_preference pref,
bool fcs, bool stx);
/**
@@ -88,65 +92,6 @@ cfcnfg_add_phy_layer(struct cfcnfg *cnfg, enum cfcnfg_phy_type phy_type,
int cfcnfg_del_phy_layer(struct cfcnfg *cnfg, struct cflayer *phy_layer);
/**
- * cfcnfg_disconn_adapt_layer - Disconnects an adaptation layer.
- *
- * @cnfg: Pointer to a CAIF configuration object, created by
- * cfcnfg_create().
- * @adap_layer: Adaptation layer to be removed.
- */
-int cfcnfg_disconn_adapt_layer(struct cfcnfg *cnfg,
- struct cflayer *adap_layer);
-
-/**
- * cfcnfg_release_adap_layer - Used by client to release the adaptation layer.
- *
- * @adap_layer: Adaptation layer.
- */
-void cfcnfg_release_adap_layer(struct cflayer *adap_layer);
-
-/**
- * cfcnfg_add_adaptation_layer - Add an adaptation layer to the CAIF stack.
- *
- * The adaptation Layer is where the interface to application or higher-level
- * driver functionality is implemented.
- *
- * @cnfg: Pointer to a CAIF configuration object, created by
- * cfcnfg_create().
- * @param: Link setup parameters.
- * @adap_layer: Specify the adaptation layer; the receive and
- * flow-control functions MUST be set in the structure.
- * @ifindex: Link layer interface index used for this connection.
- * @proto_head: Protocol head-space needed by CAIF protocol,
- * excluding link layer.
- * @proto_tail: Protocol tail-space needed by CAIF protocol,
- * excluding link layer.
- */
-int cfcnfg_add_adaptation_layer(struct cfcnfg *cnfg,
- struct cfctrl_link_param *param,
- struct cflayer *adap_layer,
- int *ifindex,
- int *proto_head,
- int *proto_tail);
-
-/**
- * cfcnfg_get_phyid() - Get physical ID, given type.
- * Returns one of the physical interfaces matching the given type.
- * Zero if no match is found.
- * @cnfg: Configuration object
- * @phy_pref: Caif Link Layer preference
- */
-struct dev_info *cfcnfg_get_phyid(struct cfcnfg *cnfg,
- enum cfcnfg_phy_preference phy_pref);
-
-/**
- * cfcnfg_get_id_from_ifi() - Get the Physical Identifier of ifindex,
- * it matches caif physical id with the kernel interface id.
- * @cnfg: Configuration object
- * @ifi: ifindex obtained from socket.c bindtodevice.
- */
-int cfcnfg_get_id_from_ifi(struct cfcnfg *cnfg, int ifi);
-
-/**
* cfcnfg_set_phy_state() - Set the state of the physical interface device.
* @cnfg: Configuration object
* @phy_layer: Physical Layer representation