[PATCH v2] mac80211: limit MT7620 TX power based on eeprom calibration

2023-07-22 Thread Shiji Yang
From: Shiji Yang 

This patch adds basic TX power control for the MT7620 and limits its
maximum TX power. This can avoid the link speed decrease caused by
chip overheating.

Signed-off-by: Shiji Yang 
---
Changes since v1:
  * To avoid developers misunderstanding it, rename rt2800_config_alc() to
rt2800_config_alc_rt6352() since it's only used by RT6352(AKA MT7620).


 ...t-MT7620-TX-power-based-on-eeprom-ca.patch | 106 ++
 1 file changed, 106 insertions(+)
 create mode 100644 
package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch

diff --git 
a/package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch
 
b/package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch
new file mode 100644
index 00..fd1b3d8bf3
--- /dev/null
+++ 
b/package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch
@@ -0,0 +1,106 @@
+From: Shiji Yang 
+Date: Sat, 22 Jul 2023 21:56:30 +0800
+Subject: [PATCH] wifi: rt2x00: limit MT7620 TX power based on eeprom
+ calibration
+
+In the vendor driver, the current channel power is queried from
+EEPROM_TXPOWER_BG1 and EEPROM_TXPOWER_BG2. And then the mixed value
+will be written into the low half-word of the TX_ALC_CFG_0 register.
+The high half-word of the TX_ALC_CFG_0 is a fixed value 0x2f2f.
+
+We can't get the accurate TX power. Based on my tests and the new
+MediaTek mt76 driver source code, the real TX power is approximately
+equal to channel_power + (max) rate_power. Usually max rate_power is
+the gain of the OFDM 6M rate, which can be readed from the offset
+EEPROM_TXPOWER_BYRATE +1.
+
+Based on these eeprom values, this patch adds basic TX power control
+for the MT7620 and limits its maximum TX power. This can avoid the
+link speed decrease caused by chip overheating. rt2800_config_alc()
+function has also been renamed to rt2800_config_alc_rt6352() because
+it's only used by RT6352(MT7620).
+
+Notice:
+It's still need some work to sync the max channel power to the user
+interface. This part is missing from the rt2x00 driver structure. If
+we set the power exceed the calibration value, it won't take effect.
+
+Signed-off-by: Shiji Yang 
+---
+ .../net/wireless/ralink/rt2x00/rt2800lib.c| 49 +--
+ 1 file changed, 34 insertions(+), 15 deletions(-)
+
+--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
 b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+@@ -3891,28 +3891,47 @@ static void rt2800_config_channel_rf7620
