With our
LicenseChoice we need to ensure that GPL code is not mixed with double-licenced source file.
The files to review are for the ueagle-atm's driver ueagle.c , and to be compared to eagle-usb's following files : eu_main.c eu_utils.c
a diff may not be relevant...
Analysis / comparison of function by function :
- ueagle.c - static int uea_send_modem_cmd(struct usb_device *usb, u16 addr, u16 count, u8 * buff)
- eu_utils.c - int eu_cmd_to_modem (eu_instance_t *ins, uint32_t cmd, uint32_t idx, uint32_t count, uint8_t *data)
- variable xfer_buff is the only common point (not same type...), not same content nor size allocated
- structure of code is different (use of goto byebye in one case, not in the other)
- use of queue in eu_utils.c, use of msg in ueagle.c=> code is different (hum normal => they do not do the same things...)
- eu_utils.c - static int eu_send_modem_cmd (eu_instance_t *ins, uint16_t addr, uint16_t count, uint8_t *buff)
- use eu_instance_t *ins (instead of struct usb_device *usb)
- call to usb_control_msg is quite the same, one difference being that CTRL_TIMEOUT is not hardcoded in ueagle.c)
- ret is not managed in eu_utils.c whereas it is => structure of code is different, objects used are not the same, functions called are only similar
- ueagle.c - static int uea_load_firmware(struct usb_device *usb, unsigned int ver)
- eu_utils.c - int eu_load_firmware ( eu_instance_t *ins, uint32_t pid, unsigned int *ver )
- load a firmware-in-a-file in ueagle.c
- load a firmware-in-a-variable in eu_utils.c
- De-assert reset : well the mechanism to manage usb is the same, the commands are nearly identical, though the code structure is different : print success in ueagle.c (not in eu_util.c)=> code is different
- ueagle.c - static int uea_getesi(struct uea_softc *sc, u_char * esi) - get mac address
- eu_utils.c - void eu_get_mac_addr ( eu_instance_t *ins )
=> not the same code
- ueagle.c - static int uea_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) - display information
- eu_main.c - static int eu_read_proc ( char *page, char **start, off_t off, int count, int *eof, void *data)
- display is the same (hence same sprintf) - checksum of DSPcode could be added (see mail by ADI)
- ueagle.c does not use the same structure
- comments could be more meaningful in ueagle.c
- less states of modem are managed in ueagle.c (why ?)
- what is the overhead with 4K page in eu_main.c ? is it useful ?=> display functions are similar, structure of code is simpler in ueagle.c (rewritten)
- ueagle.c - static int __init uea_init(void)
- eu_main.c - static int __init eu_init (void)
- error message says /proc/driver/eagle-usb/ instead of ueagle-atm (after name changed) => correction needed (minor)
- module init code structure is standard (to be compared to other drivers)
- ueagle.c - static void __exit uea_exit(void)
- eu_main.c - static void __exit eu_exit (void)
- error management is different
- module exit code structure is standard
other functions to be compared ?!