|
@@ -46,14 +46,20 @@ struct list_head net_devices = LIST_HEAD_INIT ( net_devices );
|
46
|
46
|
/** List of open network devices, in reverse order of opening */
|
47
|
47
|
static struct list_head open_net_devices = LIST_HEAD_INIT ( open_net_devices );
|
48
|
48
|
|
49
|
|
-/** Default link status code */
|
|
49
|
+/** Default unknown link status code */
|
50
|
50
|
#define EUNKNOWN_LINK_STATUS __einfo_error ( EINFO_EUNKNOWN_LINK_STATUS )
|
51
|
51
|
#define EINFO_EUNKNOWN_LINK_STATUS \
|
52
|
52
|
__einfo_uniqify ( EINFO_EINPROGRESS, 0x01, "Unknown" )
|
53
|
53
|
|
54
|
|
-/** Human-readable message for the default link status */
|
|
54
|
+/** Default link-down status code */
|
|
55
|
+#define ENOTCONN_LINK_DOWN __einfo_error ( EINFO_ENOTCONN_LINK_DOWN )
|
|
56
|
+#define EINFO_ENOTCONN_LINK_DOWN \
|
|
57
|
+ __einfo_uniqify ( EINFO_ENOTCONN, 0x01, "Down" )
|
|
58
|
+
|
|
59
|
+/** Human-readable message for the default link statuses */
|
55
|
60
|
struct errortab netdev_errors[] __errortab = {
|
56
|
61
|
__einfo_errortab ( EINFO_EUNKNOWN_LINK_STATUS ),
|
|
62
|
+ __einfo_errortab ( EINFO_ENOTCONN_LINK_DOWN ),
|
57
|
63
|
};
|
58
|
64
|
|
59
|
65
|
/**
|
|
@@ -101,7 +107,7 @@ void netdev_link_down ( struct net_device *netdev ) {
|
101
|
107
|
*/
|
102
|
108
|
if ( ( netdev->link_rc == 0 ) ||
|
103
|
109
|
( netdev->link_rc == -EUNKNOWN_LINK_STATUS ) ) {
|
104
|
|
- netdev_link_err ( netdev, -ENOTCONN );
|
|
110
|
+ netdev_link_err ( netdev, -ENOTCONN_LINK_DOWN );
|
105
|
111
|
}
|
106
|
112
|
}
|
107
|
113
|
|