+   }
+ }
+ 
+-static void rt2800_config_alc(struct rt2x00_dev *rt2x00dev,
++static void rt2800_config_alc_rt6352(struct rt2x00_dev *rt2x00dev,
+ struct ieee80211_channel *chan,
+ int power_level) {
+-  u16 eeprom, target_power, max_power;
++  u16 eeprom, chan_power, rate_power, target_power;
++  u16 tx_power[2];
++  s8 *power_group[2];
+   u32 mac_sys_ctrl;
+-  u32 reg;
++  u32 cnt, reg;
+   u8 bbp;
+ 
+-  /* hardware unit is 0.5dBm, limited to 23.5dBm */
+-  power_level *= 2;
+-  if (power_level > 0x2f)
+-  power_level = 0x2f;
+-
+-  max_power = chan->max_power * 2;
+-  if (max_power > 0x2f)
+-  max_power = 0x2f;
++  /* get per channel power, 2 channels in total, unit is 0.5dBm */
++  power_level = (power_level - 3) * 2;
++  /*
++   * We can't get the accurate TX power. Based on some tests, the real
++   * TX power is approximately equal to channel_power + (max)rate_power.
++   * Usually max rate_power is the gain of the OFDM 6M rate. The antenna
++   * gain and externel PA gain are not included as we are unable to
++   * obtain these values.
++   */
++  rate_power = rt2800_eeprom_read_from_array(rt2x00dev,
++  EEPROM_TXPOWER_BYRATE, 1) & 0x3f;
++  power_level -= rate_power;
++  if (power_level < 1)
++  power_level = 1;
++  if (power_level > chan->max_power * 2)
++  power_level = chan->max_power * 2;
++
++  power_group[0] = rt2800_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_BG1);
++  power_group[1] = rt2800_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_BG2);
++  for (cnt = 0; cnt < 2; cnt++) {
++  chan_power = power_group[cnt][rt2x00dev->rf_channel - 1];
++  if (chan_power >= 0x20 || chan_power == 0)
++  chan_power = 0x10;
++  tx_power[cnt] = power_level < chan_power ? power_level : 
chan_power;
++  }
+ 
+   reg = rt2800_register_read(rt2x00dev, TX_ALC_CFG_0);
+-  rt2x00_set_field32(, TX_ALC_CFG_0_CH_INIT_0, power_level);
+-  rt2x00_set_field32(, TX_ALC_CFG_0_CH_INIT_1, power_level);
+-  rt2x00_set_field32(, TX_ALC_CFG_0_LIMIT_0, max_power);
+-  rt2x00_set_field32(, TX_ALC_CFG_0_LIMIT_1, max_power);
++  rt2x00_set_field32(, 

Re: [PATCH] mac80211: limit MT7620 TX power based on eeprom calibration

2023-07-22 Thread 杨 世基
Hi, 
Thank you for your quick review.

On July 22, 2023, 4:36 p.m. UTC, Daniel Golle wrote:

>On Sat, Jul 22, 2023 at 10:52:02PM +0800, Shiji Yang wrote:
>> From: Shiji Yang 
>>
>> This patch adds basic TX power control to the MT7620 and limits its
>> maximum TX power. This can avoid the link speed decrease caused by
>> chip overheating.
>
>Thanks a lot for your patch and analysis of the situation.
>As you add code reading values from the EEPROM, we need to make sure
>that it doesn't break other chips (Rt5xxx most likely, Rt3xxx could
>also be affected). The easiest would be to create a new function
>rt2800_config_alc_mt7620 which is called only for MT7620 while keeping
>the original codepath for all other rt2800 radios (unless we are 100%
>sure that we won't break things).
>
>>
>> Signed-off-by: Shiji Yang 

This rt2800_config_alc() function is only used by RT6352(AKA MT7620),
so these changes are safe. I'll rename it to rt2800_config_alc_rt6352()
on the V2 patch.

ref:
https://elixir.bootlin.com/linux/v6.4.3/A/ident/rt2800_config_alc
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] mac80211: limit MT7620 TX power based on eeprom calibration

2023-07-22 Thread Daniel Golle
On Sat, Jul 22, 2023 at 10:52:02PM +0800, Shiji Yang wrote:
> From: Shiji Yang 
> 
> This patch adds basic TX power control to the MT7620 and limits its
> maximum TX power. This can avoid the link speed decrease caused by
> chip overheating.

