|
@@ -34,8 +34,24 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
34
|
34
|
*
|
35
|
35
|
*/
|
36
|
36
|
|
|
37
|
+/**
|
|
38
|
+ * Close null interface
|
|
39
|
+ *
|
|
40
|
+ * @v intf Null interface
|
|
41
|
+ * @v rc Reason for close
|
|
42
|
+ */
|
|
43
|
+static void null_intf_close ( struct interface *intf __unused,
|
|
44
|
+ int rc __unused ) {
|
|
45
|
+
|
|
46
|
+ /* Do nothing. In particular, do not call intf_restart(),
|
|
47
|
+ * since that would result in an infinite loop.
|
|
48
|
+ */
|
|
49
|
+}
|
|
50
|
+
|
37
|
51
|
/** Null interface operations */
|
38
|
|
-static struct interface_operation null_intf_op[] = {};
|
|
52
|
+static struct interface_operation null_intf_op[] = {
|
|
53
|
+ INTF_OP ( intf_close, struct interface *, null_intf_close ),
|
|
54
|
+};
|
39
|
55
|
|
40
|
56
|
/** Null interface descriptor */
|
41
|
57
|
struct interface_descriptor null_intf_desc =
|
|
@@ -233,7 +249,8 @@ void intf_close ( struct interface *intf, int rc ) {
|
233
|
249
|
if ( op ) {
|
234
|
250
|
op ( object, rc );
|
235
|
251
|
} else {
|
236
|
|
- /* Default is to ignore intf_close() */
|
|
252
|
+ /* Default is to restart the interface */
|
|
253
|
+ intf_restart ( dest, rc );
|
237
|
254
|
}
|
238
|
255
|
|
239
|
256
|
intf_put ( dest );
|