[packages] perf: correct section & category
[packages.git] / net / madwimax / patches / 001-fix_detection_on_be.patch
1 --- a/src/wimax.c
2 +++ b/src/wimax.c
3 @@ -133,19 +133,16 @@ static struct libusb_device_handle* find_wimax_device(void)
4         while (!found && (dev = devs[i++]) != NULL) {
5                 struct libusb_device_descriptor desc;
6                 unsigned int j = 0;
7 -               unsigned short dev_vid, dev_pid;
8  
9                 r = libusb_get_device_descriptor(dev, &desc);
10                 if (r < 0) {
11                         continue;
12                 }
13 -               dev_vid = libusb_le16_to_cpu(desc.idVendor);
14 -               dev_pid = libusb_le16_to_cpu(desc.idProduct);
15 -               wmlog_msg(1, "Bus %03d Device %03d: ID %04x:%04x", libusb_get_bus_number(dev), libusb_get_device_address(dev), dev_vid, dev_pid);
16 +               wmlog_msg(1, "Bus %03d Device %03d: ID %04x:%04x", libusb_get_bus_number(dev), libusb_get_device_address(dev), desc.idVendor, desc.idProduct);
17                 switch (match_method) {
18                         case MATCH_BY_LIST: {
19                                 for (j = 0; j < sizeof(wimax_dev_ids) / sizeof(usb_device_id_t); j++) {
20 -                                       if (dev_vid == wimax_dev_ids[j].vendorID && dev_pid == wimax_dev_ids[j].productID) {
21 +                                       if (desc.idVendor == wimax_dev_ids[j].vendorID && desc.idProduct == wimax_dev_ids[j].productID) {
22                                                 found = dev;
23                                                 break;
24                                         }
25 @@ -153,7 +150,7 @@ static struct libusb_device_handle* find_wimax_device(void)
26                                 break;
27                         }
28                         case MATCH_BY_VID_PID: {
29 -                               if (dev_vid == match_params.vid && dev_pid == match_params.pid) {
30 +                               if (desc.idVendor == match_params.vid && desc.idProduct == match_params.pid) {
31                                         found = dev;
32                                 }
33                                 break;