Thanks a lot for your patch and analysis of the situation.
As you add code reading values from the EEPROM, we need to make sure
that it doesn't break other chips (Rt5xxx most likely, Rt3xxx could
also be affected). The easiest would be to create a new function
rt2800_config_alc_mt7620 which is called only for MT7620 while keeping
the original codepath for all other rt2800 radios (unless we are 100%
sure that we won't break things).

> 
> Signed-off-by: Shiji Yang 
> ---
>  ...t-MT7620-TX-power-based-on-eeprom-ca.patch | 83 +++
>  1 file changed, 83 insertions(+)
>  create mode 100644 
> package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch
> 
> diff --git 
> a/package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch
>  
> b/package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch
> new file mode 100644
> index 00..ecb8577752
> --- /dev/null
> +++ 
> b/package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch
> @@ -0,0 +1,83 @@
> +From: Shiji Yang 
> +Date: Sat, 22 Jul 2023 21:56:30 +0800
> +Subject: [PATCH] wifi: rt2x00: limit MT7620 TX power based on eeprom
> + calibration
> +
> +In the vendor driver, the current channel power is queried from
> +EEPROM_TXPOWER_BG1 and EEPROM_TXPOWER_BG2. And then the mixed value
> +will be written into the low half-word of the TX_ALC_CFG_0 register.
> +The high half-word of the TX_ALC_CFG_0 is a fixed value 0x2f2f.
> +
> +We can't get the accurate TX power. Based on my tests and the new
> +MediaTek mt76 driver source code, the real TX power is approximately
> +equal to channel_power + (max) rate_power. Usually max rate_power is
> +the gain of the OFDM 6M rate, which can be readed from the offset
> +EEPROM_TXPOWER_BYRATE +1.
> +
> +Based on these eeprom values, this patch adds basic TX power control
> +to the MT7620 and limits its maximum TX power. This can avoid the
> +link speed decrease caused by chip overheating.
> +
> +Signed-off-by: Shiji Yang 
> +---
> + .../net/wireless/ralink/rt2x00/rt2800lib.c| 43 +--
> + 1 file changed, 30 insertions(+), 13 deletions(-)
> +
> +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
>  b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> +@@ -3894,25 +3894,42 @@ static void rt2800_config_channel_rf7620
> + static void rt2800_config_alc(struct rt2x00_dev *rt2x00dev,
> +   struct ieee80211_channel *chan,
> +   int power_level) {
> +-u16 eeprom, target_power, max_power;
> ++u16 eeprom, chan_power, rate_power, target_power;
> ++u16 tx_power[2];
> ++s8 *power_group[2];
> + u32 mac_sys_ctrl;
> +-u32 reg;
> ++u32 cnt, reg;
> + u8 bbp;
> + 
> +-/* hardware unit is 0.5dBm, limited to 23.5dBm */
> +-power_level *= 2;
> +-if (power_level > 0x2f)
> +-power_level = 0x2f;
> ++/* get per channel power, 2 channels in total, unit is 0.5dBm */
> ++power_level = (power_level - 3) * 2;
> ++/*
> ++ * We can't set the accurate TX power. Based on some tests, the real
> ++ * TX power is approximately equal to channel_power + (max)rate_power.
> ++ * Usually max rate_power is the gain of the OFDM 6M rate.
> ++ */
> ++rate_power = rt2800_eeprom_read_from_array(rt2x00dev,
> ++EEPROM_TXPOWER_BYRATE, 1) & 0x3f;
> ++power_level -= rate_power;
> ++if (power_level < 1)
> ++power_level = 1;
> ++if (power_level > chan->max_power * 2)
> ++power_level = chan->max_power * 2;
> + 
> +-max_power = chan->max_power * 2;
> +-if (max_power > 0x2f)
> +-max_power = 0x2f;
> ++power_group[0] = rt2800_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_BG1);
> ++power_group[1] = rt2800_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_BG2);
> ++for (cnt = 0; cnt < 2; cnt++) {
> ++chan_power = power_group[cnt][rt2x00dev->rf_channel - 1];
> ++if (chan_power >= 0x20 || chan_power == 0)
> ++chan_power = 0x10;
> ++tx_power[cnt] = power_level < chan_power ? power_level : 
> chan_power;
> ++}
> + 
> + reg = rt2800_register_read(rt2x00dev, TX_ALC_CFG_0);
> +-rt2x00_set_field32(, TX_ALC_CFG_0_CH_INIT_0, power_level);
> +-rt2x00_set_field32(, TX_ALC_CFG_0_CH_INIT_1, power_level);
> +-rt2x00_set_field32(, TX_ALC_CFG_0_LIMIT_0, max_power);
> +-rt2x00_set_field32(, TX_ALC_CFG_0_LIMIT_1, max_power);
> ++rt2x00_set_field32(, TX_ALC_CFG_0_CH_INIT_0, tx_power[0]);
> ++rt2x00_set_field32(, TX_ALC_CFG_0_CH_INIT_1, tx_power[1]);
> ++

