FunkyLoiso / wl500g

Automatically exported from code.google.com/p/wl500g
0 stars 0 forks source link

High Resolution timers support #440

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Can you add to kernel build config this line
CONFIG_HIGH_RES_TIMERS=y

I check hrtimer support on my RT-N16 and it seems use of hrtimer not possible.

Or this option already included in config, but not supported by hardware(CPU)?

[admin@RT-N16 pkgs]$ cat /proc/timer_list
Timer List Version: v0.3
HRTIMER_MAX_CLOCK_BASES: 2
now at 71506154312837 nsecs

cpu: 0
 clock 0:
  .index:      0
  .resolution: 1000000 nsecs
  .get_time:   ktime_get_real
active timers:
 clock 1:
  .index:      1
  .resolution: 1000000 nsecs
  .get_time:   ktime_get

Original issue reported on code.google.com by artyom.m...@gmail.com on 4 Apr 2014 at 1:27

GoogleCodeExporter commented 9 years ago
It is limitation of ancient 2.6.22 kernel - generic HR timers for MIPS not 
implemented.

So, this task requires some backports from kernel upstream. I'm done initial 
draft of HR timers support some time ago, but it completely untested and 
suitable for kernel hackers only.

Original comment by lly.dev on 7 Apr 2014 at 9:57

GoogleCodeExporter commented 9 years ago
Can i test it?

Original comment by artyom.m...@gmail.com on 14 Apr 2014 at 8:54

GoogleCodeExporter commented 9 years ago
Yes, if you are able to compile/build firmware yourself.

Original comment by lly.dev on 21 Apr 2014 at 7:07

GoogleCodeExporter commented 9 years ago
Kernel with your changes located in main trunk?

Original comment by artyom.m...@gmail.com on 21 Apr 2014 at 6:41

GoogleCodeExporter commented 9 years ago
No. Just for now, it is set of standalone patches, which you have to apply 
against kernel tree. After, set CONFIG_HIGH_RES_TIMERS=y, make kernel & 
firmware.

Original comment by lly.dev on 22 Apr 2014 at 8:36

GoogleCodeExporter commented 9 years ago
Ok, where can i get this patches?

Original comment by artyom.m...@gmail.com on 22 Apr 2014 at 8:38

GoogleCodeExporter commented 9 years ago
Just found some time to do basic tests. Unfortunately, some patches cause 
kernel freeze.

So, I attach first part of patches bundle that boots well on my RT-N16, at 
least.

Original comment by lly.dev on 24 Apr 2014 at 6:12

Attachments:

GoogleCodeExporter commented 9 years ago
I applied your patches to kernel and build firmware. Router booted normal and 
now hrtimers supported. But... wi-fi authorization not working, only open 
system allows you to connect with router. I tried WPA, WPA2 personal with 
TKIP+AES and AES encryption, but it doesn't worked.
I not found any log errors in dmesg or syslog. May be need to look in another 
places?

Original comment by artyom.m...@gmail.com on 29 Apr 2014 at 9:11

GoogleCodeExporter commented 9 years ago
Sad news. It means that Wi-Fi driver blob wl.ko incompatible with hrtimers. 
Broadcom don't want to open the sources, so it is impossible to fix situation :(

Original comment by lly.dev on 30 Apr 2014 at 8:19

GoogleCodeExporter commented 9 years ago
It's strange... for check, i rebuild firmware without hrtimer patches... may be 
i make a mistake somewhere

Original comment by artyom.m...@gmail.com on 30 Apr 2014 at 8:38

GoogleCodeExporter commented 9 years ago
So, i rebuild firmware twice and no changes. It's definely hrtimer patches.
What about this driver http://www.broadcom.com/docs/linux_sta/README.txt ? He 
seems more newer

Original comment by artyom.m...@gmail.com on 30 Apr 2014 at 11:42

GoogleCodeExporter commented 9 years ago
Please read wl500g.info forum, for example, about Broadcom SDK.
Link you provided, contain:
1) STA driver only 
2) no support for specific Wi-Fi router's chip

About patches - I will take a look. Another problem - wl.ko blob don't work in 
case of some kernel structures change size(struct sk_buff, for example). Even 
if new fields are unused.

Original comment by lly.dev on 6 May 2014 at 7:08