aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/eth_media.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/eth_media.c')
-rw-r--r--net/tipc/eth_media.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c
index 6e988ba485fd..b69092eb95d8 100644
--- a/net/tipc/eth_media.c
+++ b/net/tipc/eth_media.c
@@ -34,12 +34,8 @@
34 * POSSIBILITY OF SUCH DAMAGE. 34 * POSSIBILITY OF SUCH DAMAGE.
35 */ 35 */
36 36
37#include <net/tipc/tipc.h> 37#include "core.h"
38#include <net/tipc/tipc_bearer.h> 38#include "bearer.h"
39#include <net/tipc/tipc_msg.h>
40#include <linux/netdevice.h>
41#include <linux/slab.h>
42#include <net/net_namespace.h>
43 39
44#define MAX_ETH_BEARERS 2 40#define MAX_ETH_BEARERS 2
45#define ETH_LINK_PRIORITY TIPC_DEF_LINK_PRI 41#define ETH_LINK_PRIORITY TIPC_DEF_LINK_PRI
@@ -60,7 +56,7 @@ struct eth_bearer {
60}; 56};
61 57
62static struct eth_bearer eth_bearers[MAX_ETH_BEARERS]; 58static struct eth_bearer eth_bearers[MAX_ETH_BEARERS];
63static int eth_started = 0; 59static int eth_started;
64static struct notifier_block notifier; 60static struct notifier_block notifier;
65 61
66/** 62/**
@@ -148,7 +144,7 @@ static int enable_bearer(struct tipc_bearer *tb_ptr)
148 144
149 /* Find device with specified name */ 145 /* Find device with specified name */
150 146
151 for_each_netdev(&init_net, pdev){ 147 for_each_netdev(&init_net, pdev) {
152 if (!strncmp(pdev->name, driver_name, IFNAMSIZ)) { 148 if (!strncmp(pdev->name, driver_name, IFNAMSIZ)) {
153 dev = pdev; 149 dev = pdev;
154 break; 150 break;
@@ -159,7 +155,8 @@ static int enable_bearer(struct tipc_bearer *tb_ptr)
159 155
160 /* Find Ethernet bearer for device (or create one) */ 156 /* Find Ethernet bearer for device (or create one) */
161 157
162 for (;(eb_ptr != stop) && eb_ptr->dev && (eb_ptr->dev != dev); eb_ptr++); 158 while ((eb_ptr != stop) && eb_ptr->dev && (eb_ptr->dev != dev))
159 eb_ptr++;
163 if (eb_ptr == stop) 160 if (eb_ptr == stop)
164 return -EDQUOT; 161 return -EDQUOT;
165 if (!eb_ptr->dev) { 162 if (!eb_ptr->dev) {