* [regdb] Add support to parse 2000mW tx power
@ 2014-05-26 7:39 chaitanya.mgit
2014-05-26 9:38 ` Johannes Berg
0 siblings, 1 reply; 6+ messages in thread
From: chaitanya.mgit @ 2014-05-26 7:39 UTC (permalink / raw)
To: linville, mcgrof; +Cc: wireless-regdb, linux-wireless, Chaitanya T K
CC [M] net/wireless/wext-sme.o
CC [M] net/wireless/regdb.o
net/wireless/regdb.c:1130:1: error: Unknown undeclared here (not in
a function)
net/wireless/regdb.c:1130:9: error: expected } before power
make[2]: *** [net/wireless/regdb.o] Error 1
make[1]: *** [net/wireless] Error 2
make: *** [net] Error 2
Reported-By: John Walker <john@x109.net>
Signed-off-by: Chaitanya T K <chaitanya.mgit@gmail.com>
---
net/wireless/genregdb.awk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wireless/genregdb.awk b/net/wireless/genregdb.awk
index 4119833..0f2b53a 100644
--- a/net/wireless/genregdb.awk
+++ b/net/wireless/genregdb.awk
@@ -74,7 +74,7 @@ function parse_reg_rule()
power = 23
} else if (power == 500) {
power = 27
- } else if (power == 1000) {
+ } else if ((power == 1000) || (power == 2000)) {
power = 30
} else {
print "Unknown power value in database!"
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [regdb] Add support to parse 2000mW tx power
2014-05-26 7:39 [regdb] Add support to parse 2000mW tx power chaitanya.mgit
@ 2014-05-26 9:38 ` Johannes Berg
2014-05-26 9:46 ` Krishna Chaitanya
2014-05-27 15:23 ` John W. Linville
0 siblings, 2 replies; 6+ messages in thread
From: Johannes Berg @ 2014-05-26 9:38 UTC (permalink / raw)
To: chaitanya.mgit; +Cc: linville, mcgrof, wireless-regdb, linux-wireless
On Mon, 2014-05-26 at 13:09 +0530, chaitanya.mgit@gmail.com wrote:
> @@ -74,7 +74,7 @@ function parse_reg_rule()
> power = 23
> } else if (power == 500) {
> power = 27
> - } else if (power == 1000) {
> + } else if ((power == 1000) || (power == 2000)) {
> power = 30
This seems like a pretty sick thing to do to start with, and certainly
power=30 isn't right for 2000mW...
Can't awk calculate the logarithm?
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [regdb] Add support to parse 2000mW tx power
2014-05-26 9:38 ` Johannes Berg
@ 2014-05-26 9:46 ` Krishna Chaitanya
2014-05-26 9:54 ` Johannes Berg
2014-05-27 15:23 ` John W. Linville
1 sibling, 1 reply; 6+ messages in thread
From: Krishna Chaitanya @ 2014-05-26 9:46 UTC (permalink / raw)
To: Johannes Berg
Cc: John Linville, Luis Rodriguez, wireless-regdb, linux-wireless
On Mon, May 26, 2014 at 3:08 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Mon, 2014-05-26 at 13:09 +0530, chaitanya.mgit@gmail.com wrote:
>
>> @@ -74,7 +74,7 @@ function parse_reg_rule()
>> power = 23
>> } else if (power == 500) {
>> power = 27
>> - } else if (power == 1000) {
>> + } else if ((power == 1000) || (power == 2000)) {
>> power = 30
>
> This seems like a pretty sick thing to do to start with, and certainly
Agree.
> power=30 isn't right for 2000mW...
Sorry, typo. Its supposed to be 33.
> Can't awk calculate the logarithm?
Does kernel support log arithmetic/Float operations.?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [regdb] Add support to parse 2000mW tx power
2014-05-26 9:46 ` Krishna Chaitanya
@ 2014-05-26 9:54 ` Johannes Berg
2014-05-26 10:39 ` Krishna Chaitanya
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2014-05-26 9:54 UTC (permalink / raw)
To: Krishna Chaitanya
Cc: John Linville, Luis Rodriguez, wireless-regdb, linux-wireless
On Mon, 2014-05-26 at 15:16 +0530, Krishna Chaitanya wrote:
> On Mon, May 26, 2014 at 3:08 PM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
> > On Mon, 2014-05-26 at 13:09 +0530, chaitanya.mgit@gmail.com wrote:
> >
> >> @@ -74,7 +74,7 @@ function parse_reg_rule()
> >> power = 23
> >> } else if (power == 500) {
> >> power = 27
> >> - } else if (power == 1000) {
> >> + } else if ((power == 1000) || (power == 2000)) {
> >> power = 30
> >
> > This seems like a pretty sick thing to do to start with, and certainly
>
> Agree.
>
> > power=30 isn't right for 2000mW...
>
> Sorry, typo. Its supposed to be 33.
>
> > Can't awk calculate the logarithm?
> Does kernel support log arithmetic/Float operations.?
This script runs at build time.
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [regdb] Add support to parse 2000mW tx power
2014-05-26 9:54 ` Johannes Berg
@ 2014-05-26 10:39 ` Krishna Chaitanya
0 siblings, 0 replies; 6+ messages in thread
From: Krishna Chaitanya @ 2014-05-26 10:39 UTC (permalink / raw)
To: Johannes Berg
Cc: John Linville, Luis Rodriguez, wireless-regdb, linux-wireless
On Mon, May 26, 2014 at 3:24 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Mon, 2014-05-26 at 15:16 +0530, Krishna Chaitanya wrote:
>> On Mon, May 26, 2014 at 3:08 PM, Johannes Berg
>> <johannes@sipsolutions.net> wrote:
>> > On Mon, 2014-05-26 at 13:09 +0530, chaitanya.mgit@gmail.com wrote:
>> >
>> >> @@ -74,7 +74,7 @@ function parse_reg_rule()
>> >> power = 23
>> >> } else if (power == 500) {
>> >> power = 27
>> >> - } else if (power == 1000) {
>> >> + } else if ((power == 1000) || (power == 2000)) {
>> >> power = 30
>> >
>> > This seems like a pretty sick thing to do to start with, and certainly
>>
>> Agree.
>>
>> > power=30 isn't right for 2000mW...
>>
>> Sorry, typo. Its supposed to be 33.
>>
>> > Can't awk calculate the logarithm?
>> Does kernel support log arithmetic/Float operations.?
>
> This script runs at build time.
Ok, understood. I will send in V2 with the algo after some testing.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [regdb] Add support to parse 2000mW tx power
2014-05-26 9:38 ` Johannes Berg
2014-05-26 9:46 ` Krishna Chaitanya
@ 2014-05-27 15:23 ` John W. Linville
1 sibling, 0 replies; 6+ messages in thread
From: John W. Linville @ 2014-05-27 15:23 UTC (permalink / raw)
To: Johannes Berg; +Cc: chaitanya.mgit, mcgrof, wireless-regdb, linux-wireless
On Mon, May 26, 2014 at 11:38:06AM +0200, Johannes Berg wrote:
> On Mon, 2014-05-26 at 13:09 +0530, chaitanya.mgit@gmail.com wrote:
>
> > @@ -74,7 +74,7 @@ function parse_reg_rule()
> > power = 23
> > } else if (power == 500) {
> > power = 27
> > - } else if (power == 1000) {
> > + } else if ((power == 1000) || (power == 2000)) {
> > power = 30
>
> This seems like a pretty sick thing to do to start with, and certainly
> power=30 isn't right for 2000mW...
Heh...it was like that in my original version!
> Can't awk calculate the logarithm?
I probably didn't know how to compute it in awk. I still don't OTOH...
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-05-27 15:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-26 7:39 [regdb] Add support to parse 2000mW tx power chaitanya.mgit
2014-05-26 9:38 ` Johannes Berg
2014-05-26 9:46 ` Krishna Chaitanya
2014-05-26 9:54 ` Johannes Berg
2014-05-26 10:39 ` Krishna Chaitanya
2014-05-27 15:23 ` John W. Linville
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).