Lines Matching refs:ax25_dev

29 ax25_dev *ax25_dev_list;
32 ax25_dev *ax25_addr_ax25dev(ax25_address *addr) in ax25_addr_ax25dev()
34 ax25_dev *ax25_dev, *res = NULL; in ax25_addr_ax25dev() local
37 for (ax25_dev = ax25_dev_list; ax25_dev != NULL; ax25_dev = ax25_dev->next) in ax25_addr_ax25dev()
38 if (ax25cmp(addr, (const ax25_address *)ax25_dev->dev->dev_addr) == 0) { in ax25_addr_ax25dev()
39 res = ax25_dev; in ax25_addr_ax25dev()
40 ax25_dev_hold(ax25_dev); in ax25_addr_ax25dev()
53 ax25_dev *ax25_dev; in ax25_dev_device_up() local
55 ax25_dev = kzalloc(sizeof(*ax25_dev), GFP_KERNEL); in ax25_dev_device_up()
56 if (!ax25_dev) { in ax25_dev_device_up()
61 refcount_set(&ax25_dev->refcount, 1); in ax25_dev_device_up()
62 dev->ax25_ptr = ax25_dev; in ax25_dev_device_up()
63 ax25_dev->dev = dev; in ax25_dev_device_up()
64 netdev_hold(dev, &ax25_dev->dev_tracker, GFP_KERNEL); in ax25_dev_device_up()
65 ax25_dev->forward = NULL; in ax25_dev_device_up()
66 ax25_dev->device_up = true; in ax25_dev_device_up()
68 ax25_dev->values[AX25_VALUES_IPDEFMODE] = AX25_DEF_IPDEFMODE; in ax25_dev_device_up()
69 ax25_dev->values[AX25_VALUES_AXDEFMODE] = AX25_DEF_AXDEFMODE; in ax25_dev_device_up()
70 ax25_dev->values[AX25_VALUES_BACKOFF] = AX25_DEF_BACKOFF; in ax25_dev_device_up()
71 ax25_dev->values[AX25_VALUES_CONMODE] = AX25_DEF_CONMODE; in ax25_dev_device_up()
72 ax25_dev->values[AX25_VALUES_WINDOW] = AX25_DEF_WINDOW; in ax25_dev_device_up()
73 ax25_dev->values[AX25_VALUES_EWINDOW] = AX25_DEF_EWINDOW; in ax25_dev_device_up()
74 ax25_dev->values[AX25_VALUES_T1] = AX25_DEF_T1; in ax25_dev_device_up()
75 ax25_dev->values[AX25_VALUES_T2] = AX25_DEF_T2; in ax25_dev_device_up()
76 ax25_dev->values[AX25_VALUES_T3] = AX25_DEF_T3; in ax25_dev_device_up()
77 ax25_dev->values[AX25_VALUES_IDLE] = AX25_DEF_IDLE; in ax25_dev_device_up()
78 ax25_dev->values[AX25_VALUES_N2] = AX25_DEF_N2; in ax25_dev_device_up()
79 ax25_dev->values[AX25_VALUES_PACLEN] = AX25_DEF_PACLEN; in ax25_dev_device_up()
80 ax25_dev->values[AX25_VALUES_PROTOCOL] = AX25_DEF_PROTOCOL; in ax25_dev_device_up()
81 ax25_dev->values[AX25_VALUES_DS_TIMEOUT]= AX25_DEF_DS_TIMEOUT; in ax25_dev_device_up()
84 ax25_ds_setup_timer(ax25_dev); in ax25_dev_device_up()
88 ax25_dev->next = ax25_dev_list; in ax25_dev_device_up()
89 ax25_dev_list = ax25_dev; in ax25_dev_device_up()
91 ax25_dev_hold(ax25_dev); in ax25_dev_device_up()
93 ax25_register_dev_sysctl(ax25_dev); in ax25_dev_device_up()
98 ax25_dev *s, *ax25_dev; in ax25_dev_device_down() local
100 if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) in ax25_dev_device_down()
103 ax25_unregister_dev_sysctl(ax25_dev); in ax25_dev_device_down()
108 ax25_ds_del_timer(ax25_dev); in ax25_dev_device_down()
118 if ((s = ax25_dev_list) == ax25_dev) { in ax25_dev_device_down()
124 if (s->next == ax25_dev) { in ax25_dev_device_down()
125 s->next = ax25_dev->next; in ax25_dev_device_down()
133 ax25_dev_put(ax25_dev); in ax25_dev_device_down()
138 ax25_dev_put(ax25_dev); in ax25_dev_device_down()
140 netdev_put(dev, &ax25_dev->dev_tracker); in ax25_dev_device_down()
141 ax25_dev_put(ax25_dev); in ax25_dev_device_down()
146 ax25_dev *ax25_dev, *fwd_dev; in ax25_fwd_ioctl() local
148 if ((ax25_dev = ax25_addr_ax25dev(&fwd->port_from)) == NULL) in ax25_fwd_ioctl()
155 ax25_dev_put(ax25_dev); in ax25_fwd_ioctl()
158 if (ax25_dev->forward) { in ax25_fwd_ioctl()
160 ax25_dev_put(ax25_dev); in ax25_fwd_ioctl()
163 ax25_dev->forward = fwd_dev->dev; in ax25_fwd_ioctl()
165 ax25_dev_put(ax25_dev); in ax25_fwd_ioctl()
169 if (!ax25_dev->forward) { in ax25_fwd_ioctl()
170 ax25_dev_put(ax25_dev); in ax25_fwd_ioctl()
173 ax25_dev->forward = NULL; in ax25_fwd_ioctl()
174 ax25_dev_put(ax25_dev); in ax25_fwd_ioctl()
178 ax25_dev_put(ax25_dev); in ax25_fwd_ioctl()
187 ax25_dev *ax25_dev; in ax25_fwd_dev() local
189 if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) in ax25_fwd_dev()
192 if (ax25_dev->forward == NULL) in ax25_fwd_dev()
195 return ax25_dev->forward; in ax25_fwd_dev()
203 ax25_dev *s, *ax25_dev; in ax25_dev_free() local
206 ax25_dev = ax25_dev_list; in ax25_dev_free()
207 while (ax25_dev != NULL) { in ax25_dev_free()
208 s = ax25_dev; in ax25_dev_free()
209 netdev_put(ax25_dev->dev, &ax25_dev->dev_tracker); in ax25_dev_free()
210 ax25_dev = ax25_dev->next; in ax25_dev_free()