ocb: use correct "MHz" instead of "MHZ"
PATCH 1/1 ocb: use correct "MHz" instead of "MHZ"
Fixes the last typos of MHZ to MHz
--- ocb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
ocb.c +3 -3
@@ -18,9 +18,9 @@ static int join_ocb(struct nl80211_state *state,const char *name;unsigned int width; } *chanmode_selected, chanmode[] = { - { .name = "5MHZ", + { .name = "5MHz", .width = NL80211_CHAN_WIDTH_5 }, - { .name = "10MHZ", + { .name = "10MHz", .width = NL80211_CHAN_WIDTH_10 }, };
@@ -59,7 +59,7 @@ static int join_ocb(struct nl80211_state *state, nla_put_failure:return -ENOBUFS ; } -COMMAND (ocb, join,"<freq in MHz> <5MHZ|10MHZ>" , +COMMAND (ocb, join,"<freq in MHz> <5MHz|10MHz>" ,NL80211_CMD_JOIN_OCB ,0 ,CIB_NETDEV , join_ocb,"Join the OCB mode network." );
Signature · 1 line
1.7.9.5
Hi Ola,
Thanks for all the patches - I just applied this and three others.
Note that I've reworded the subject for some - I prefer the subject to state in active voice what the change is doing - i.e. be something you read before the actual change, rather than afterwards. I'd appreciate if you could do the same for future patches.
Thanks,
johannes
Absolutely, I will do that.
May I ask if you are interested in patches that removes the compiler warnings on Android? I have cloned the iw git under the external folder in the android tree and everything compiles fine with "mm" but there are a lot of warnings. Most warnings are unused-parameter and sign-compare but also missing-field-initializers.
None of them are critical but it is way easier to introduce new ones if the screen is full of them already.The patches are ready in case you are interested.
/Ola
Quoted 11 lines · Johannes Berg
Hi Ola,
Thanks for all the patches - I just applied this and three others.
Note that I've reworded the subject for some - I prefer the subject to state in active voice what the change is doing - i.e. be something you read before the actual change, rather than afterwards. I'd appreciate if you could do the same for future patches.
Thanks,
johannes
Hi,
Quoted 5 lines
May I ask if you are interested in patches that removes the compiler warnings on Android? I have cloned the iw git under the external folder in the android tree and everything compiles fine with "mm" but there are a lot of warnings. Most warnings are unused-parameter and sign-compare but also missing-field-initializers.
Hm. I think -Wunused-parameter I'd prefer not to fix, since that usually ends up with something like
int my_callback_function(void *ignored)
{
ignored = ignored;
...
}or something like that?
-Wsign-compare seems somewhat useful, I've just gone through that and fixed it up.
I don't see anything with -Wmissing-field-initializers.
johannes
Quoted 11 lines
Hm. I think -Wunused-parameter I'd prefer not to fix, since that usually ends up with something like
int
my_callback_function(void *ignored){ ignored = ignored; ... }or something like that?
Correct. I have done a macro to utilize the gcc "__attribute__ ((unused))" and I fully understand that it is not an elegant solution. I don't want to convince you about merging it since I wouldn't do it myself. :)
Quoted 1 line
I don't see anything with -Wmissing-field-initializers.
Hmm. I'll try to find out why I get these warnings. Mostly, it is about changing "{}" -> "{0}" on stack allocated objects.
This is what I get when compiling at 0ee571d57b8b631658d1a35ad9a906610d6145d3
$ mm -B -j8 2>&1 | grep -i missing-field external/iw/scan.c:1863:3: warning: missing initializer for field 'type' of 'struct nla_policy' [-Wmissing-field-initializers] external/iw/scan.c:1866:3: warning: missing initializer for field 'type' of 'struct nla_policy' [-Wmissing-field-initializers] external/iw/scan.c:1871:3: warning: missing initializer for field 'type' of 'struct nla_policy' [-Wmissing-field-initializers] external/iw/connect.c:80:9: warning: missing initializer for field 'ts' of 'struct print_event_args' [-Wmissing-field-initializers] external/iw/link.c:32:3: warning: missing initializer for field 'type' of 'struct nla_policy' [-Wmissing-field-initializers] external/iw/link.c:35:3: warning: missing initializer for field 'type' of 'struct nla_policy' [-Wmissing-field-initializers] external/iw/bitrate.c:95:9: warning: missing initializer for field 'mcs' of 'struct nl80211_txrate_vht' [-Wmissing-field-initializers] external/iw/bitrate.c:96:9: warning: missing initializer for field 'mcs' of 'struct nl80211_txrate_vht' [-Wmissing-field-initializers] external/iw/wowlan.c:110:11: warning: missing initializer for field 'start' of 'struct nl80211_wowlan_tcp_data_seq' [-Wmissing-field-initializers]
Quoted 5 lines · Ola Olsson
Correct. I have done a macro to utilize the gcc "
__attribute__((unused))" and I fully understand that it is not an elegant solution.
I don't want to convince you about merging it since I wouldn't do it myself. :)
Yeah, ouch, I don't really want that. Perhaps you can add -Wno-unused -parameters to your Android makefile.
Quoted 11 lines
Quoted 1 line
I don't see anything with -Wmissing-field-initializers.
Hmm. I'll try to find out why I get these warnings. Mostly, it is about changing "{}" -> "{0}" on stack allocated objects. This is what I get when compiling at
0ee571d57b8b631658d1a35ad9a906610d6145d3$ mm -B -j8 2>&1 | grep -i missing-field external/iw/scan.c:1863:3: warning: missing initializer for field 'type' of 'struct nla_policy' [-Wmissing-field-initializers]
Yeah, ok, so technically IIRC ={0} is the standard way of doing this in C, but everything seems to accept ={} as a natural extension of ={.x=y} I guess? Not sure I want to fix it - doesn't really seem worth much.
johannes
Quoted 2 lines
Yeah, ouch, I don't really want that. Perhaps you can add -Wno-unused -parameters to your Android makefile.
Worked like a charm (though I had to remove 's' in parameters). Thanks!
Quoted 3 lines
I guess? Not sure I want to fix it - doesn't really seem worth much.
That's ok!