[PATCH] ubox: logread add option to filter priority (log level)

2023-07-22 Thread Legale Legale
This adds an ability to filter log messages priority:
-v   handle only messages with given log
level (0-7), repeatable
-V   ignore messages with given log level
(0-7), repeatable

Signed-off-by: Isaev Ruslan 
---
 log/logread.c | 27 ++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/log/logread.c b/log/logread.c
index f48dd4b..91aae00 100644
--- a/log/logread.c
+++ b/log/logread.c
@@ -66,6 +66,8 @@ static int log_type = LOG_STDOUT;
 static int log_size, log_udp, log_follow, log_trailer_null = 0;
 static int log_timestamp;
 static int logd_conn_tries = LOGD_CONNECT_RETRY;
+static int loglevel_include;
+static int loglevel_exclude;
 static int facility_include;
 static int facility_exclude;

@@ -79,6 +81,16 @@ static int check_facility_filter(int f)
return 1;
 }

+/* check for loglevel filter; return 0 if message shall be dropped */
+static int check_loglevel_filter(int f)
+{
+   if (loglevel_include)
+   return !!(loglevel_include & (1 << f));
+   if (loglevel_exclude)
+   return !(loglevel_exclude & (1 << f));
+   return 1;
+}
+
 static const char* getcodetext(int value, CODE *codetable) {
CODE *i;

@@ -155,6 +167,9 @@ static int log_notify(struct blob_attr *msg)

if (!check_facility_filter(LOG_FAC(p)))
return 0;
+
+  if (!check_loglevel_filter(LOG_PRI(p)))
+return 0;

m = blobmsg_get_string(tb[LOG_MSG]);
if (regexp_pattern &&
@@ -233,6 +248,8 @@ static int usage(const char *prog)
"-p   PID file\n"
"-h   Add hostname to the message\n"
"-P Prefix custom text to streamed
messages\n"
+   "-v  handle only messages with
given log level (0-7), repeatable\n"
+   "-V  ignore messages with given log
level (0-7), repeatable\n"
"-z   handle only messages with
given facility (0-23), repeatable\n"
"-Z   ignore messages with given
facility (0-23), repeatable\n"
"-f Follow log messages\n"
@@ -313,7 +330,7 @@ int main(int argc, char **argv)

signal(SIGPIPE, SIG_IGN);

-   while ((ch = getopt(argc, argv, "u0fcs:l:z:Z:r:F:p:S:P:h:e:t")) != -1) {
+   while ((ch = getopt(argc, argv,
"u0fcs:l:v:V:z:Z:r:F:p:S:P:h:e:t")) != -1) {
switch (ch) {
case 'u':
log_udp = 1;
@@ -343,6 +360,14 @@ int main(int argc, char **argv)
case 'l':
lines = atoi(optarg);
break;
+   case 'v':
+   id = strtoul(optarg, NULL, 0) & 0x1f;
+   loglevel_include |= (1 << id);
+   break;
+   case 'V':
+   id = strtoul(optarg, NULL, 0) & 0x1f;
+   loglevel_exclude |= (1 << id);
+   break;
case 'z':
id = strtoul(optarg, NULL, 0) & 0x1f;
facility_include |= (1 << id);
--
2.30.2

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH] mac80211: limit MT7620 TX power based on eeprom calibration

2023-07-22 Thread Shiji Yang
From: Shiji Yang 

This patch adds basic TX power control to the MT7620 and limits its
maximum TX power. This can avoid the link speed decrease caused by
chip overheating.

Signed-off-by: Shiji Yang 
---
 ...t-MT7620-TX-power-based-on-eeprom-ca.patch | 83 +++
 1 file changed, 83 insertions(+)
 create mode 100644 
package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch

diff --git 
a/package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch
 
b/package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch
new file mode 100644
index 00..ecb8577752
--- /dev/null
+++ 
b/package/kernel/mac80211/patches/rt2x00/997-wifi-rt2x00-limit-MT7620-TX-power-based-on-eeprom-ca.patch
@@ -0,0 +1,83 @@
+From: Shiji Yang 
+Date: Sat, 22 Jul 2023 21:56:30 +0800
+Subject: [PATCH] wifi: rt2x00: limit MT7620 TX power based on eeprom
+ calibration
+
+In the vendor driver, the current channel power is queried from
+EEPROM_TXPOWER_BG1 and EEPROM_TXPOWER_BG2. And then the mixed value
+will be written into the low half-word of the TX_ALC_CFG_0 register.
+The high half-word of the TX_ALC_CFG_0 is a fixed value 0x2f2f.
+
+We can't get the accurate TX power. Based on my tests and the new
+MediaTek mt76 driver source code, the real TX power is approximately
+equal to channel_power + (max) rate_power. Usually max rate_power is
+the gain of the OFDM 6M rate, which can be readed from the offset
+EEPROM_TXPOWER_BYRATE +1.
+
+Based on these eeprom values, this patch adds basic TX power control
+to the MT7620 and limits its maximum TX power. This can avoid the
+link speed decrease caused by chip overheating.
+
+Signed-off-by: Shiji Yang 
+---
+ .../net/wireless/ralink/rt2x00/rt2800lib.c| 43 +--
+ 1 file changed, 30 insertions(+), 13 deletions(-)
+
+--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
 b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+@@ -3894,25 +3894,42 @@ static void rt2800_config_channel_rf7620
+ static void rt2800_config_alc(struct rt2x00_dev *rt2x00dev,
+ struct ieee80211_channel *chan,
+ int power_level) {
+-  u16 eeprom, target_power, max_power;
++  u16 eeprom, chan_power, rate_power, target_power;
++  u16 tx_power[2];
++  s8 *power_group[2];
+   u32 mac_sys_ctrl;
+-  u32 reg;
++  u32 cnt, reg;
+   u8 bbp;
+ 
+-  /* hardware unit is 0.5dBm, limited to 23.5dBm */
+-  power_level *= 2;
+-  if (power_level > 0x2f)
+-  power_level = 0x2f;
++  /* get per channel power, 2 channels in total, unit is 0.5dBm */
++  power_level = (power_level - 3) * 2;
++  /*
++   * We can't set the accurate TX power. Based on some tests, the real
++   * TX power is approximately equal to channel_power + (max)rate_power.
++   * Usually max rate_power is the gain of the OFDM 6M rate.
++   */
++  rate_power = rt2800_eeprom_read_from_array(rt2x00dev,
++  EEPROM_TXPOWER_BYRATE, 1) & 0x3f;
++  power_level -= rate_power;
++  if (power_level < 1)
++  power_level = 1;
++  if (power_level > chan->max_power * 2)
++  power_level = chan->max_power * 2;
+ 
+-  max_power = chan->max_power * 2;
+-  if (max_power > 0x2f)
+-  max_power = 0x2f;
++  power_group[0] = rt2800_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_BG1);
++  power_group[1] = rt2800_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_BG2);
++  for (cnt = 0; cnt < 2; cnt++) {
++  chan_power = power_group[cnt][rt2x00dev->rf_channel - 1];
++  if (chan_power >= 0x20 || chan_power == 0)
++  chan_power = 0x10;
++  tx_power[cnt] = power_level < chan_power ? power_level : 
chan_power;
++  }
+ 
+   reg = rt2800_register_read(rt2x00dev, TX_ALC_CFG_0);
+-  rt2x00_set_field32(, TX_ALC_CFG_0_CH_INIT_0, power_level);
+-  rt2x00_set_field32(, TX_ALC_CFG_0_CH_INIT_1, power_level);
+-  rt2x00_set_field32(, TX_ALC_CFG_0_LIMIT_0, max_power);
+-  rt2x00_set_field32(, TX_ALC_CFG_0_LIMIT_1, max_power);
++  rt2x00_set_field32(, TX_ALC_CFG_0_CH_INIT_0, tx_power[0]);
++  rt2x00_set_field32(, TX_ALC_CFG_0_CH_INIT_1, tx_power[1]);
++  rt2x00_set_field32(, TX_ALC_CFG_0_LIMIT_0, 0x2f);
++  rt2x00_set_field32(, TX_ALC_CFG_0_LIMIT_1, 0x2f);
+ 
+   eeprom = rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1);
+   if (rt2x00_get_field16(eeprom, EEPROM_NIC_CONF1_INTERNAL_TX_ALC)) {
-- 
2.39.2


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH] ubox: logread add option to filter priority (log level)

2023-07-22 Thread Legale Legale
>From 071cfc2853dd7a4f9fb59a1650de8d5c874ce4f2 Mon Sep 17 00:00:00 2001
From:
Date: Sat, 22 Jul 2023 01:28:05 +0300
Subject: [PATCH] logread: add option to filter priority (log level)

This adds an ability to filter log messages priority:
-v   handle only messages with given log
level (0-7), repeatable
-V   ignore messages with given log level
(0-7), repeatable

Signed-off-by: Isaev Ruslan 
---
 log/logread.c | 27 ++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/log/logread.c b/log/logread.c
index f48dd4b..91aae00 100644
--- a/log/logread.c
+++ b/log/logread.c
@@ -66,6 +66,8 @@ static int log_type = LOG_STDOUT;
 static int log_size, log_udp, log_follow, log_trailer_null = 0;
 static int log_timestamp;
 static int logd_conn_tries = LOGD_CONNECT_RETRY;
+static int loglevel_include;
+static int loglevel_exclude;
 static int facility_include;
 static int facility_exclude;

@@ -79,6 +81,16 @@ static int check_facility_filter(int f)
return 1;
 }

+/* check for loglevel filter; return 0 if message shall be dropped */
+static int check_loglevel_filter(int f)
+{
+   if (loglevel_include)
+   return !!(loglevel_include & (1 << f));
+   if (loglevel_exclude)
+   return !(loglevel_exclude & (1 << f));
+   return 1;
+}
+
 static const char* getcodetext(int value, CODE *codetable) {
CODE *i;

@@ -155,6 +167,9 @@ static int log_notify(struct blob_attr *msg)

if (!check_facility_filter(LOG_FAC(p)))
return 0;
+
+  if (!check_loglevel_filter(LOG_PRI(p)))
+return 0;

m = blobmsg_get_string(tb[LOG_MSG]);
if (regexp_pattern &&
@@ -233,6 +248,8 @@ static int usage(const char *prog)
"-p   PID file\n"
"-h   Add hostname to the message\n"
"-P Prefix custom text to streamed
messages\n"
+   "-v  handle only messages with
given log level (0-7), repeatable\n"
+   "-V  ignore messages with given log
level (0-7), repeatable\n"
"-z   handle only messages with
given facility (0-23), repeatable\n"
"-Z   ignore messages with given
facility (0-23), repeatable\n"
"-f Follow log messages\n"
@@ -313,7 +330,7 @@ int main(int argc, char **argv)

signal(SIGPIPE, SIG_IGN);

-   while ((ch = getopt(argc, argv, "u0fcs:l:z:Z:r:F:p:S:P:h:e:t")) != -1) {
+   while ((ch = getopt(argc, argv,
"u0fcs:l:v:V:z:Z:r:F:p:S:P:h:e:t")) != -1) {
switch (ch) {
case 'u':
log_udp = 1;
@@ -343,6 +360,14 @@ int main(int argc, char **argv)
case 'l':
lines = atoi(optarg);
break;
+   case 'v':
+   id = strtoul(optarg, NULL, 0) & 0x1f;
+   loglevel_include |= (1 << id);
+   break;
+   case 'V':
+   id = strtoul(optarg, NULL, 0) & 0x1f;
+   loglevel_exclude |= (1 << id);
+   break;
case 'z':
id = strtoul(optarg, NULL, 0) & 0x1f;
facility_include |= (1 << id);
-- 
2.30.2

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] vlynq: fix typos in Kconfig

2023-07-22 Thread Paul D

On 2023-07-22 07:43, Randy Dunlap wrote:

Fix grammar and punctuation in the vlynq Kconfig file.

Fixes: 55e331cf7ebe ("drivers: add support for the TI VLYNQ bus")
Signed-off-by: Randy Dunlap 
Cc: Florian Fainelli 
Cc: openwrt-devel@lists.openwrt.org
Cc: Andrew Morton 
---
  drivers/vlynq/Kconfig |4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff -- a/drivers/vlynq/Kconfig b/drivers/vlynq/Kconfig
--- a/drivers/vlynq/Kconfig
+++ b/drivers/vlynq/Kconfig
@@ -7,10 +7,10 @@ config VLYNQ
help
  Support for Texas Instruments(R) VLYNQ bus.
  The VLYNQ bus is a high-speed, serial and packetized
- data bus which allows external peripherals of a SoC
+ data bus which allows external peripherals of an SoC



Nitpick:

Usually debatable. But SoC starts with S

In native English, "an" never precedes a consonant, which appears in 
both SoC and System (on a Chip).




  to appear into the system's main memory.
  
-	  If unsure, say N

+ If unsure, say N.
  
  config VLYNQ_DEBUG

bool "VLYNQ bus debug"

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: 22.03 packages not building since 10 days

2023-07-22 Thread Sebastian Kemper
Am 22. Juli 2023 08:27:53 UTC schrieb "Petr Štetiar" :
>Sebastian Kemper  [2023-07-20 20:54:33]:
>
>Hi,
>
>> Can a kind soul please check the build bots for 22.03 packages? We pushed
>> some security fixes about a week ago for pjsip and were hoping they'd be
>> packaged by now.
>
>thanks for the report, should be fixed now.
>
>Cheers,
>
>Petr

Than you Petr!

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: 22.03 packages not building since 10 days

2023-07-22 Thread Petr Štetiar
Sebastian Kemper  [2023-07-20 20:54:33]:

Hi,

> Can a kind soul please check the build bots for 22.03 packages? We pushed
> some security fixes about a week ago for pjsip and were hoping they'd be
> packaged by now.

thanks for the report, should be fixed now.

Cheers,

Petr

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH] vlynq: fix typos in Kconfig

2023-07-22 Thread Randy Dunlap
Fix grammar and punctuation in the vlynq Kconfig file.

Fixes: 55e331cf7ebe ("drivers: add support for the TI VLYNQ bus")
Signed-off-by: Randy Dunlap 
Cc: Florian Fainelli 
Cc: openwrt-devel@lists.openwrt.org
Cc: Andrew Morton 
---
 drivers/vlynq/Kconfig |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -- a/drivers/vlynq/Kconfig b/drivers/vlynq/Kconfig
--- a/drivers/vlynq/Kconfig
+++ b/drivers/vlynq/Kconfig
@@ -7,10 +7,10 @@ config VLYNQ
help
  Support for Texas Instruments(R) VLYNQ bus.
  The VLYNQ bus is a high-speed, serial and packetized
- data bus which allows external peripherals of a SoC
+ data bus which allows external peripherals of an SoC
  to appear into the system's main memory.
 
- If unsure, say N
+ If unsure, say N.
 
 config VLYNQ_DEBUG
bool "VLYNQ bus debug"

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel