[hackers] [slstatus][PATCH 1/2] wifi: use ipw2200 quadratic dBm->percent conversion

2024-07-30 Thread Joakim Sindholt
--- components/wifi.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/wifi.c b/components/wifi.c index 4543d32..dffb0df 100644 --- a/components/wifi.c +++ b/components/wifi.c @@ -9,10 +9,13 @@ #include "../slstatus.h" #include "../util.h" -#define RSS

[hackers] [slstatus][PATCH 2/2] wifi: switch to nl80211 interface

2024-07-30 Thread Joakim Sindholt
--- components/wifi.c | 267 -- 1 file changed, 210 insertions(+), 57 deletions(-) diff --git a/components/wifi.c b/components/wifi.c index dffb0df..d639cef 100644 --- a/components/wifi.c +++ b/components/wifi.c @@ -18,86 +18,239 @@ RSSI_TO_PERC(int rss

Re: [hackers] [slstatus][PATCH 1/2] wifi: use ipw2200 quadratic dBm->percent conversion

2024-07-30 Thread Страхиња Радић
Дана 24/07/30 10:15PM, Joakim Sindholt написа: > -#define RSSI_TO_PERC(rssi) \ > - rssi >= -50 ? 100 : \ > - (rssi <= -100 ? 0 : \ > - (2 * (rssi + 100))) > +static inline int > +RSSI_TO_PERC(int rssi) > +{ > + static const int best =

Re: [hackers] [slstatus][PATCH 1/2] wifi: use ipw2200 quadratic dBm->percent conversion

2024-07-30 Thread Joakim Sindholt
On Wed, 31 Jul 2024 08:08:37 +0200, Страхиња Радић wrote: > Дана 24/07/30 10:15PM, Joakim Sindholt написа: > > -#define RSSI_TO_PERC(rssi) \ > > - rssi >= -50 ? 100 : \ > > - (rssi <= -100 ? 0 : \ > > - (2 * (rssi + 100))) > > +static inline in