Lines Matching refs:ax25_dev
32 ax25_dev *ax25_dev_list;
35 ax25_dev *ax25_addr_ax25dev(ax25_address *addr) in ax25_addr_ax25dev()
37 ax25_dev *ax25_dev, *res = NULL; in ax25_addr_ax25dev() local
40 for (ax25_dev = ax25_dev_list; ax25_dev != NULL; ax25_dev = ax25_dev->next) in ax25_addr_ax25dev()
41 if (ax25cmp(addr, (ax25_address *)ax25_dev->dev->dev_addr) == 0) { in ax25_addr_ax25dev()
42 res = ax25_dev; in ax25_addr_ax25dev()
55 ax25_dev *ax25_dev; in ax25_dev_device_up() local
57 if ((ax25_dev = kzalloc(sizeof(*ax25_dev), GFP_ATOMIC)) == NULL) { 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()
65 ax25_dev->forward = NULL; in ax25_dev_device_up()
67 ax25_dev->values[AX25_VALUES_IPDEFMODE] = AX25_DEF_IPDEFMODE; in ax25_dev_device_up()
68 ax25_dev->values[AX25_VALUES_AXDEFMODE] = AX25_DEF_AXDEFMODE; in ax25_dev_device_up()
69 ax25_dev->values[AX25_VALUES_BACKOFF] = AX25_DEF_BACKOFF; in ax25_dev_device_up()
70 ax25_dev->values[AX25_VALUES_CONMODE] = AX25_DEF_CONMODE; in ax25_dev_device_up()
71 ax25_dev->values[AX25_VALUES_WINDOW] = AX25_DEF_WINDOW; in ax25_dev_device_up()
72 ax25_dev->values[AX25_VALUES_EWINDOW] = AX25_DEF_EWINDOW; in ax25_dev_device_up()
73 ax25_dev->values[AX25_VALUES_T1] = AX25_DEF_T1; in ax25_dev_device_up()
74 ax25_dev->values[AX25_VALUES_T2] = AX25_DEF_T2; in ax25_dev_device_up()
75 ax25_dev->values[AX25_VALUES_T3] = AX25_DEF_T3; in ax25_dev_device_up()
76 ax25_dev->values[AX25_VALUES_IDLE] = AX25_DEF_IDLE; in ax25_dev_device_up()
77 ax25_dev->values[AX25_VALUES_N2] = AX25_DEF_N2; in ax25_dev_device_up()
78 ax25_dev->values[AX25_VALUES_PACLEN] = AX25_DEF_PACLEN; in ax25_dev_device_up()
79 ax25_dev->values[AX25_VALUES_PROTOCOL] = AX25_DEF_PROTOCOL; in ax25_dev_device_up()
80 ax25_dev->values[AX25_VALUES_DS_TIMEOUT]= AX25_DEF_DS_TIMEOUT; in ax25_dev_device_up()
83 ax25_ds_setup_timer(ax25_dev); in ax25_dev_device_up()
87 ax25_dev->next = ax25_dev_list; in ax25_dev_device_up()
88 ax25_dev_list = ax25_dev; in ax25_dev_device_up()
91 ax25_register_dev_sysctl(ax25_dev); in ax25_dev_device_up()
96 ax25_dev *s, *ax25_dev; in ax25_dev_device_down() local
98 if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) in ax25_dev_device_down()
101 ax25_unregister_dev_sysctl(ax25_dev); in ax25_dev_device_down()
106 ax25_ds_del_timer(ax25_dev); in ax25_dev_device_down()
116 if ((s = ax25_dev_list) == ax25_dev) { in ax25_dev_device_down()
121 kfree(ax25_dev); in ax25_dev_device_down()
126 if (s->next == ax25_dev) { in ax25_dev_device_down()
127 s->next = ax25_dev->next; in ax25_dev_device_down()
131 kfree(ax25_dev); in ax25_dev_device_down()
143 ax25_dev *ax25_dev, *fwd_dev; in ax25_fwd_ioctl() local
145 if ((ax25_dev = ax25_addr_ax25dev(&fwd->port_from)) == NULL) in ax25_fwd_ioctl()
152 if (ax25_dev->forward != NULL) in ax25_fwd_ioctl()
154 ax25_dev->forward = fwd_dev->dev; in ax25_fwd_ioctl()
158 if (ax25_dev->forward == NULL) in ax25_fwd_ioctl()
160 ax25_dev->forward = NULL; in ax25_fwd_ioctl()
172 ax25_dev *ax25_dev; in ax25_fwd_dev() local
174 if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) in ax25_fwd_dev()
177 if (ax25_dev->forward == NULL) in ax25_fwd_dev()
180 return ax25_dev->forward; in ax25_fwd_dev()
188 ax25_dev *s, *ax25_dev; in ax25_dev_free() local
191 ax25_dev = ax25_dev_list; in ax25_dev_free()
192 while (ax25_dev != NULL) { in ax25_dev_free()
193 s = ax25_dev; in ax25_dev_free()
194 dev_put(ax25_dev->dev); in ax25_dev_free()
195 ax25_dev = ax25_dev->next; in ax25_dev_free()