Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

user-ioctl.patch

By: a guest on Apr 30th, 2013  |  syntax: Diff  |  size: 1.59 KB  |  hits: 220  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff -aur old/src/wl/sys/wl_cfg80211.c new/src/wl/sys/wl_cfg80211.c
  2. --- old/src/wl/sys/wl_cfg80211.c        2011-10-23 03:56:55.000000000 +1100
  3. +++ new/src/wl/sys/wl_cfg80211.c        2012-05-24 18:43:17.324465658 +1000
  4. @@ -1466,7 +1466,10 @@
  5.                 scb_val.val = 0;
  6.                 err = wl_dev_ioctl(dev, WLC_GET_RSSI, &scb_val, sizeof(scb_val_t));
  7.                 if (err) {
  8. -                       WL_ERR(("Could not get rssi (%d)\n", err));
  9. +                       if (err != -EINVAL) {
  10. +                               // Don't fill syslog with EINVAL error
  11. +                               WL_ERR(("Could not get rssi (%d)\n", err));
  12. +                       }
  13.                         return err;
  14.                 }
  15.                 rssi = dtoh32(scb_val.val);
  16. diff -aur old/src/wl/sys/wl_linux.c new/src/wl/sys/wl_linux.c
  17. --- old/src/wl/sys/wl_linux.c   2011-10-23 03:56:55.000000000 +1100
  18. +++ new/src/wl/sys/wl_linux.c   2012-05-24 18:43:17.324465658 +1000
  19. @@ -1579,11 +1579,7 @@
  20.         }
  21.  
  22.         WL_LOCK(wl);
  23. -       if (!capable(CAP_NET_ADMIN)) {
  24. -               bcmerror = BCME_EPERM;
  25. -       } else {
  26. -               bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);
  27. -       }
  28. +       bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);
  29.         WL_UNLOCK(wl);
  30.  
  31.  done1:
  32. diff -aur old/src/wl/sys/wl_cfg80211.c new/src/wl/sys/wl_cfg80211.c.new
  33. --- old/src/wl/sys/wl_cfg80211.c        2013-04-30 18:21:18.190170600 +0300
  34. +++ new/src/wl/sys/wl_cfg80211.c.new    2013-04-30 18:33:04.516810699 +0300
  35. @@ -2073,7 +2073,11 @@
  36.                 ie = ies->data;
  37.                 ie_len = ies->len;
  38.                 beacon_interval = bss->beacon_interval;
  39. -               cfg80211_put_bss(bss);
  40. +               #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
  41. +               cfg80211_put_bss(bss);
  42. +       #else
  43. +               cfg80211_put_bss(wl_to_wiphy(wl), bss);
  44. +       #endif
  45.         }
  46.  
  47.         tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);