#define GB_SVC_TYPE_DME_PEER_SET 0x0a
#define GB_SVC_TYPE_ROUTE_CREATE 0x0b
#define GB_SVC_TYPE_ROUTE_DESTROY 0x0c
+#define GB_SVC_TYPE_LINK_CONFIG 0x0d
/*
* SVC version request/response has the same payload as
__le16 result_code;
} __packed;
+#define GB_SVC_LINK_CONFIG_BURST_PWM 0
+#define GB_SVC_LINK_CONFIG_BURST_HS_A 1
+#define GB_SVC_LINK_CONFIG_BURST_HS_B 2
+#define GB_SVC_LINK_CONFIG_FLAG_AUTO_SLEEP (1 << 0)
+
+struct gb_svc_link_config_request {
+ __u8 intf_id;
+ __u8 burst;
+ __u8 gear;
+ __u8 nlanes;
+ __u8 flags;
+} __packed;
+/* link config response has no payload */
+
/* Attributes for peer get/set operations */
#define DME_ATTR_SELECTOR_INDEX 0
#define DME_ATTR_T_TST_SRC_INCREMENT 0x4083
}
}
+/* Creates bi-directional routes between the devices */
+int gb_svc_link_config(struct gb_svc *svc, u8 intf_id,
+ unsigned int burst, unsigned int gear,
+ unsigned int nlanes, unsigned int flags)
+{
+ struct gb_svc_link_config_request request;
+
+ request.intf_id = intf_id;
+ request.burst = burst;
+ request.gear = gear;
+ request.nlanes = nlanes;
+ request.flags = flags;
+
+ return gb_operation_sync(svc->connection, GB_SVC_TYPE_LINK_CONFIG,
+ &request, sizeof(request), NULL, 0);
+}
+EXPORT_SYMBOL_GPL(gb_svc_link_config);
+
static int gb_svc_version_request(struct gb_operation *op)
{
struct gb_connection *connection = op->connection;
u32 *value);
int gb_svc_dme_peer_set(struct gb_svc *svc, u8 intf_id, u16 attr, u16 selector,
u32 value);
+int gb_svc_link_config(struct gb_svc *svc, u8 intf_id, unsigned int burst,
+ unsigned int gear, unsigned int nlanes,
+ unsigned int flags);
int gb_svc_protocol_init(void);
void gb_svc_protocol_exit(void);