.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright(c) 2004-2005 Intel Corporation. All rights reserved. |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify it |
---|
5 | | - * under the terms of the GNU General Public License as published by the |
---|
6 | | - * Free Software Foundation; either version 2 of the License, or |
---|
7 | | - * (at your option) any later version. |
---|
8 | | - * |
---|
9 | | - * This program is distributed in the hope that it will be useful, but |
---|
10 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
---|
11 | | - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
---|
12 | | - * for more details. |
---|
13 | | - * |
---|
14 | | - * You should have received a copy of the GNU General Public License along |
---|
15 | | - * with this program; if not, see <http://www.gnu.org/licenses/>. |
---|
16 | | - * |
---|
17 | | - * The full GNU General Public License is included in this distribution in the |
---|
18 | | - * file called LICENSE. |
---|
19 | | - * |
---|
20 | 4 | */ |
---|
21 | 5 | |
---|
22 | 6 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
---|
.. | .. |
---|
342 | 326 | } |
---|
343 | 327 | static DEVICE_ATTR(updelay, 0644, |
---|
344 | 328 | bonding_show_updelay, bonding_sysfs_store_option); |
---|
| 329 | + |
---|
| 330 | +static ssize_t bonding_show_peer_notif_delay(struct device *d, |
---|
| 331 | + struct device_attribute *attr, |
---|
| 332 | + char *buf) |
---|
| 333 | +{ |
---|
| 334 | + struct bonding *bond = to_bond(d); |
---|
| 335 | + |
---|
| 336 | + return sprintf(buf, "%d\n", |
---|
| 337 | + bond->params.peer_notif_delay * bond->params.miimon); |
---|
| 338 | +} |
---|
| 339 | +static DEVICE_ATTR(peer_notif_delay, 0644, |
---|
| 340 | + bonding_show_peer_notif_delay, bonding_sysfs_store_option); |
---|
345 | 341 | |
---|
346 | 342 | /* Show the LACP interval. */ |
---|
347 | 343 | static ssize_t bonding_show_lacp(struct device *d, |
---|
.. | .. |
---|
734 | 730 | &dev_attr_arp_ip_target.attr, |
---|
735 | 731 | &dev_attr_downdelay.attr, |
---|
736 | 732 | &dev_attr_updelay.attr, |
---|
| 733 | + &dev_attr_peer_notif_delay.attr, |
---|
737 | 734 | &dev_attr_lacp_rate.attr, |
---|
738 | 735 | &dev_attr_ad_select.attr, |
---|
739 | 736 | &dev_attr_xmit_hash_policy.attr, |
---|