Lines Matching refs:ax25_dev
43 ax25_dev *ax25_dev_list;
45 ax25_dev *ax25_dev_ax25dev(struct net_device *dev) in ax25_dev_ax25dev()
47 ax25_dev *ax25_dev; in ax25_dev_ax25dev() local
49 for (ax25_dev = ax25_dev_list; ax25_dev != NULL; ax25_dev = ax25_dev->next) in ax25_dev_ax25dev()
50 if (ax25_dev->dev == dev) in ax25_dev_ax25dev()
51 return ax25_dev; in ax25_dev_ax25dev()
56 ax25_dev *ax25_addr_ax25dev(ax25_address *addr) in ax25_addr_ax25dev()
58 ax25_dev *ax25_dev; in ax25_addr_ax25dev() local
60 for (ax25_dev = ax25_dev_list; ax25_dev != NULL; ax25_dev = ax25_dev->next) in ax25_addr_ax25dev()
61 if (ax25cmp(addr, (ax25_address *)ax25_dev->dev->dev_addr) == 0) in ax25_addr_ax25dev()
62 return ax25_dev; in ax25_addr_ax25dev()
73 ax25_dev *ax25_dev; in ax25_dev_device_up() local
76 if ((ax25_dev = kmalloc(sizeof(*ax25_dev), GFP_ATOMIC)) == NULL) { in ax25_dev_device_up()
83 memset(ax25_dev, 0x00, sizeof(*ax25_dev)); in ax25_dev_device_up()
85 ax25_dev->dev = dev; in ax25_dev_device_up()
86 ax25_dev->forward = NULL; in ax25_dev_device_up()
88 ax25_dev->values[AX25_VALUES_IPDEFMODE] = AX25_DEF_IPDEFMODE; in ax25_dev_device_up()
89 ax25_dev->values[AX25_VALUES_AXDEFMODE] = AX25_DEF_AXDEFMODE; in ax25_dev_device_up()
90 ax25_dev->values[AX25_VALUES_BACKOFF] = AX25_DEF_BACKOFF; in ax25_dev_device_up()
91 ax25_dev->values[AX25_VALUES_CONMODE] = AX25_DEF_CONMODE; in ax25_dev_device_up()
92 ax25_dev->values[AX25_VALUES_WINDOW] = AX25_DEF_WINDOW; in ax25_dev_device_up()
93 ax25_dev->values[AX25_VALUES_EWINDOW] = AX25_DEF_EWINDOW; in ax25_dev_device_up()
94 ax25_dev->values[AX25_VALUES_T1] = AX25_DEF_T1; in ax25_dev_device_up()
95 ax25_dev->values[AX25_VALUES_T2] = AX25_DEF_T2; in ax25_dev_device_up()
96 ax25_dev->values[AX25_VALUES_T3] = AX25_DEF_T3; in ax25_dev_device_up()
97 ax25_dev->values[AX25_VALUES_IDLE] = AX25_DEF_IDLE; in ax25_dev_device_up()
98 ax25_dev->values[AX25_VALUES_N2] = AX25_DEF_N2; in ax25_dev_device_up()
99 ax25_dev->values[AX25_VALUES_PACLEN] = AX25_DEF_PACLEN; in ax25_dev_device_up()
100 ax25_dev->values[AX25_VALUES_PROTOCOL] = AX25_DEF_PROTOCOL; in ax25_dev_device_up()
101 ax25_dev->values[AX25_VALUES_DS_TIMEOUT]= AX25_DEF_DS_TIMEOUT; in ax25_dev_device_up()
104 ax25_dev->next = ax25_dev_list; in ax25_dev_device_up()
105 ax25_dev_list = ax25_dev; in ax25_dev_device_up()
113 ax25_dev *s, *ax25_dev; in ax25_dev_device_down() local
116 if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) in ax25_dev_device_down()
124 ax25_ds_del_timer(ax25_dev); in ax25_dev_device_down()
134 if ((s = ax25_dev_list) == ax25_dev) { in ax25_dev_device_down()
137 kfree(ax25_dev); in ax25_dev_device_down()
143 if (s->next == ax25_dev) { in ax25_dev_device_down()
144 s->next = ax25_dev->next; in ax25_dev_device_down()
146 kfree(ax25_dev); in ax25_dev_device_down()
160 ax25_dev *ax25_dev, *fwd_dev; in ax25_fwd_ioctl() local
162 if ((ax25_dev = ax25_addr_ax25dev(&fwd->port_from)) == NULL) in ax25_fwd_ioctl()
169 if (ax25_dev->forward != NULL) in ax25_fwd_ioctl()
171 ax25_dev->forward = fwd_dev->dev; in ax25_fwd_ioctl()
175 if (ax25_dev->forward == NULL) in ax25_fwd_ioctl()
177 ax25_dev->forward = NULL; in ax25_fwd_ioctl()
189 ax25_dev *ax25_dev; in ax25_fwd_dev() local
191 if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) in ax25_fwd_dev()
194 if (ax25_dev->forward == NULL) in ax25_fwd_dev()
197 return ax25_dev->forward; in ax25_fwd_dev()
205 ax25_dev *s, *ax25_dev = ax25_dev_list; in ax25_dev_free() local
207 while (ax25_dev != NULL) { in ax25_dev_free()
208 s = ax25_dev; in ax25_dev_free()
209 ax25_dev = ax25_dev->next; in ax25_dev_free()