OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
Line 180... | Line 180... | |||
180 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0) |
180 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0) |
|
181 | ds->phys_port_mask : |
181 | ds->phys_port_mask : |
|
182 | #else |
182 | #else |
|
183 | ds->enabled_port_mask : |
183 | ds->enabled_port_mask : |
|
184 | #endif |
184 | #endif |
|
185 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0) |
- | ||
186 | (1 << ds->dst->cpu_port))); |
185 | (1 << ds->dst->cpu_port))); |
|
187 | #else |
- | ||
188 | (1 << ds->dst->cpu_dp->index))); |
- | ||
189 | #endif |
- | ||
Line 190... | Line 186... | |||
190 | |
186 | |
|
191 | /* |
187 | /* |
|
192 | * Port Association Vector: when learning source addresses |
188 | * Port Association Vector: when learning source addresses |
|
193 | * of packets, add the address to the address database using |
189 | * of packets, add the address to the address database using |
|
Line 277... | Line 273... | |||
277 | .set_addr = mv88e6063_set_addr, |
273 | .set_addr = mv88e6063_set_addr, |
|
278 | .phy_read = mv88e6063_phy_read, |
274 | .phy_read = mv88e6063_phy_read, |
|
279 | .phy_write = mv88e6063_phy_write, |
275 | .phy_write = mv88e6063_phy_write, |
|
280 | }; |
276 | }; |
|
Line 281... | Line -... | |||
281 | |
- | ||
282 | #if LINUX_VERSION_CODE > KERNEL_VERSION(4,13,0) |
- | ||
283 | static struct dsa_switch_driver mv88e6063_switch_drv = { |
- | ||
284 | .ops = &mv88e6063_switch_ops, |
- | ||
285 | }; |
- | ||
286 | #endif |
- | ||
287 | |
277 | |
|
288 | static int __init mv88e6063_init(void) |
278 | static int __init mv88e6063_init(void) |
|
289 | { |
- | ||
290 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0) |
279 | { |
|
291 | register_switch_driver(&mv88e6063_switch_ops); |
- | ||
292 | #else |
- | ||
293 | register_switch_driver(&mv88e6063_switch_drv); |
- | ||
294 | #endif |
280 | register_switch_driver(&mv88e6063_switch_ops); |
|
295 | return 0; |
281 | return 0; |
|
296 | } |
282 | } |
|
Line 297... | Line 283... | |||
297 | module_init(mv88e6063_init); |
283 | module_init(mv88e6063_init); |
|
298 | |
284 | |
|
299 | static void __exit mv88e6063_cleanup(void) |
- | ||
300 | { |
285 | static void __exit mv88e6063_cleanup(void) |
|
301 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0) |
- | ||
302 | unregister_switch_driver(&mv88e6063_switch_ops); |
- | ||
303 | #else |
- | ||
304 | unregister_switch_driver(&mv88e6063_switch_drv); |
286 | { |
|
305 | #endif |
287 | unregister_switch_driver(&mv88e6063_switch_ops); |