* Re: [PATCH/RFC 3/3] ath5k: trace resets
From: Bruno Randolf @ 2010-07-21 5:17 UTC (permalink / raw)
To: Bob Copeland; +Cc: linux-wireless, ath5k-devel, johannes
In-Reply-To: <20100721034150.GA16632@hash.localnet>
On Wed July 21 2010 12:41:50 Bob Copeland wrote:
> On Wed, Jul 21, 2010 at 10:04:59AM +0900, Bruno Randolf wrote:
> > the difference. without tracing you can get 22Mbps, with tracing max
> > 15Mbps UDP thruput.
>
> If so, and it's not an i-cache effect, then something is wrong with
> the tracing subsystem. It's supposed to compile to something like
>
> if (tracing) {
> trace_callback();
> }
>
> That is exactly what we have with the debug infrastructure, but
> the debug stuff is theoretically a bit worse since it tests for
> tracing inside the callback.
but that's for all tracepoints all over the kernel... i think it's natural
that this takes some CPU time. note that on these boards even the 22Mbps are
limited by the CPU processing power.
> Oh well, I guess I need to get my hands on one of these boards.
could be helpful, allthough i have to admit that these boards are getting old
and more current embedded boards usually do have faster CPUs...
bruno
^ permalink raw reply
* Re: [PATCH/RFC 3/3] ath5k: trace resets
From: Ben Gamari @ 2010-07-21 5:46 UTC (permalink / raw)
To: Bruno Randolf, Bob Copeland; +Cc: linux-wireless, ath5k-devel, johannes
In-Reply-To: <201007211417.23512.br1@einfach.org>
On Wed, 21 Jul 2010 14:17:23 +0900, Bruno Randolf <br1@einfach.org> wrote:
> but that's for all tracepoints all over the kernel... i think it's natural
> that this takes some CPU time. note that on these boards even the 22Mbps are
> limited by the CPU processing power.
>
The key word here is some. The numbers that you pointed out suggest that
the effect here is quite large. I find it hard to believe that something
isn't going wrong here. A single branch instruction really shouldn't be
this onerous unless it's in a fast path, in which case it should
probably be a compile-time option. What is the difference in image size
between kernels with and without tracing?
- Ben
^ permalink raw reply
* Re: ath5k Ad Hoc Association
From: Jonathan Guerin @ 2010-07-21 5:47 UTC (permalink / raw)
To: Bob Copeland; +Cc: linux-wireless, ath5k-devel
In-Reply-To: <AANLkTinr0RbmNLgM_pRsa0WrSqQ_Mr9aQhKGuK63xIJ6@mail.gmail.com>
TXkgYXBvbG9naWVzIGFsbCwgSSBoYWQgdGhlIGFudGVubmEgcGx1Z2dlZCBpbiB0byB0aGUgZmly
c3QgY29ubmVjdG9yLgphdGg1ayBhcHBlYXJzIHRvIG9ubHkgdXNlIHRoZSBzZWNvbmQuIFBsdWdn
aW5nIGluIHRvIHRoZSBzZWNvbmQgb25lCmZpeGVzIG1vc3QgcHJvYmxlbXMuIEkgZGlkbid0IGdl
dCBhIGNoYW5jZSB0byBzZWUgaWYgdGhlIGF0aDVrIHdheSBvZgpjcmVhdGluZyBhbmQgam9pbmlu
ZyBhbiBpYnNzIHdvcmtzIG5vdywgYnV0IHdlIGNhbiBub3cgZ2V0IGZ1bGwKdGhyb3VnaHB1dCBp
biBhZGhvYyBtb2RlLiBJIHdpbGwgdHJ5IHRoZSBpYnNzIGpvaW5pbmcgd2l0aG91dCBNYWRXaWZp
CnRvbW9ycm93LgoKVGhhbmtzIGZvciBhbGwgdGhlIGhlbHAuCgotLQpKb25hdGhhbiBHdWVyaW4K
CgoKT24gV2VkLCBKdWwgMjEsIDIwMTAgYXQgMTE6MTYgQU0sIEpvbmF0aGFuIEd1ZXJpbiA8am9u
YXRoYW5AZ3VlcmluLmlkLmF1PiB3cm90ZToKPiBPbiBUdWUsIEp1bCAyMCwgMjAxMCBhdCA5OjIw
IFBNLCBCb2IgQ29wZWxhbmQgPG1lQGJvYmNvcGVsYW5kLmNvbT4gd3JvdGU6Cj4+PiBZZXMsIEkn
dmUgY2hlY2tlZCB0aGUgY2hhbm5lbCAoMzYsIDUxODApIGFsbG93cyBiZWFjb25pbmcuIEkndmUg
dHJpZWQKPj4+IHRoZSBjb21tYW5kcyB5b3UgbWVudGlvbmVkLCBidXQgbm8gbHVjay4gSWYgSSBt
b25pdG9yIHRoZSBpbnRlcmZhY2UKPj4+IGZyb20gYW5vdGhlciBzdGF0aW9uLCB0aGUgYXRoNWsg
ZHJpdmUgbmV2ZXIgYXBwZWFycyB0byBiZWFjb24uCj4+Cj4+IFdoYXQgZG9lcyAiaXcgcGh5IHBo
eTAgaW5mbyIgc2hvdz8KPgo+IGl3IHBoeSBwaHkwIGluZm8KPiBXaXBoeSBwaHkwCj4goCCgIKAg
oEJhbmQgMToKPiCgIKAgoCCgIKAgoCCgIKBGcmVxdWVuY2llczoKPiCgIKAgoCCgIKAgoCCgIKAg
oCCgIKAgoCogMjQxMiBNSHogWzFdICgyMC4wIGRCbSkKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAg
oCogMjQxNyBNSHogWzJdICgyMC4wIGRCbSkKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogMjQy
MiBNSHogWzNdICgyMC4wIGRCbSkKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogMjQyNyBNSHog
WzRdICgyMC4wIGRCbSkKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogMjQzMiBNSHogWzVdICgy
MC4wIGRCbSkKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogMjQzNyBNSHogWzZdICgyMC4wIGRC
bSkKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogMjQ0MiBNSHogWzddICgyMC4wIGRCbSkKPiCg
IKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogMjQ0NyBNSHogWzhdICgyMC4wIGRCbSkKPiCgIKAgoCCg
IKAgoCCgIKAgoCCgIKAgoCogMjQ1MiBNSHogWzldICgyMC4wIGRCbSkKPiCgIKAgoCCgIKAgoCCg
IKAgoCCgIKAgoCogMjQ1NyBNSHogWzEwXSAoMjAuMCBkQm0pCj4goCCgIKAgoCCgIKAgoCCgIKAg
oCCgIKAqIDI0NjIgTUh6IFsxMV0gKDIwLjAgZEJtKQo+IKAgoCCgIKAgoCCgIKAgoCCgIKAgoCCg
KiAyNDY3IE1IeiBbMTJdIChkaXNhYmxlZCkKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogMjQ3
MiBNSHogWzEzXSAoZGlzYWJsZWQpCj4goCCgIKAgoCCgIKAgoCCgIKAgoCCgIKAqIDI0ODQgTUh6
IFsxNF0gKGRpc2FibGVkKQo+IKAgoCCgIKAgoCCgIKAgoEJpdHJhdGVzIChub24tSFQpOgo+IKAg
oCCgIKAgoCCgIKAgoCCgIKAgoCCgKiAxLjAgTWJwcwo+IKAgoCCgIKAgoCCgIKAgoCCgIKAgoCCg
KiAyLjAgTWJwcyAoc2hvcnQgcHJlYW1ibGUgc3VwcG9ydGVkKQo+IKAgoCCgIKAgoCCgIKAgoCCg
IKAgoCCgKiA1LjUgTWJwcyAoc2hvcnQgcHJlYW1ibGUgc3VwcG9ydGVkKQo+IKAgoCCgIKAgoCCg
IKAgoCCgIKAgoCCgKiAxMS4wIE1icHMgKHNob3J0IHByZWFtYmxlIHN1cHBvcnRlZCkKPiCgIKAg
oCCgIKAgoCCgIKAgoCCgIKAgoCogNi4wIE1icHMKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCog
OS4wIE1icHMKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogMTIuMCBNYnBzCj4goCCgIKAgoCCg
IKAgoCCgIKAgoCCgIKAqIDE4LjAgTWJwcwo+IKAgoCCgIKAgoCCgIKAgoCCgIKAgoCCgKiAyNC4w
IE1icHMKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogMzYuMCBNYnBzCj4goCCgIKAgoCCgIKAg
oCCgIKAgoCCgIKAqIDQ4LjAgTWJwcwo+IKAgoCCgIKAgoCCgIKAgoCCgIKAgoCCgKiA1NC4wIE1i
cHMKPiCgIKAgoCCgQmFuZCAyOgo+IKAgoCCgIKAgoCCgIKAgoEZyZXF1ZW5jaWVzOgo+IKAgoCCg
IKAgoCCgIKAgoCCgIKAgoCCgKiA1MTgwIE1IeiBbMzZdICgxNy4wIGRCbSkKPiCgIKAgoCCgIKAg
oCCgIKAgoCCgIKAgoCogNTIwMCBNSHogWzQwXSAoMTcuMCBkQm0pCj4goCCgIKAgoCCgIKAgoCCg
IKAgoCCgIKAqIDUyMjAgTUh6IFs0NF0gKDE3LjAgZEJtKQo+IKAgoCCgIKAgoCCgIKAgoCCgIKAg
oCCgKiA1MjQwIE1IeiBbNDhdICgxNy4wIGRCbSkKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCog
NTI2MCBNSHogWzUyXSAoMjAuMCBkQm0pIChwYXNzaXZlIHNjYW5uaW5nLAo+IG5vIElCU1MsIHJh
ZGFyIGRldGVjdGlvbikKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogNTI4MCBNSHogWzU2XSAo
MjAuMCBkQm0pIChwYXNzaXZlIHNjYW5uaW5nLAo+IG5vIElCU1MsIHJhZGFyIGRldGVjdGlvbikK
PiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogNTMwMCBNSHogWzYwXSAoMjAuMCBkQm0pIChwYXNz
aXZlIHNjYW5uaW5nLAo+IG5vIElCU1MsIHJhZGFyIGRldGVjdGlvbikKPiCgIKAgoCCgIKAgoCCg
IKAgoCCgIKAgoCogNTMyMCBNSHogWzY0XSAoMjAuMCBkQm0pIChwYXNzaXZlIHNjYW5uaW5nLAo+
IG5vIElCU1MsIHJhZGFyIGRldGVjdGlvbikKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogNTUw
MCBNSHogWzEwMF0gKGRpc2FibGVkKQo+IKAgoCCgIKAgoCCgIKAgoCCgIKAgoCCgKiA1NTIwIE1I
eiBbMTA0XSAoZGlzYWJsZWQpCj4goCCgIKAgoCCgIKAgoCCgIKAgoCCgIKAqIDU1NDAgTUh6IFsx
MDhdIChkaXNhYmxlZCkKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogNTU2MCBNSHogWzExMl0g
KGRpc2FibGVkKQo+IKAgoCCgIKAgoCCgIKAgoCCgIKAgoCCgKiA1NTgwIE1IeiBbMTE2XSAoZGlz
YWJsZWQpCj4goCCgIKAgoCCgIKAgoCCgIKAgoCCgIKAqIDU2MDAgTUh6IFsxMjBdIChkaXNhYmxl
ZCkKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogNTYyMCBNSHogWzEyNF0gKGRpc2FibGVkKQo+
IKAgoCCgIKAgoCCgIKAgoCCgIKAgoCCgKiA1NjQwIE1IeiBbMTI4XSAoZGlzYWJsZWQpCj4goCCg
IKAgoCCgIKAgoCCgIKAgoCCgIKAqIDU2NjAgTUh6IFsxMzJdIChkaXNhYmxlZCkKPiCgIKAgoCCg
IKAgoCCgIKAgoCCgIKAgoCogNTY4MCBNSHogWzEzNl0gKGRpc2FibGVkKQo+IKAgoCCgIKAgoCCg
IKAgoCCgIKAgoCCgKiA1NzAwIE1IeiBbMTQwXSAoZGlzYWJsZWQpCj4goCCgIKAgoCCgIKAgoCCg
IKAgoCCgIKAqIDU3NDUgTUh6IFsxNDldICgzMC4wIGRCbSkKPiCgIKAgoCCgIKAgoCCgIKAgoCCg
IKAgoCogNTc2NSBNSHogWzE1M10gKDMwLjAgZEJtKQo+IKAgoCCgIKAgoCCgIKAgoCCgIKAgoCCg
KiA1Nzg1IE1IeiBbMTU3XSAoMzAuMCBkQm0pCj4goCCgIKAgoCCgIKAgoCCgIKAgoCCgIKAqIDU4
MDUgTUh6IFsxNjFdICgzMC4wIGRCbSkKPiCgIKAgoCCgIKAgoCCgIKAgoCCgIKAgoCogNTgyNSBN
SHogWzE2NV0gKDMwLjAgZEJtKQo+IKAgoCCgIKAgoCCgIKAgoEJpdHJhdGVzIChub24tSFQpOgo+
IKAgoCCgIKAgoCCgIKAgoCCgIKAgoCCgKiA2LjAgTWJwcwo+IKAgoCCgIKAgoCCgIKAgoCCgIKAg
oCCgKiA5LjAgTWJwcwo+IKAgoCCgIKAgoCCgIKAgoCCgIKAgoCCgKiAxMi4wIE1icHMKPiCgIKAg
oCCgIKAgoCCgIKAgoCCgIKAgoCogMTguMCBNYnBzCj4goCCgIKAgoCCgIKAgoCCgIKAgoCCgIKAq
IDI0LjAgTWJwcwo+IKAgoCCgIKAgoCCgIKAgoCCgIKAgoCCgKiAzNi4wIE1icHMKPiCgIKAgoCCg
IKAgoCCgIKAgoCCgIKAgoCogNDguMCBNYnBzCj4goCCgIKAgoCCgIKAgoCCgIKAgoCCgIKAqIDU0
LjAgTWJwcwo+IKAgoCCgIKBtYXggIyBzY2FuIFNTSURzOiA0Cj4goCCgIKAgoFN1cHBvcnRlZCBp
bnRlcmZhY2UgbW9kZXM6Cj4goCCgIKAgoCCgIKAgoCCgICogSUJTUwo+IKAgoCCgIKAgoCCgIKAg
oCAqIG1hbmFnZWQKPiCgIKAgoCCgIKAgoCCgIKAgKiBBUAo+IKAgoCCgIKAgoCCgIKAgoCAqIEFQ
L1ZMQU4KPiCgIKAgoCCgIKAgoCCgIKAgKiBtb25pdG9yCj4goCCgIKAgoCCgIKAgoCCgICogbWVz
aCBwb2ludAo+IKAgoCCgIKBTdXBwb3J0ZWQgY29tbWFuZHM6Cj4goCCgIKAgoCCgIKAgoCCgICog
bmV3X2ludGVyZmFjZQo+IKAgoCCgIKAgoCCgIKAgoCAqIHNldF9pbnRlcmZhY2UKPiCgIKAgoCCg
IKAgoCCgIKAgKiBuZXdfa2V5Cj4goCCgIKAgoCCgIKAgoCCgICogbmV3X2JlYWNvbgo+IKAgoCCg
IKAgoCCgIKAgoCAqIG5ld19zdGF0aW9uCj4goCCgIKAgoCCgIKAgoCCgICogbmV3X21wYXRoCj4g
oCCgIKAgoCCgIKAgoCCgICogc2V0X21lc2hfcGFyYW1zCj4goCCgIKAgoCCgIKAgoCCgICogc2V0
X2Jzcwo+IKAgoCCgIKAgoCCgIKAgoCAqIGF1dGhlbnRpY2F0ZQo+IKAgoCCgIKAgoCCgIKAgoCAq
IGFzc29jaWF0ZQo+IKAgoCCgIKAgoCCgIKAgoCAqIGRlYXV0aGVudGljYXRlCj4goCCgIKAgoCCg
IKAgoCCgICogZGlzYXNzb2NpYXRlCj4goCCgIKAgoCCgIKAgoCCgICogam9pbl9pYnNzCj4goCCg
IKAgoCCgIKAgoCCgICogc2V0X3dpcGh5X25ldG5zCj4goCCgIKAgoCCgIKAgoCCgICogY29ubmVj
dAo+IKAgoCCgIKAgoCCgIKAgoCAqIGRpc2Nvbm5lY3QKPgo+IKBpdyByZWcgZ2V0Cj4gY291bnRy
eSBBVToKPiCgIKAgoCCgKDI0MDIgLSAyNDgyIEAgNDApLCAoTi9BLCAyMCkKPiCgIKAgoCCgKDUx
NzAgLSA1MjUwIEAgNDApLCAoMywgMjMpCj4goCCgIKAgoCg1MjUwIC0gNTMzMCBAIDQwKSwgKDMs
IDIzKSwgREZTCj4goCCgIKAgoCg1NzM1IC0gNTgzNSBAIDQwKSwgKDMsIDMwKQo+Cj4gQ2hlZXJz
LAo+Cj4gSm9uYXRoYW4KPgo=
^ permalink raw reply
* Re: [PATCH] iw: Add support for setting transmit power level
From: Luciano Coelho @ 2010-07-21 7:04 UTC (permalink / raw)
To: johannes
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
Oikarinen Juuso (Nokia-MS/Tampere)
In-Reply-To: <1277284377-11048-1-git-send-email-juuso.oikarinen@nokia.com>
Hi Johannes,
Just trying to make sure you have seen this patch (you haven't applied
it yet). Juuso sent it to John instead of you, so you may have missed
it. ;)
On Wed, 2010-06-23 at 11:12 +0200, Oikarinen Juuso (Nokia-MS/Tampere)
wrote:
> Add a "set txpower" option to specify the current transmit power level. Modes
> supported are automatic, fixed and limited, and the limit may be specified
> in signed mBm units.
>
> Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
> ---
> nl80211.h | 22 ++++++++++++++++++++++
> phy.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
> 2 files changed, 71 insertions(+), 1 deletions(-)
>
> diff --git a/nl80211.h b/nl80211.h
> index 64fb32b..2c87016 100644
> --- a/nl80211.h
> +++ b/nl80211.h
> @@ -725,6 +725,12 @@ enum nl80211_commands {
> * @NL80211_ATTR_AP_ISOLATE: (AP mode) Do not forward traffic between stations
> * connected to this BSS.
> *
> + * @NL80211_ATTR_WIPHY_TX_POWER_SETTING: Transmit power setting type. See
> + * &enum nl80211_tx_power_setting for possible values.
> + * @NL80211_ATTR_WIPHY_TX_POWER_LEVEL: Transmit power level in signed mBm units.
> + * This is used in association with @NL80211_ATTR_WIPHY_TX_POWER_SETTING
> + * for non-automatic settings.
> + *
> * @NL80211_ATTR_MAX: highest attribute number currently defined
> * @__NL80211_ATTR_AFTER_LAST: internal use
> */
> @@ -882,6 +888,9 @@ enum nl80211_attrs {
>
> NL80211_ATTR_AP_ISOLATE,
>
> + NL80211_ATTR_WIPHY_TX_POWER_SETTING,
> + NL80211_ATTR_WIPHY_TX_POWER_LEVEL,
> +
> /* add attributes here, update the policy in nl80211.c */
>
> __NL80211_ATTR_AFTER_LAST,
> @@ -1659,4 +1668,17 @@ enum nl80211_cqm_rssi_threshold_event {
> NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
> };
>
> +
> +/**
> + * enum nl80211_tx_power_setting - TX power adjustment
> + * @NL80211_TX_POWER_AUTOMATIC: automatically determine transmit power
> + * @NL80211_TX_POWER_LIMITED: limit TX power by the mBm parameter
> + * @NL80211_TX_POWER_FIXED: fix TX power to the mBm parameter
> + */
> +enum nl80211_tx_power_setting {
> + NL80211_TX_POWER_AUTOMATIC,
> + NL80211_TX_POWER_LIMITED,
> + NL80211_TX_POWER_FIXED,
> +};
> +
> #endif /* __LINUX_NL80211_H */
> diff --git a/phy.c b/phy.c
> index 8f8d757..f042dc2 100644
> --- a/phy.c
> +++ b/phy.c
> @@ -175,7 +175,7 @@ static int handle_netns(struct nl80211_state *state,
> return 1;
>
> NLA_PUT_U32(msg, NL80211_ATTR_PID,
> - strtoul(argv[0], &end, 10));
> + strtoul(argv[0], &end, 10));
>
> if (*end != '\0')
> return 1;
> @@ -258,3 +258,51 @@ COMMAND(set, distance, "<distance>",
> NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_distance,
> "Set appropriate coverage class for given link distance in meters.\n"
> "Valid values: 0 - 114750");
> +
> +static int handle_txpower(struct nl80211_state *state,
> + struct nl_cb *cb,
> + struct nl_msg *msg,
> + int argc, char **argv)
> +{
> + enum nl80211_tx_power_setting type;
> + int ret = -ENOSPC;
> + int mbm;
> +
> + /* get the required args */
> + if (argc != 1 && argc != 2)
> + return 1;
> +
> + if (!strcmp(argv[0], "auto"))
> + type = NL80211_TX_POWER_AUTOMATIC;
> + else if (!strcmp(argv[0], "fixed"))
> + type = NL80211_TX_POWER_FIXED;
> + else if (!strcmp(argv[0], "limit"))
> + type = NL80211_TX_POWER_LIMITED;
> + else {
> + printf("Invalid parameter: %s\n", argv[0]);
> + return 2;
> + }
> +
> + NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_TX_POWER_SETTING, type);
> +
> + if (type != NL80211_TX_POWER_AUTOMATIC) {
> + if (argc != 2) {
> + printf("Missing TX power level argument.\n");
> + return 2;
> + }
> +
> + mbm = atoi(argv[1]);
> + NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_TX_POWER_LEVEL, mbm);
> + }
> +
> + ret = 0;
> +
> + nla_put_failure:
> + return ret;
> +}
> +COMMAND(set, txpower, "<auto|fixed|limit> [<tx power in mBm>]",
> + NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_txpower,
> + "Specify transmit power level and setting type.");
> +COMMAND(set, txpower, "<auto|fixed|limit> [<tx power in mBm>]",
> + NL80211_CMD_SET_WIPHY, 0, CIB_NETDEV, handle_txpower,
> + "Specify transmit power level and setting type.");
--
Cheers,
Luca.
^ permalink raw reply
* Re: [PATCH/RFC 3/3] ath5k: trace resets
From: Johannes Berg @ 2010-07-21 7:53 UTC (permalink / raw)
To: Bruno Randolf; +Cc: Bob Copeland, linux-wireless, ath5k-devel
In-Reply-To: <201007211417.23512.br1@einfach.org>
On Wed, 2010-07-21 at 14:17 +0900, Bruno Randolf wrote:
> but that's for all tracepoints all over the kernel...
Well you definitely don't want to enable like function graph tracing,
that's expected to be more expensive unless you also have the callsite
patching version of it. But _just_ enabling tracing + the ath5k tracer
definitely will not have this effect.
johannes
^ permalink raw reply
* [PATCH] mac80211: refuse shared key auth when WEP is unavailable
From: Johannes Berg @ 2010-07-21 8:09 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless
In-Reply-To: <20100720185643.GB3468@tuxdriver.com>
From: Johannes Berg <johannes.berg@intel.com>
When WEP is not available, we should reject shared
key authentication because it could never succeed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/mlme.c | 2 ++
1 file changed, 2 insertions(+)
--- wireless-testing.orig/net/mac80211/mlme.c 2010-07-21 10:07:20.000000000 +0200
+++ wireless-testing/net/mac80211/mlme.c 2010-07-21 10:07:20.000000000 +0200
@@ -2030,6 +2030,8 @@ int ieee80211_mgd_auth(struct ieee80211_
auth_alg = WLAN_AUTH_OPEN;
break;
case NL80211_AUTHTYPE_SHARED_KEY:
+ if (IS_ERR(sdata->local->wep_tx_tfm))
+ return -EOPNOTSUPP;
auth_alg = WLAN_AUTH_SHARED_KEY;
break;
case NL80211_AUTHTYPE_FT:
^ permalink raw reply
* Re: [PATCH] iw: Add support for setting transmit power level
From: Johannes Berg @ 2010-07-21 8:24 UTC (permalink / raw)
To: Juuso Oikarinen; +Cc: linux-wireless
In-Reply-To: <1277284377-11048-1-git-send-email-juuso.oikarinen@nokia.com>
On Wed, 2010-06-23 at 12:12 +0300, Juuso Oikarinen wrote:
> Add a "set txpower" option to specify the current transmit power level. Modes
> supported are automatic, fixed and limited, and the limit may be specified
> in signed mBm units.
Merged, but I fixed a few nits, please look at the new version in my git
tree.
johannes
^ permalink raw reply
* [PATCH] mac80211: fix IBSS lockdep complaint
From: Johannes Berg @ 2010-07-21 8:52 UTC (permalink / raw)
To: John Linville; +Cc: Bob Copeland, linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
Bob reported a lockdep complaint originating in
the mac80211 IBSS code due to the common work
struct patch. The reason is that the IBSS and
station mode code have different locking orders
for the cfg80211 wdev lock and the work struct
(where "locking" implies running/canceling).
Fix this by simply not canceling the work in
the IBSS code, it is not necessary since when
the REQ_RUN bit is cleared, the work will run
without effect if it runs. When the interface
is set down, it is flushed anyway, so there's
no concern about it running after memory has
been invalidated either.
This fixes
https://bugzilla.kernel.org/show_bug.cgi?id=16419
Additionally, looking into this I noticed that
there's a small window while the IBSS is torn
down in which the work may be rescheduled and
the REQ_RUN bit be set again after leave() has
cleared it when a scan finishes at exactly the
same time. Avoid that by setting the ssid_len
to zero before clearing REQ_RUN which signals
to the scan finish code that this interface is
not active.
Reported-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/ibss.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
--- wireless-testing.orig/net/mac80211/ibss.c 2010-07-20 10:25:03.000000000 +0200
+++ wireless-testing/net/mac80211/ibss.c 2010-07-20 10:27:56.000000000 +0200
@@ -943,11 +943,6 @@ int ieee80211_ibss_leave(struct ieee8021
}
}
- del_timer_sync(&sdata->u.ibss.timer);
- clear_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request);
- cancel_work_sync(&sdata->work);
- clear_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request);
-
sta_info_flush(sdata->local, sdata);
/* remove beacon */
@@ -964,6 +959,20 @@ int ieee80211_ibss_leave(struct ieee8021
memset(sdata->u.ibss.bssid, 0, ETH_ALEN);
sdata->u.ibss.ssid_len = 0;
+ /*
+ * ssid_len indicates active or not, so needs to be visible to
+ * everybody, especially ieee80211_ibss_notify_scan_completed,
+ * so it won't restart the timer after we remove it here.
+ */
+ mb();
+
+ del_timer_sync(&sdata->u.ibss.timer);
+ clear_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request);
+ /*
+ * Since the REQ_RUN bit is clear, the work won't do
+ * anything if it runs after this.
+ */
+
ieee80211_recalc_idle(sdata->local);
return 0;
^ permalink raw reply
* [PATCH] mac80211: proper IBSS locking
From: Johannes Berg @ 2010-07-21 9:30 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
IBSS has never had locking, instead relying on some
memory barriers etc. That's hard to get right, and
I think we had it wrong too until the previous patch.
Since this is not performance sensitive, it doesn't
make sense to have the maintenance overhead of that,
so add proper locking.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/ibss.c | 97 ++++++++++++++++++++++++---------------------
net/mac80211/ieee80211_i.h | 7 ---
2 files changed, 54 insertions(+), 50 deletions(-)
--- wireless-testing.orig/net/mac80211/ibss.c 2010-07-21 11:23:19.000000000 +0200
+++ wireless-testing/net/mac80211/ibss.c 2010-07-21 11:23:21.000000000 +0200
@@ -43,6 +43,8 @@ static void ieee80211_rx_mgmt_auth_ibss(
{
u16 auth_alg, auth_transaction, status_code;
+ lockdep_assert_held(&sdata->u.ibss.mtx);
+
if (len < 24 + 6)
return;
@@ -78,6 +80,8 @@ static void __ieee80211_sta_join_ibss(st
u32 bss_change;
u8 supp_rates[IEEE80211_MAX_SUPP_RATES];
+ lockdep_assert_held(&ifibss->mtx);
+
/* Reset own TSF to allow time synchronization work. */
drv_reset_tsf(local);
@@ -205,6 +209,8 @@ static void ieee80211_sta_join_ibss(stru
int i, j;
u16 beacon_int = cbss->beacon_interval;
+ lockdep_assert_held(&sdata->u.ibss.mtx);
+
if (beacon_int < 10)
beacon_int = 10;
@@ -449,6 +455,8 @@ static int ieee80211_sta_active_ibss(str
int active = 0;
struct sta_info *sta;
+ lockdep_assert_held(&sdata->u.ibss.mtx);
+
rcu_read_lock();
list_for_each_entry_rcu(sta, &local->sta_list, list) {
@@ -473,6 +481,8 @@ static void ieee80211_sta_merge_ibss(str
{
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ lockdep_assert_held(&ifibss->mtx);
+
mod_timer(&ifibss->timer,
round_jiffies(jiffies + IEEE80211_IBSS_MERGE_INTERVAL));
@@ -505,6 +515,8 @@ static void ieee80211_sta_create_ibss(st
u16 capability;
int i;
+ lockdep_assert_held(&ifibss->mtx);
+
if (ifibss->fixed_bssid) {
memcpy(bssid, ifibss->bssid, ETH_ALEN);
} else {
@@ -549,6 +561,8 @@ static void ieee80211_sta_find_ibss(stru
int active_ibss;
u16 capability;
+ lockdep_assert_held(&ifibss->mtx);
+
active_ibss = ieee80211_sta_active_ibss(sdata);
#ifdef CONFIG_MAC80211_IBSS_DEBUG
printk(KERN_DEBUG "%s: sta_find_ibss (active_ibss=%d)\n",
@@ -637,6 +651,8 @@ static void ieee80211_rx_mgmt_probe_req(
struct ieee80211_mgmt *resp;
u8 *pos, *end;
+ lockdep_assert_held(&ifibss->mtx);
+
if (ifibss->state != IEEE80211_IBSS_MLME_JOINED ||
len < 24 + 2 || !ifibss->presp)
return;
@@ -740,6 +756,8 @@ void ieee80211_ibss_rx_queued_mgmt(struc
mgmt = (struct ieee80211_mgmt *) skb->data;
fc = le16_to_cpu(mgmt->frame_control);
+ mutex_lock(&sdata->u.ibss.mtx);
+
switch (fc & IEEE80211_FCTL_STYPE) {
case IEEE80211_STYPE_PROBE_REQ:
ieee80211_rx_mgmt_probe_req(sdata, mgmt, skb->len);
@@ -756,14 +774,23 @@ void ieee80211_ibss_rx_queued_mgmt(struc
ieee80211_rx_mgmt_auth_ibss(sdata, mgmt, skb->len);
break;
}
+
+ mutex_unlock(&sdata->u.ibss.mtx);
}
void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
- if (!test_and_clear_bit(IEEE80211_IBSS_REQ_RUN, &ifibss->request))
- return;
+ mutex_lock(&ifibss->mtx);
+
+ /*
+ * Work could be scheduled after scan or similar
+ * when we aren't even joined (or trying) with a
+ * network.
+ */
+ if (!ifibss->ssid_len)
+ goto out;
switch (ifibss->state) {
case IEEE80211_IBSS_MLME_SEARCH:
@@ -776,15 +803,9 @@ void ieee80211_ibss_work(struct ieee8021
WARN_ON(1);
break;
}
-}
-static void ieee80211_queue_ibss_work(struct ieee80211_sub_if_data *sdata)
-{
- struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
- struct ieee80211_local *local = sdata->local;
-
- set_bit(IEEE80211_IBSS_REQ_RUN, &ifibss->request);
- ieee80211_queue_work(&local->hw, &sdata->work);
+ out:
+ mutex_unlock(&ifibss->mtx);
}
static void ieee80211_ibss_timer(unsigned long data)
@@ -799,7 +820,7 @@ static void ieee80211_ibss_timer(unsigne
return;
}
- ieee80211_queue_ibss_work(sdata);
+ ieee80211_queue_work(&local->hw, &sdata->work);
}
#ifdef CONFIG_PM
@@ -828,6 +849,7 @@ void ieee80211_ibss_setup_sdata(struct i
setup_timer(&ifibss->timer, ieee80211_ibss_timer,
(unsigned long) sdata);
+ mutex_init(&ifibss->mtx);
}
/* scan finished notification */
@@ -841,10 +863,8 @@ void ieee80211_ibss_notify_scan_complete
continue;
if (sdata->vif.type != NL80211_IFTYPE_ADHOC)
continue;
- if (!sdata->u.ibss.ssid_len)
- continue;
sdata->u.ibss.last_scan_completed = jiffies;
- ieee80211_queue_ibss_work(sdata);
+ ieee80211_queue_work(&local->hw, &sdata->work);
}
mutex_unlock(&local->iflist_mtx);
}
@@ -854,6 +874,17 @@ int ieee80211_ibss_join(struct ieee80211
{
struct sk_buff *skb;
+ skb = dev_alloc_skb(sdata->local->hw.extra_tx_headroom +
+ 36 /* bitrates */ +
+ 34 /* SSID */ +
+ 3 /* DS params */ +
+ 4 /* IBSS params */ +
+ params->ie_len);
+ if (!skb)
+ return -ENOMEM;
+
+ mutex_lock(&sdata->u.ibss.mtx);
+
if (params->bssid) {
memcpy(sdata->u.ibss.bssid, params->bssid, ETH_ALEN);
sdata->u.ibss.fixed_bssid = true;
@@ -882,35 +913,19 @@ int ieee80211_ibss_join(struct ieee80211
sdata->u.ibss.ie_len = params->ie_len;
}
- skb = dev_alloc_skb(sdata->local->hw.extra_tx_headroom +
- 36 /* bitrates */ +
- 34 /* SSID */ +
- 3 /* DS params */ +
- 4 /* IBSS params */ +
- params->ie_len);
- if (!skb)
- return -ENOMEM;
-
sdata->u.ibss.skb = skb;
sdata->u.ibss.state = IEEE80211_IBSS_MLME_SEARCH;
sdata->u.ibss.ibss_join_req = jiffies;
memcpy(sdata->u.ibss.ssid, params->ssid, IEEE80211_MAX_SSID_LEN);
-
- /*
- * The ssid_len setting below is used to see whether
- * we are active, and we need all other settings
- * before that may get visible.
- */
- mb();
-
sdata->u.ibss.ssid_len = params->ssid_len;
ieee80211_recalc_idle(sdata->local);
- set_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request);
ieee80211_queue_work(&sdata->local->hw, &sdata->work);
+ mutex_unlock(&sdata->u.ibss.mtx);
+
return 0;
}
@@ -921,7 +936,9 @@ int ieee80211_ibss_leave(struct ieee8021
struct ieee80211_local *local = sdata->local;
struct cfg80211_bss *cbss;
u16 capability;
- int active_ibss = 0;
+ int active_ibss;
+
+ mutex_lock(&sdata->u.ibss.mtx);
active_ibss = ieee80211_sta_active_ibss(sdata);
@@ -959,19 +976,9 @@ int ieee80211_ibss_leave(struct ieee8021
memset(sdata->u.ibss.bssid, 0, ETH_ALEN);
sdata->u.ibss.ssid_len = 0;
- /*
- * ssid_len indicates active or not, so needs to be visible to
- * everybody, especially ieee80211_ibss_notify_scan_completed,
- * so it won't restart the timer after we remove it here.
- */
- mb();
-
del_timer_sync(&sdata->u.ibss.timer);
- clear_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request);
- /*
- * Since the REQ_RUN bit is clear, the work won't do
- * anything if it runs after this.
- */
+
+ mutex_unlock(&sdata->u.ibss.mtx);
ieee80211_recalc_idle(sdata->local);
--- wireless-testing.orig/net/mac80211/ieee80211_i.h 2010-07-21 11:22:31.000000000 +0200
+++ wireless-testing/net/mac80211/ieee80211_i.h 2010-07-21 11:23:21.000000000 +0200
@@ -377,14 +377,11 @@ struct ieee80211_if_managed {
int last_cqm_event_signal;
};
-enum ieee80211_ibss_request {
- IEEE80211_IBSS_REQ_RUN = 0,
-};
-
struct ieee80211_if_ibss {
struct timer_list timer;
- unsigned long request;
+ struct mutex mtx;
+
unsigned long last_scan_completed;
u32 basic_rates;
^ permalink raw reply
* Re: [PATCH] rtl8180: improve signal reporting for rtl8185 hardware
From: John W. Linville @ 2010-07-21 13:33 UTC (permalink / raw)
To: Pauli Nieminen; +Cc: linux-wireless
In-Reply-To: <AANLkTino_4FKtMWZU7_lKGzPUXNOtfrmlw_rmmr836eA@mail.gmail.com>
On Wed, Jul 21, 2010 at 08:08:41AM +0300, Pauli Nieminen wrote:
> On Mon, Jul 19, 2010 at 11:47 PM, John W. Linville
> <linville@tuxdriver.com> wrote:
> > The existing code seemed to be somewhat based on the datasheet, but
> > varied substantially from the vendor-provided driver. This mirrors the
> > handling of the rtl8185 case from that driver, but still neglects the
> > specifics for the rtl8180 hardware. Those details are a bit muddled...
> >
> > Signed-off-by: John W. Linville <linville@tuxdriver.com>
> > ---
> > drivers/net/wireless/rtl818x/rtl8180_dev.c | 11 ++++++++---
> > 1 files changed, 8 insertions(+), 3 deletions(-)
> I tested this version of patch. Patch didn't apply cleanly for some
> reason even tough when I mnauly typed it diff looks same.
Please try the v2 version of the patch. Some "back of the envelope"
math suggests that the v2 version of the patch will give numbers more
to your liking.
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
* [PATCH] zd1211rw: make CR_INTERRUPT cast explicit
From: John W. Linville @ 2010-07-21 15:08 UTC (permalink / raw)
To: linux-wireless; +Cc: Daniel Drake, Ulrich Kunitz, John W. Linville
CHECK drivers/net/wireless/zd1211rw/zd_usb.c
drivers/net/wireless/zd1211rw/zd_usb.c:376:24: warning: implicit cast from nocast type
The value comparison is intentional, so forcing the cast seems warranted
in order to silence the sparse warning.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/zd1211rw/zd_usb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index 818e148..acbf4d9 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -373,7 +373,7 @@ static inline void handle_regs_int(struct urb *urb)
spin_lock(&intr->lock);
int_num = le16_to_cpu(*(__le16 *)(urb->transfer_buffer+2));
- if (int_num == CR_INTERRUPT) {
+ if (int_num == (u16 __force) CR_INTERRUPT) {
struct zd_mac *mac = zd_hw_mac(zd_usb_to_hw(urb->context));
memcpy(&mac->intr_buffer, urb->transfer_buffer,
USB_MAX_EP_INT_BUFFER);
--
1.7.1.1
^ permalink raw reply related
* [PATCH] cfg80211: fix race between sysfs and cfg80211
From: Maxime Bizon @ 2010-07-21 15:21 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1279394982.3931.0.camel@jlt3.sipsolutions.net>
From: Maxime Bizon <mbizon@freebox.fr>
device_add() is called before adding the phy to the cfg80211 device
list.
So if a userspace program uses sysfs uevents to detect new phy
devices, and queries nl80211 to get phy info, it can get ENODEV even
though the phy exists in sysfs.
An easy workaround is to hold the cfg80211 mutex until the phy is
present in sysfs/cfg80211/debugfs.
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
net/wireless/core.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 6ac70c1..fd164db 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -472,24 +472,22 @@ int wiphy_register(struct wiphy *wiphy)
/* check and set up bitrates */
ieee80211_set_bitrate_flags(wiphy);
+ mutex_lock(&cfg80211_mutex);
+
res = device_add(&rdev->wiphy.dev);
if (res)
- return res;
+ goto out_unlock;
res = rfkill_register(rdev->rfkill);
if (res)
goto out_rm_dev;
- mutex_lock(&cfg80211_mutex);
-
/* set up regulatory info */
wiphy_update_regulatory(wiphy, NL80211_REGDOM_SET_BY_CORE);
list_add_rcu(&rdev->list, &cfg80211_rdev_list);
cfg80211_rdev_list_generation++;
- mutex_unlock(&cfg80211_mutex);
-
/* add to debugfs */
rdev->wiphy.debugfsdir =
debugfs_create_dir(wiphy_name(&rdev->wiphy),
@@ -509,11 +507,15 @@ int wiphy_register(struct wiphy *wiphy)
}
cfg80211_debugfs_rdev_add(rdev);
+ mutex_unlock(&cfg80211_mutex);
return 0;
- out_rm_dev:
+out_rm_dev:
device_del(&rdev->wiphy.dev);
+
+out_unlock:
+ mutex_unlock(&cfg80211_mutex);
return res;
}
EXPORT_SYMBOL(wiphy_register);
--
1.7.1
--
Maxime
^ permalink raw reply related
* [PATCH] b43: silense most sparse warnings
From: John W. Linville @ 2010-07-21 15:45 UTC (permalink / raw)
To: linux-wireless
Cc: Michael Buesch, Larry Finger, Gábor Stefanik,
Rafał Miłecki, John W. Linville
CHECK drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/main.c:111:5: warning: symbol 'b43_modparam_pio' was not declared. Should it be static?
CHECK drivers/net/wireless/b43/phy_g.c
drivers/net/wireless/b43/phy_g.c:975:56: warning: cast truncates bits from constant value (ffff7fff becomes 7fff)
CHECK drivers/net/wireless/b43/phy_lp.c
drivers/net/wireless/b43/phy_lp.c:2701:6: warning: symbol 'b43_lpphy_op_switch_analog' was not declared. Should it be static?
drivers/net/wireless/b43/phy_lp.c:1148:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff)
drivers/net/wireless/b43/phy_lp.c:1525:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff)
drivers/net/wireless/b43/phy_lp.c:1529:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff)
CHECK drivers/net/wireless/b43/wa.c
drivers/net/wireless/b43/wa.c:385:60: warning: cast truncates bits from constant value (ffff00ff becomes ff)
drivers/net/wireless/b43/wa.c:403:55: warning: cast truncates bits from constant value (ffff00ff becomes ff)
drivers/net/wireless/b43/wa.c:405:55: warning: cast truncates bits from constant value (ffff00ff becomes ff)
drivers/net/wireless/b43/wa.c:415:71: warning: cast truncates bits from constant value (ffff0fff becomes fff)
AFAICT, none of these amount to real bugs. But this reduces warning
spam from sparse w/o significantly affecting readability of the code (IMHO).
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/b43/main.c | 2 +-
drivers/net/wireless/b43/phy_g.c | 2 +-
drivers/net/wireless/b43/phy_lp.c | 8 ++++----
drivers/net/wireless/b43/wa.c | 8 ++++----
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 8e24379..20631ae 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -108,7 +108,7 @@ int b43_modparam_verbose = B43_VERBOSITY_DEFAULT;
module_param_named(verbose, b43_modparam_verbose, int, 0644);
MODULE_PARM_DESC(verbose, "Log message verbosity: 0=error, 1=warn, 2=info(default), 3=debug");
-int b43_modparam_pio = B43_PIO_DEFAULT;
+static int b43_modparam_pio = B43_PIO_DEFAULT;
module_param_named(pio, b43_modparam_pio, int, 0644);
MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
index 29bf34c..0dc33b6 100644
--- a/drivers/net/wireless/b43/phy_g.c
+++ b/drivers/net/wireless/b43/phy_g.c
@@ -972,7 +972,7 @@ b43_radio_interference_mitigation_enable(struct b43_wldev *dev, int mode)
b43_phy_maskset(dev, 0x04A2, 0xFFF0, 0x000B);
if (phy->rev >= 3) {
- b43_phy_mask(dev, 0x048A, (u16)~0x8000);
+ b43_phy_mask(dev, 0x048A, 0x7FFF);
b43_phy_maskset(dev, 0x0415, 0x8000, 0x36D8);
b43_phy_maskset(dev, 0x0416, 0x8000, 0x36D8);
b43_phy_maskset(dev, 0x0417, 0xFE00, 0x016D);
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index c6afe9d..fd50eb1 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -1145,7 +1145,7 @@ static void lpphy_write_tx_pctl_mode_to_hardware(struct b43_wldev *dev)
B43_WARN_ON(1);
}
b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD,
- (u16)~B43_LPPHY_TX_PWR_CTL_CMD_MODE, ctl);
+ ~B43_LPPHY_TX_PWR_CTL_CMD_MODE & 0xFFFF, ctl);
}
static void lpphy_set_tx_power_control(struct b43_wldev *dev,
@@ -1522,11 +1522,11 @@ static void lpphy_tx_pctl_init_hw(struct b43_wldev *dev)
b43_phy_mask(dev, B43_LPPHY_TX_PWR_CTL_DELTAPWR_LIMIT, 0xFF);
b43_phy_write(dev, B43_LPPHY_TX_PWR_CTL_DELTAPWR_LIMIT, 0xA);
b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD,
- (u16)~B43_LPPHY_TX_PWR_CTL_CMD_MODE,
+ ~B43_LPPHY_TX_PWR_CTL_CMD_MODE & 0xFFFF,
B43_LPPHY_TX_PWR_CTL_CMD_MODE_OFF);
b43_phy_mask(dev, B43_LPPHY_TX_PWR_CTL_NNUM, 0xF8FF);
b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD,
- (u16)~B43_LPPHY_TX_PWR_CTL_CMD_MODE,
+ ~B43_LPPHY_TX_PWR_CTL_CMD_MODE & 0xFFFF,
B43_LPPHY_TX_PWR_CTL_CMD_MODE_SW);
if (dev->phy.rev < 2) {
@@ -2698,7 +2698,7 @@ static enum b43_txpwr_result b43_lpphy_op_recalc_txpower(struct b43_wldev *dev,
return B43_TXPWR_RES_DONE;
}
-void b43_lpphy_op_switch_analog(struct b43_wldev *dev, bool on)
+static void b43_lpphy_op_switch_analog(struct b43_wldev *dev, bool on)
{
if (on) {
b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xfff8);
diff --git a/drivers/net/wireless/b43/wa.c b/drivers/net/wireless/b43/wa.c
index 97c7916..9a335da 100644
--- a/drivers/net/wireless/b43/wa.c
+++ b/drivers/net/wireless/b43/wa.c
@@ -382,7 +382,7 @@ static void b43_wa_altagc(struct b43_wldev *dev)
b43_ofdmtab_write16(dev, B43_OFDMTAB_AGC1, 3, 25);
}
- b43_phy_maskset(dev, B43_PHY_CCKSHIFTBITS_WA, (u16)~0xFF00, 0x5700);
+ b43_phy_maskset(dev, B43_PHY_CCKSHIFTBITS_WA, 0x00FF, 0x5700);
b43_phy_maskset(dev, B43_PHY_OFDM(0x1A), ~0x007F, 0x000F);
b43_phy_maskset(dev, B43_PHY_OFDM(0x1A), ~0x3F80, 0x2B80);
b43_phy_maskset(dev, B43_PHY_ANTWRSETT, 0xF0FF, 0x0300);
@@ -400,9 +400,9 @@ static void b43_wa_altagc(struct b43_wldev *dev)
b43_phy_maskset(dev, B43_PHY_OFDM(0x89), ~0x00FF, 0x0020);
b43_phy_maskset(dev, B43_PHY_OFDM(0x89), ~0x3F00, 0x0200);
b43_phy_maskset(dev, B43_PHY_OFDM(0x82), ~0x00FF, 0x002E);
- b43_phy_maskset(dev, B43_PHY_OFDM(0x96), (u16)~0xFF00, 0x1A00);
+ b43_phy_maskset(dev, B43_PHY_OFDM(0x96), 0x00FF, 0x1A00);
b43_phy_maskset(dev, B43_PHY_OFDM(0x81), ~0x00FF, 0x0028);
- b43_phy_maskset(dev, B43_PHY_OFDM(0x81), (u16)~0xFF00, 0x2C00);
+ b43_phy_maskset(dev, B43_PHY_OFDM(0x81), 0x00FF, 0x2C00);
if (phy->rev == 1) {
b43_phy_write(dev, B43_PHY_PEAK_COUNT, 0x092B);
b43_phy_maskset(dev, B43_PHY_OFDM(0x1B), ~0x001E, 0x0002);
@@ -412,7 +412,7 @@ static void b43_wa_altagc(struct b43_wldev *dev)
b43_phy_maskset(dev, B43_PHY_LPFGAINCTL, ~0x000F, 0x0004);
if (phy->rev >= 6) {
b43_phy_write(dev, B43_PHY_OFDM(0x22), 0x287A);
- b43_phy_maskset(dev, B43_PHY_LPFGAINCTL, (u16)~0xF000, 0x3000);
+ b43_phy_maskset(dev, B43_PHY_LPFGAINCTL, 0x0FFF, 0x3000);
}
}
b43_phy_maskset(dev, B43_PHY_DIVSRCHIDX, 0x8080, 0x7874);
--
1.7.1.1
^ permalink raw reply related
* Re: [PATCH] b43: silense most sparse warnings
From: Michael Büsch @ 2010-07-21 16:05 UTC (permalink / raw)
To: John W. Linville
Cc: linux-wireless, Larry Finger, Gábor Stefanik,
Rafał Miłecki
In-Reply-To: <1279727142-25234-1-git-send-email-linville@tuxdriver.com>
On 07/21/2010 05:45 PM, John W. Linville wrote:
> diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
> index 29bf34c..0dc33b6 100644
> --- a/drivers/net/wireless/b43/phy_g.c
> +++ b/drivers/net/wireless/b43/phy_g.c
> @@ -972,7 +972,7 @@ b43_radio_interference_mitigation_enable(struct b43_wldev *dev, int mode)
> b43_phy_maskset(dev, 0x04A2, 0xFFF0, 0x000B);
>
> if (phy->rev>= 3) {
> - b43_phy_mask(dev, 0x048A, (u16)~0x8000);
> + b43_phy_mask(dev, 0x048A, 0x7FFF);
This cast was introduced to silense a GCC warning. Do we end up in an
infinite loop now? ;)
> b43_phy_maskset(dev, 0x0415, 0x8000, 0x36D8);
> b43_phy_maskset(dev, 0x0416, 0x8000, 0x36D8);
> b43_phy_maskset(dev, 0x0417, 0xFE00, 0x016D);
> diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
> index c6afe9d..fd50eb1 100644
> --- a/drivers/net/wireless/b43/phy_lp.c
> +++ b/drivers/net/wireless/b43/phy_lp.c
> @@ -1145,7 +1145,7 @@ static void lpphy_write_tx_pctl_mode_to_hardware(struct b43_wldev *dev)
> B43_WARN_ON(1);
> }
> b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD,
> - (u16)~B43_LPPHY_TX_PWR_CTL_CMD_MODE, ctl);
> + ~B43_LPPHY_TX_PWR_CTL_CMD_MODE& 0xFFFF, ctl);
> }
>
> static void lpphy_set_tx_power_control(struct b43_wldev *dev,
> @@ -1522,11 +1522,11 @@ static void lpphy_tx_pctl_init_hw(struct b43_wldev *dev)
> b43_phy_mask(dev, B43_LPPHY_TX_PWR_CTL_DELTAPWR_LIMIT, 0xFF);
> b43_phy_write(dev, B43_LPPHY_TX_PWR_CTL_DELTAPWR_LIMIT, 0xA);
> b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD,
> - (u16)~B43_LPPHY_TX_PWR_CTL_CMD_MODE,
> + ~B43_LPPHY_TX_PWR_CTL_CMD_MODE& 0xFFFF,
> B43_LPPHY_TX_PWR_CTL_CMD_MODE_OFF);
> b43_phy_mask(dev, B43_LPPHY_TX_PWR_CTL_NNUM, 0xF8FF);
> b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD,
> - (u16)~B43_LPPHY_TX_PWR_CTL_CMD_MODE,
> + ~B43_LPPHY_TX_PWR_CTL_CMD_MODE& 0xFFFF,
> B43_LPPHY_TX_PWR_CTL_CMD_MODE_SW);
> diff --git a/drivers/net/wireless/b43/wa.c b/drivers/net/wireless/b43/wa.c
> index 97c7916..9a335da 100644
> --- a/drivers/net/wireless/b43/wa.c
> +++ b/drivers/net/wireless/b43/wa.c
> @@ -382,7 +382,7 @@ static void b43_wa_altagc(struct b43_wldev *dev)
> b43_ofdmtab_write16(dev, B43_OFDMTAB_AGC1, 3, 25);
> }
>
> - b43_phy_maskset(dev, B43_PHY_CCKSHIFTBITS_WA, (u16)~0xFF00, 0x5700);
> + b43_phy_maskset(dev, B43_PHY_CCKSHIFTBITS_WA, 0x00FF, 0x5700);
> b43_phy_maskset(dev, B43_PHY_OFDM(0x1A), ~0x007F, 0x000F);
> b43_phy_maskset(dev, B43_PHY_OFDM(0x1A), ~0x3F80, 0x2B80);
> b43_phy_maskset(dev, B43_PHY_ANTWRSETT, 0xF0FF, 0x0300);
> @@ -400,9 +400,9 @@ static void b43_wa_altagc(struct b43_wldev *dev)
> b43_phy_maskset(dev, B43_PHY_OFDM(0x89), ~0x00FF, 0x0020);
> b43_phy_maskset(dev, B43_PHY_OFDM(0x89), ~0x3F00, 0x0200);
> b43_phy_maskset(dev, B43_PHY_OFDM(0x82), ~0x00FF, 0x002E);
> - b43_phy_maskset(dev, B43_PHY_OFDM(0x96), (u16)~0xFF00, 0x1A00);
> + b43_phy_maskset(dev, B43_PHY_OFDM(0x96), 0x00FF, 0x1A00);
> b43_phy_maskset(dev, B43_PHY_OFDM(0x81), ~0x00FF, 0x0028);
> - b43_phy_maskset(dev, B43_PHY_OFDM(0x81), (u16)~0xFF00, 0x2C00);
> + b43_phy_maskset(dev, B43_PHY_OFDM(0x81), 0x00FF, 0x2C00);
> if (phy->rev == 1) {
> b43_phy_write(dev, B43_PHY_PEAK_COUNT, 0x092B);
> b43_phy_maskset(dev, B43_PHY_OFDM(0x1B), ~0x001E, 0x0002);
> @@ -412,7 +412,7 @@ static void b43_wa_altagc(struct b43_wldev *dev)
> b43_phy_maskset(dev, B43_PHY_LPFGAINCTL, ~0x000F, 0x0004);
> if (phy->rev>= 6) {
> b43_phy_write(dev, B43_PHY_OFDM(0x22), 0x287A);
> - b43_phy_maskset(dev, B43_PHY_LPFGAINCTL, (u16)~0xF000, 0x3000);
> + b43_phy_maskset(dev, B43_PHY_LPFGAINCTL, 0x0FFF, 0x3000);
> }
> }
> b43_phy_maskset(dev, B43_PHY_DIVSRCHIDX, 0x8080, 0x7874);
Same for all of these.
--
Greetings Michael.
^ permalink raw reply
* Re: [PATCH] zd1211rw: make CR_INTERRUPT cast explicit
From: Pavel Roskin @ 2010-07-21 16:36 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Daniel Drake, Ulrich Kunitz
In-Reply-To: <1279724935-16581-1-git-send-email-linville@tuxdriver.com>
On Wed, 2010-07-21 at 11:08 -0400, John W. Linville wrote:
> CHECK drivers/net/wireless/zd1211rw/zd_usb.c
> drivers/net/wireless/zd1211rw/zd_usb.c:376:24: warning: implicit cast from nocast type
>
> The value comparison is intentional, so forcing the cast seems warranted
> in order to silence the sparse warning.
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---
> drivers/net/wireless/zd1211rw/zd_usb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
> index 818e148..acbf4d9 100644
> --- a/drivers/net/wireless/zd1211rw/zd_usb.c
> +++ b/drivers/net/wireless/zd1211rw/zd_usb.c
> @@ -373,7 +373,7 @@ static inline void handle_regs_int(struct urb *urb)
> spin_lock(&intr->lock);
>
> int_num = le16_to_cpu(*(__le16 *)(urb->transfer_buffer+2));
> - if (int_num == CR_INTERRUPT) {
> + if (int_num == (u16 __force) CR_INTERRUPT) {
I think __force should be used sparingly, especially outside headers. I
tried other ways to prevent the warning. I tried declaring int_num as
zd_addr_t, but sparse keeps complaining about the same comparison.
I can rewrite "if" as "switch" to suppress the warning, but it makes the
code less readable. I think it's a bug in sparse. There should be no
casts when comparing values of the same type.
I understand the benefits of fixing sparse warnings, but this patch
works around a sparse bug and sets a bad example.
--
Regards,
Pavel Roskin
^ permalink raw reply
* Re: [PATCH] b43: silense most sparse warnings
From: John W. Linville @ 2010-07-21 16:38 UTC (permalink / raw)
To: Michael Büsch
Cc: linux-wireless, Larry Finger, Gábor Stefanik,
Rafał Miłecki
In-Reply-To: <4C471AC2.5040003@bu3sch.de>
On Wed, Jul 21, 2010 at 06:05:22PM +0200, Michael Büsch wrote:
> On 07/21/2010 05:45 PM, John W. Linville wrote:
> >diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
> >index 29bf34c..0dc33b6 100644
> >--- a/drivers/net/wireless/b43/phy_g.c
> >+++ b/drivers/net/wireless/b43/phy_g.c
> >@@ -972,7 +972,7 @@ b43_radio_interference_mitigation_enable(struct b43_wldev *dev, int mode)
> > b43_phy_maskset(dev, 0x04A2, 0xFFF0, 0x000B);
> >
> > if (phy->rev>= 3) {
> >- b43_phy_mask(dev, 0x048A, (u16)~0x8000);
> >+ b43_phy_mask(dev, 0x048A, 0x7FFF);
>
> This cast was introduced to silense a GCC warning. Do we end up in an
> infinite loop now? ;)
This version has the beauty of pleasing both gcc and sparse. :-)
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
* [PATCH] wl1251: fix sparse-generated warnings
From: John W. Linville @ 2010-07-21 16:31 UTC (permalink / raw)
To: linux-wireless; +Cc: Kalle Valo, Luciano Coelho, John W. Linville
CHECK drivers/net/wireless/wl12xx/wl1251_tx.c
drivers/net/wireless/wl12xx/wl1251_tx.c:118:32: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_tx.c:118:32: expected unsigned short [unsigned] [usertype] frag_threshold
drivers/net/wireless/wl12xx/wl1251_tx.c:118:32: got restricted __le16 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_tx.c:164:24: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_tx.c:164:24: expected unsigned short [unsigned] [usertype] length
drivers/net/wireless/wl12xx/wl1251_tx.c:164:24: got restricted __le16 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_tx.c:166:22: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_tx.c:166:22: expected unsigned short [unsigned] [usertype] rate
drivers/net/wireless/wl12xx/wl1251_tx.c:166:22: got restricted __le16 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_tx.c:167:29: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_tx.c:167:29: expected unsigned int [unsigned] [usertype] expiry_time
drivers/net/wireless/wl12xx/wl1251_tx.c:167:29: got restricted __le32 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_tx.c:200:43: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/wl12xx/wl1251_tx.c:200:43: expected restricted __le16 [usertype] fc
drivers/net/wireless/wl12xx/wl1251_tx.c:200:43: got unsigned short [unsigned] [assigned] [usertype] fc
CHECK drivers/net/wireless/wl12xx/wl1251_cmd.c
drivers/net/wireless/wl12xx/wl1251_cmd.c:428:39: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_cmd.c:428:39: expected unsigned int [unsigned] [usertype] rx_config_options
drivers/net/wireless/wl12xx/wl1251_cmd.c:428:39: got restricted __le32 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_cmd.c:429:39: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_cmd.c:429:39: expected unsigned int [unsigned] [usertype] rx_filter_options
drivers/net/wireless/wl12xx/wl1251_cmd.c:429:39: got restricted __le32 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_cmd.c:435:29: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_cmd.c:435:29: expected unsigned short [unsigned] [usertype] tx_rate
drivers/net/wireless/wl12xx/wl1251_cmd.c:435:29: got restricted __le16 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_cmd.c:439:47: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_cmd.c:439:47: expected unsigned int [unsigned] [usertype] min_duration
drivers/net/wireless/wl12xx/wl1251_cmd.c:439:47: got restricted __le32 [usertype] <noident>
drivers/net/wireless/wl12xx/wl1251_cmd.c:441:47: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_cmd.c:441:47: expected unsigned int [unsigned] [usertype] max_duration
drivers/net/wireless/wl12xx/wl1251_cmd.c:441:47: got restricted __le32 [usertype] <noident>
CHECK drivers/net/wireless/wl12xx/wl1251_boot.c
drivers/net/wireless/wl12xx/wl1251_boot.c:228:22: warning: symbol 'interrupt' shadows an earlier one
/home/linville/git/wireless-next-2.6/arch/x86/include/asm/hw_irq.h:132:13: originally declared here
drivers/net/wireless/wl12xx/wl1251_boot.c:470:21: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1251_boot.c:470:21: expected unsigned int [unsigned] [assigned] [usertype] val
drivers/net/wireless/wl12xx/wl1251_boot.c:470:21: got restricted __le32 [usertype] <noident>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
I made some assumptions about the endian-ness of some structure members
-- please verify! Also, I'm reasonably certain there are more endian
issues lurking...
drivers/net/wireless/wl12xx/wl1251_boot.c | 10 +++++-----
drivers/net/wireless/wl12xx/wl1251_cmd.h | 12 ++++++------
drivers/net/wireless/wl12xx/wl1251_tx.c | 10 ++++++----
drivers/net/wireless/wl12xx/wl1251_tx.h | 8 ++++----
4 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1251_boot.c b/drivers/net/wireless/wl12xx/wl1251_boot.c
index 2545123..c688895 100644
--- a/drivers/net/wireless/wl12xx/wl1251_boot.c
+++ b/drivers/net/wireless/wl12xx/wl1251_boot.c
@@ -225,7 +225,7 @@ static void wl1251_boot_set_ecpu_ctrl(struct wl1251 *wl, u32 flag)
int wl1251_boot_run_firmware(struct wl1251 *wl)
{
int loop, ret;
- u32 chip_id, interrupt;
+ u32 chip_id, acx_intr;
wl1251_boot_set_ecpu_ctrl(wl, ECPU_CONTROL_HALT);
@@ -242,15 +242,15 @@ int wl1251_boot_run_firmware(struct wl1251 *wl)
loop = 0;
while (loop++ < INIT_LOOP) {
udelay(INIT_LOOP_DELAY);
- interrupt = wl1251_reg_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR);
+ acx_intr = wl1251_reg_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR);
- if (interrupt == 0xffffffff) {
+ if (acx_intr == 0xffffffff) {
wl1251_error("error reading hardware complete "
"init indication");
return -EIO;
}
/* check that ACX_INTR_INIT_COMPLETE is enabled */
- else if (interrupt & WL1251_ACX_INTR_INIT_COMPLETE) {
+ else if (acx_intr & WL1251_ACX_INTR_INIT_COMPLETE) {
wl1251_reg_write32(wl, ACX_REG_INTERRUPT_ACK,
WL1251_ACX_INTR_INIT_COMPLETE);
break;
@@ -467,7 +467,7 @@ static int wl1251_boot_upload_nvs(struct wl1251 *wl)
val = (nvs_ptr[0] | (nvs_ptr[1] << 8)
| (nvs_ptr[2] << 16) | (nvs_ptr[3] << 24));
- val = cpu_to_le32(val);
+ val = (u32 __force) cpu_to_le32(val);
wl1251_debug(DEBUG_BOOT,
"nvs write table 0x%x: 0x%x",
diff --git a/drivers/net/wireless/wl12xx/wl1251_cmd.h b/drivers/net/wireless/wl12xx/wl1251_cmd.h
index 4ad67ca..ca1cb24 100644
--- a/drivers/net/wireless/wl12xx/wl1251_cmd.h
+++ b/drivers/net/wireless/wl12xx/wl1251_cmd.h
@@ -175,8 +175,8 @@ struct cmd_read_write_memory {
#define WL1251_SCAN_NUM_PROBES 3
struct wl1251_scan_parameters {
- u32 rx_config_options;
- u32 rx_filter_options;
+ __le32 rx_config_options;
+ __le32 rx_filter_options;
/*
* Scan options:
@@ -186,7 +186,7 @@ struct wl1251_scan_parameters {
* bit 2: voice mode, 0 for normal scan.
* bit 3: scan priority, 1 for high priority.
*/
- u16 scan_options;
+ __le16 scan_options;
/* Number of channels to scan */
u8 num_channels;
@@ -195,7 +195,7 @@ struct wl1251_scan_parameters {
u8 num_probe_requests;
/* Rate and modulation for probe requests */
- u16 tx_rate;
+ __le16 tx_rate;
u8 tid_trigger;
u8 ssid_len;
@@ -204,8 +204,8 @@ struct wl1251_scan_parameters {
} __attribute__ ((packed));
struct wl1251_scan_ch_parameters {
- u32 min_duration; /* in TU */
- u32 max_duration; /* in TU */
+ __le32 min_duration; /* in TU */
+ __le32 max_duration; /* in TU */
u32 bssid_lsb;
u16 bssid_msb;
diff --git a/drivers/net/wireless/wl12xx/wl1251_tx.c b/drivers/net/wireless/wl12xx/wl1251_tx.c
index c822318..a38ec19 100644
--- a/drivers/net/wireless/wl12xx/wl1251_tx.c
+++ b/drivers/net/wireless/wl12xx/wl1251_tx.c
@@ -117,7 +117,7 @@ static void wl1251_tx_frag_block_num(struct tx_double_buffer_desc *tx_hdr)
frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD;
tx_hdr->frag_threshold = cpu_to_le16(frag_threshold);
- payload_len = tx_hdr->length + MAX_MSDU_SECURITY_LENGTH;
+ payload_len = le16_to_cpu(tx_hdr->length) + MAX_MSDU_SECURITY_LENGTH;
if (payload_len > frag_threshold) {
mem_blocks_per_frag =
@@ -191,11 +191,13 @@ static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb,
if (control->control.hw_key &&
control->control.hw_key->alg == ALG_TKIP) {
int hdrlen;
- u16 fc;
+ __le16 fc;
+ u16 length;
u8 *pos;
- fc = *(u16 *)(skb->data + sizeof(*tx_hdr));
- tx_hdr->length += WL1251_TKIP_IV_SPACE;
+ fc = *(__le16 *)(skb->data + sizeof(*tx_hdr));
+ length = le16_to_cpu(tx_hdr->length) + WL1251_TKIP_IV_SPACE;
+ tx_hdr->length = cpu_to_le16(length);
hdrlen = ieee80211_hdrlen(fc);
diff --git a/drivers/net/wireless/wl12xx/wl1251_tx.h b/drivers/net/wireless/wl12xx/wl1251_tx.h
index 55856c6..dff127f 100644
--- a/drivers/net/wireless/wl12xx/wl1251_tx.h
+++ b/drivers/net/wireless/wl12xx/wl1251_tx.h
@@ -114,7 +114,7 @@ struct tx_control {
struct tx_double_buffer_desc {
/* Length of payload, including headers. */
- u16 length;
+ __le16 length;
/*
* A bit mask that specifies the initial rate to be used
@@ -133,10 +133,10 @@ struct tx_double_buffer_desc {
* 0x0800 - 48Mbits
* 0x1000 - 54Mbits
*/
- u16 rate;
+ __le16 rate;
/* Time in us that a packet can spend in the target */
- u32 expiry_time;
+ __le32 expiry_time;
/* index of the TX queue used for this packet */
u8 xmit_queue;
@@ -150,7 +150,7 @@ struct tx_double_buffer_desc {
* The FW should cut the packet into fragments
* of this size.
*/
- u16 frag_threshold;
+ __le16 frag_threshold;
/* Numbers of HW queue blocks to be allocated */
u8 num_mem_blocks;
--
1.7.1.1
^ permalink raw reply related
* Re: [PATCH] b43: silense most sparse warnings
From: Larry Finger @ 2010-07-21 16:48 UTC (permalink / raw)
To: Michael Büsch
Cc: John W. Linville, linux-wireless, Larry Finger,
Gábor Stefanik, Rafał Miłecki
In-Reply-To: <4C471AC2.5040003@bu3sch.de>
[-- Attachment #1: Type: text/plain, Size: 4880 bytes --]
On 07/21/2010 11:05 AM, Michael Büsch wrote:
> On 07/21/2010 05:45 PM, John W. Linville wrote:
>> diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
>> index 29bf34c..0dc33b6 100644
>> --- a/drivers/net/wireless/b43/phy_g.c
>> +++ b/drivers/net/wireless/b43/phy_g.c
>> @@ -972,7 +972,7 @@ b43_radio_interference_mitigation_enable(struct b43_wldev
>> *dev, int mode)
>> b43_phy_maskset(dev, 0x04A2, 0xFFF0, 0x000B);
>>
>> if (phy->rev>= 3) {
>> - b43_phy_mask(dev, 0x048A, (u16)~0x8000);
>> + b43_phy_mask(dev, 0x048A, 0x7FFF);
>
> This cast was introduced to silense a GCC warning. Do we end up in an
> infinite loop now? ;)
I get no GCC warnings here with the change. I think it is OK.
Is silense a valid British spelling? I prefer silence.
Do you wish to clean up the warnings from the N-PHY code as well? Ignoring the
"should it be static?" parts, I get the following sparse warnings:
drivers/net/wireless/b43/phy_n.c:512:53: warning: cast truncates bits from
constant value (ffff0fff becomes fff)
drivers/net/wireless/b43/phy_n.c:765:66: warning: cast truncates bits from
constant value (ffff7fff becomes 7fff)
drivers/net/wireless/b43/phy_n.c:1012:38: warning: cast truncates bits from
constant value (ffff00ff becomes ff)
drivers/net/wireless/b43/phy_n.c:1119:38: warning: cast truncates bits from
constant value (ffff0fff becomes fff)
drivers/net/wireless/b43/phy_n.c:2458:56: warning: cast truncates bits from
constant value (ffff7fff becomes 7fff)
drivers/net/wireless/b43/phy_n.c:2933:38: warning: cast truncates bits from
constant value (ffff0fff becomes fff)
drivers/net/wireless/b43/phy_n.c:3294:57: warning: cast truncates bits from
constant value (ffff3fff becomes 3fff)
The patch for them is below.
Larry
Index: wireless-testing/drivers/net/wireless/b43/phy_n.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/phy_n.c
+++ wireless-testing/drivers/net/wireless/b43/phy_n.c
@@ -509,8 +509,8 @@ static void b43_nphy_rx_cal_phy_setup(st
b43_phy_mask(dev, B43_NPHY_PAPD_EN0, ~0x0001);
b43_phy_mask(dev, B43_NPHY_PAPD_EN1, ~0x0001);
- b43_phy_maskset(dev, B43_NPHY_RFSEQCA, (u16)~B43_NPHY_RFSEQCA_RXDIS,
- ((1 - core) << B43_NPHY_RFSEQCA_RXDIS_SHIFT));
+ b43_phy_maskset(dev, B43_NPHY_RFSEQCA, (u16)(~B43_NPHY_RFSEQCA_RXDIS &
+ 0xFFFF), ((1 - core) << B43_NPHY_RFSEQCA_RXDIS_SHIFT));
b43_phy_maskset(dev, B43_NPHY_RFSEQCA, ~B43_NPHY_RFSEQCA_TXEN,
((1 - core) << B43_NPHY_RFSEQCA_TXEN_SHIFT));
b43_phy_maskset(dev, B43_NPHY_RFSEQCA, ~B43_NPHY_RFSEQCA_RXEN,
@@ -762,7 +762,7 @@ static void b43_nphy_stop_playback(struc
if (tmp & 0x1)
b43_phy_set(dev, B43_NPHY_SAMP_CMD, B43_NPHY_SAMP_CMD_STOP);
else if (tmp & 0x2)
- b43_phy_mask(dev, B43_NPHY_IQLOCAL_CMDGCTL, (u16)~0x8000);
+ b43_phy_mask(dev, B43_NPHY_IQLOCAL_CMDGCTL, 0x7FFF);
b43_phy_mask(dev, B43_NPHY_SAMP_CMD, ~0x0004);
@@ -1009,7 +1009,7 @@ static void b43_nphy_gain_crtl_workaroun
b43_nphy_set_rf_sequence(dev, 5,
rfseq_events, rfseq_delays, 3);
b43_phy_maskset(dev, B43_NPHY_OVER_DGAIN1,
- (u16)~B43_NPHY_OVER_DGAIN_CCKDGECV,
+ (u16)(~B43_NPHY_OVER_DGAIN_CCKDGECV & 0xFFFF),
0x5A << B43_NPHY_OVER_DGAIN_CCKDGECV_SHIFT);
if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
@@ -1116,7 +1116,7 @@ static void b43_nphy_workarounds(struct
b43_phy_write(dev, B43_NPHY_PHASETR_B2, 0x20);
b43_phy_mask(dev, B43_NPHY_PIL_DW1,
- (u16)~B43_NPHY_PIL_DW_64QAM);
+ (u16)(~B43_NPHY_PIL_DW_64QAM & 0xFFFF));
b43_phy_write(dev, B43_NPHY_TXF_20CO_S2B1, 0xB5);
b43_phy_write(dev, B43_NPHY_TXF_20CO_S2B2, 0xA4);
b43_phy_write(dev, B43_NPHY_TXF_20CO_S2B3, 0x00);
@@ -2455,7 +2455,8 @@ static void b43_nphy_tx_cal_phy_setup(st
b43_phy_write(dev, B43_NPHY_AFECTL_OVER, tmp | 0x0600);
regs[4] = b43_phy_read(dev, B43_NPHY_BBCFG);
- b43_phy_mask(dev, B43_NPHY_BBCFG, (u16)~B43_NPHY_BBCFG_RSTRX);
+ b43_phy_mask(dev, B43_NPHY_BBCFG, (u16)(~B43_NPHY_BBCFG_RSTRX
+ & 0xFFFF));
tmp = b43_ntab_read(dev, B43_NTAB16(8, 3));
regs[5] = tmp;
@@ -2930,7 +2931,7 @@ static int b43_nphy_rev2_cal_rx_iq(struc
tmp[5] = b43_phy_read(dev, rfctl[1]);
b43_phy_maskset(dev, B43_NPHY_RFSEQCA,
- (u16)~B43_NPHY_RFSEQCA_RXDIS,
+ (u16)(~B43_NPHY_RFSEQCA_RXDIS & 0xFFFF),
((1 - i) << B43_NPHY_RFSEQCA_RXDIS_SHIFT));
b43_phy_maskset(dev, B43_NPHY_RFSEQCA, ~B43_NPHY_RFSEQCA_TXEN,
(1 - i));
@@ -3291,7 +3292,7 @@ static void b43_nphy_chanspec_setup(stru
b43_phy_mask(dev, B43_NPHY_BANDCTL, ~B43_NPHY_BANDCTL_5GHZ);
tmp32 = b43_read32(dev, B43_MMIO_PSM_PHY_HDR);
b43_write32(dev, B43_MMIO_PSM_PHY_HDR, tmp32 | 4);
- b43_phy_mask(dev, B43_PHY_B_BBCFG, (u16)~0xC000);
+ b43_phy_mask(dev, B43_PHY_B_BBCFG, 0x3FFF);
b43_write32(dev, B43_MMIO_PSM_PHY_HDR, tmp32);
}
[-- Attachment #2: b43_silence_most_sparse_warnings --]
[-- Type: text/plain, Size: 9749 bytes --]
Subject: [PATCH] b43: silense most sparse warnings
From: "John W. Linville" <linville@tuxdriver.com>
Date: Wed, 21 Jul 2010 11:45:42 -0400
To: linux-wireless@vger.kernel.org
CC: Michael Buesch <mb@bu3sch.de>, Larry Finger <Larry.Finger@wfinger.net>, Gábor Stefanik <netrolller.3d@gmail.com>, RafaÅ MiÅecki <zajec5@gmail.com>, "John W. Linville" <linville@tuxdriver.com>
CHECK drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/main.c:111:5: warning: symbol 'b43_modparam_pio' was not declared. Should it be static?
CHECK drivers/net/wireless/b43/phy_g.c
drivers/net/wireless/b43/phy_g.c:975:56: warning: cast truncates bits from constant value (ffff7fff becomes 7fff)
CHECK drivers/net/wireless/b43/phy_lp.c
drivers/net/wireless/b43/phy_lp.c:2701:6: warning: symbol 'b43_lpphy_op_switch_analog' was not declared. Should it be static?
drivers/net/wireless/b43/phy_lp.c:1148:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff)
drivers/net/wireless/b43/phy_lp.c:1525:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff)
drivers/net/wireless/b43/phy_lp.c:1529:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff)
CHECK drivers/net/wireless/b43/wa.c
drivers/net/wireless/b43/wa.c:385:60: warning: cast truncates bits from constant value (ffff00ff becomes ff)
drivers/net/wireless/b43/wa.c:403:55: warning: cast truncates bits from constant value (ffff00ff becomes ff)
drivers/net/wireless/b43/wa.c:405:55: warning: cast truncates bits from constant value (ffff00ff becomes ff)
drivers/net/wireless/b43/wa.c:415:71: warning: cast truncates bits from constant value (ffff0fff becomes fff)
AFAICT, none of these amount to real bugs. But this reduces warning
spam from sparse w/o significantly affecting readability of the code (IMHO).
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/b43/main.c | 2 +-
drivers/net/wireless/b43/phy_g.c | 2 +-
drivers/net/wireless/b43/phy_lp.c | 8 ++++----
drivers/net/wireless/b43/wa.c | 8 ++++----
4 files changed, 10 insertions(+), 10 deletions(-)
Index: wireless-testing/drivers/net/wireless/b43/main.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/main.c
+++ wireless-testing/drivers/net/wireless/b43/main.c
@@ -108,7 +108,7 @@ int b43_modparam_verbose = B43_VERBOSITY
module_param_named(verbose, b43_modparam_verbose, int, 0644);
MODULE_PARM_DESC(verbose, "Log message verbosity: 0=error, 1=warn, 2=info(default), 3=debug");
-int b43_modparam_pio = B43_PIO_DEFAULT;
+static int b43_modparam_pio = B43_PIO_DEFAULT;
module_param_named(pio, b43_modparam_pio, int, 0644);
MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
Index: wireless-testing/drivers/net/wireless/b43/phy_g.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/phy_g.c
+++ wireless-testing/drivers/net/wireless/b43/phy_g.c
@@ -972,7 +972,7 @@ b43_radio_interference_mitigation_enable
b43_phy_maskset(dev, 0x04A2, 0xFFF0, 0x000B);
if (phy->rev >= 3) {
- b43_phy_mask(dev, 0x048A, (u16)~0x8000);
+ b43_phy_mask(dev, 0x048A, 0x7FFF);
b43_phy_maskset(dev, 0x0415, 0x8000, 0x36D8);
b43_phy_maskset(dev, 0x0416, 0x8000, 0x36D8);
b43_phy_maskset(dev, 0x0417, 0xFE00, 0x016D);
Index: wireless-testing/drivers/net/wireless/b43/phy_lp.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/phy_lp.c
+++ wireless-testing/drivers/net/wireless/b43/phy_lp.c
@@ -1145,7 +1145,7 @@ static void lpphy_write_tx_pctl_mode_to_
B43_WARN_ON(1);
}
b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD,
- (u16)~B43_LPPHY_TX_PWR_CTL_CMD_MODE, ctl);
+ ~B43_LPPHY_TX_PWR_CTL_CMD_MODE & 0xFFFF, ctl);
}
static void lpphy_set_tx_power_control(struct b43_wldev *dev,
@@ -1522,11 +1522,11 @@ static void lpphy_tx_pctl_init_hw(struct
b43_phy_mask(dev, B43_LPPHY_TX_PWR_CTL_DELTAPWR_LIMIT, 0xFF);
b43_phy_write(dev, B43_LPPHY_TX_PWR_CTL_DELTAPWR_LIMIT, 0xA);
b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD,
- (u16)~B43_LPPHY_TX_PWR_CTL_CMD_MODE,
+ ~B43_LPPHY_TX_PWR_CTL_CMD_MODE & 0xFFFF,
B43_LPPHY_TX_PWR_CTL_CMD_MODE_OFF);
b43_phy_mask(dev, B43_LPPHY_TX_PWR_CTL_NNUM, 0xF8FF);
b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD,
- (u16)~B43_LPPHY_TX_PWR_CTL_CMD_MODE,
+ ~B43_LPPHY_TX_PWR_CTL_CMD_MODE & 0xFFFF,
B43_LPPHY_TX_PWR_CTL_CMD_MODE_SW);
if (dev->phy.rev < 2) {
@@ -2698,7 +2698,7 @@ static enum b43_txpwr_result b43_lpphy_o
return B43_TXPWR_RES_DONE;
}
-void b43_lpphy_op_switch_analog(struct b43_wldev *dev, bool on)
+static void b43_lpphy_op_switch_analog(struct b43_wldev *dev, bool on)
{
if (on) {
b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xfff8);
Index: wireless-testing/drivers/net/wireless/b43/wa.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/wa.c
+++ wireless-testing/drivers/net/wireless/b43/wa.c
@@ -382,7 +382,7 @@ static void b43_wa_altagc(struct b43_wld
b43_ofdmtab_write16(dev, B43_OFDMTAB_AGC1, 3, 25);
}
- b43_phy_maskset(dev, B43_PHY_CCKSHIFTBITS_WA, (u16)~0xFF00, 0x5700);
+ b43_phy_maskset(dev, B43_PHY_CCKSHIFTBITS_WA, 0x00FF, 0x5700);
b43_phy_maskset(dev, B43_PHY_OFDM(0x1A), ~0x007F, 0x000F);
b43_phy_maskset(dev, B43_PHY_OFDM(0x1A), ~0x3F80, 0x2B80);
b43_phy_maskset(dev, B43_PHY_ANTWRSETT, 0xF0FF, 0x0300);
@@ -400,9 +400,9 @@ static void b43_wa_altagc(struct b43_wld
b43_phy_maskset(dev, B43_PHY_OFDM(0x89), ~0x00FF, 0x0020);
b43_phy_maskset(dev, B43_PHY_OFDM(0x89), ~0x3F00, 0x0200);
b43_phy_maskset(dev, B43_PHY_OFDM(0x82), ~0x00FF, 0x002E);
- b43_phy_maskset(dev, B43_PHY_OFDM(0x96), (u16)~0xFF00, 0x1A00);
+ b43_phy_maskset(dev, B43_PHY_OFDM(0x96), 0x00FF, 0x1A00);
b43_phy_maskset(dev, B43_PHY_OFDM(0x81), ~0x00FF, 0x0028);
- b43_phy_maskset(dev, B43_PHY_OFDM(0x81), (u16)~0xFF00, 0x2C00);
+ b43_phy_maskset(dev, B43_PHY_OFDM(0x81), 0x00FF, 0x2C00);
if (phy->rev == 1) {
b43_phy_write(dev, B43_PHY_PEAK_COUNT, 0x092B);
b43_phy_maskset(dev, B43_PHY_OFDM(0x1B), ~0x001E, 0x0002);
@@ -412,7 +412,7 @@ static void b43_wa_altagc(struct b43_wld
b43_phy_maskset(dev, B43_PHY_LPFGAINCTL, ~0x000F, 0x0004);
if (phy->rev >= 6) {
b43_phy_write(dev, B43_PHY_OFDM(0x22), 0x287A);
- b43_phy_maskset(dev, B43_PHY_LPFGAINCTL, (u16)~0xF000, 0x3000);
+ b43_phy_maskset(dev, B43_PHY_LPFGAINCTL, 0x0FFF, 0x3000);
}
}
b43_phy_maskset(dev, B43_PHY_DIVSRCHIDX, 0x8080, 0x7874);
Index: wireless-testing/drivers/net/wireless/b43/phy_n.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/phy_n.c
+++ wireless-testing/drivers/net/wireless/b43/phy_n.c
@@ -509,8 +509,8 @@ static void b43_nphy_rx_cal_phy_setup(st
b43_phy_mask(dev, B43_NPHY_PAPD_EN0, ~0x0001);
b43_phy_mask(dev, B43_NPHY_PAPD_EN1, ~0x0001);
- b43_phy_maskset(dev, B43_NPHY_RFSEQCA, (u16)~B43_NPHY_RFSEQCA_RXDIS,
- ((1 - core) << B43_NPHY_RFSEQCA_RXDIS_SHIFT));
+ b43_phy_maskset(dev, B43_NPHY_RFSEQCA, (u16)(~B43_NPHY_RFSEQCA_RXDIS &
+ 0xFFFF), ((1 - core) << B43_NPHY_RFSEQCA_RXDIS_SHIFT));
b43_phy_maskset(dev, B43_NPHY_RFSEQCA, ~B43_NPHY_RFSEQCA_TXEN,
((1 - core) << B43_NPHY_RFSEQCA_TXEN_SHIFT));
b43_phy_maskset(dev, B43_NPHY_RFSEQCA, ~B43_NPHY_RFSEQCA_RXEN,
@@ -762,7 +762,7 @@ static void b43_nphy_stop_playback(struc
if (tmp & 0x1)
b43_phy_set(dev, B43_NPHY_SAMP_CMD, B43_NPHY_SAMP_CMD_STOP);
else if (tmp & 0x2)
- b43_phy_mask(dev, B43_NPHY_IQLOCAL_CMDGCTL, (u16)~0x8000);
+ b43_phy_mask(dev, B43_NPHY_IQLOCAL_CMDGCTL, 0x7FFF);
b43_phy_mask(dev, B43_NPHY_SAMP_CMD, ~0x0004);
@@ -1009,7 +1009,7 @@ static void b43_nphy_gain_crtl_workaroun
b43_nphy_set_rf_sequence(dev, 5,
rfseq_events, rfseq_delays, 3);
b43_phy_maskset(dev, B43_NPHY_OVER_DGAIN1,
- (u16)~B43_NPHY_OVER_DGAIN_CCKDGECV,
+ (u16)(~B43_NPHY_OVER_DGAIN_CCKDGECV & 0xFFFF),
0x5A << B43_NPHY_OVER_DGAIN_CCKDGECV_SHIFT);
if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
@@ -1116,7 +1116,7 @@ static void b43_nphy_workarounds(struct
b43_phy_write(dev, B43_NPHY_PHASETR_B2, 0x20);
b43_phy_mask(dev, B43_NPHY_PIL_DW1,
- (u16)~B43_NPHY_PIL_DW_64QAM);
+ (u16)(~B43_NPHY_PIL_DW_64QAM & 0xFFFF));
b43_phy_write(dev, B43_NPHY_TXF_20CO_S2B1, 0xB5);
b43_phy_write(dev, B43_NPHY_TXF_20CO_S2B2, 0xA4);
b43_phy_write(dev, B43_NPHY_TXF_20CO_S2B3, 0x00);
@@ -2455,7 +2455,8 @@ static void b43_nphy_tx_cal_phy_setup(st
b43_phy_write(dev, B43_NPHY_AFECTL_OVER, tmp | 0x0600);
regs[4] = b43_phy_read(dev, B43_NPHY_BBCFG);
- b43_phy_mask(dev, B43_NPHY_BBCFG, (u16)~B43_NPHY_BBCFG_RSTRX);
+ b43_phy_mask(dev, B43_NPHY_BBCFG, (u16)(~B43_NPHY_BBCFG_RSTRX
+ & 0xFFFF));
tmp = b43_ntab_read(dev, B43_NTAB16(8, 3));
regs[5] = tmp;
@@ -2930,7 +2931,7 @@ static int b43_nphy_rev2_cal_rx_iq(struc
tmp[5] = b43_phy_read(dev, rfctl[1]);
b43_phy_maskset(dev, B43_NPHY_RFSEQCA,
- (u16)~B43_NPHY_RFSEQCA_RXDIS,
+ (u16)(~B43_NPHY_RFSEQCA_RXDIS & 0xFFFF),
((1 - i) << B43_NPHY_RFSEQCA_RXDIS_SHIFT));
b43_phy_maskset(dev, B43_NPHY_RFSEQCA, ~B43_NPHY_RFSEQCA_TXEN,
(1 - i));
@@ -3291,7 +3292,7 @@ static void b43_nphy_chanspec_setup(stru
b43_phy_mask(dev, B43_NPHY_BANDCTL, ~B43_NPHY_BANDCTL_5GHZ);
tmp32 = b43_read32(dev, B43_MMIO_PSM_PHY_HDR);
b43_write32(dev, B43_MMIO_PSM_PHY_HDR, tmp32 | 4);
- b43_phy_mask(dev, B43_PHY_B_BBCFG, (u16)~0xC000);
+ b43_phy_mask(dev, B43_PHY_B_BBCFG, 0x3FFF);
b43_write32(dev, B43_MMIO_PSM_PHY_HDR, tmp32);
}
^ permalink raw reply
* Re: wl1271 firmware
From: Pazzo Da Legare @ 2010-07-21 17:01 UTC (permalink / raw)
To: linux-wireless; +Cc: Levi, Shahar, Luciano Coelho, Logan Gunthorpe
In-Reply-To: <4C45ED36.2090604@deltatee.com>
Dear All,
Dear Shahar,
I tried your files but I had errors from the driver.
# ifconfig wlan0 up
[ 194.470000] wl1271_sdio mmc0:0001:2: firmware: requesting wl1271-fw.bin
[ 194.620000] wl1271_sdio mmc0:0001:2: firmware: requesting wl1271-nvs.bin
[ 195.080000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
root@hawkboard:~# [ 195.590000] wl1271: ERROR ELP wakeup timeout!
I tried to scan but it doesn't work. Note that I'm using a driver
built from compact-wireless-2010-06-20 and I'm going to try to update.
Thank you for your help again,
pz
2010/7/20 Logan Gunthorpe <logang@deltatee.com>:
> Hi Sharar,
>
> Thanks a lot. I'm pleased to report that our module appears to be working
> with the firmware and NVS files you supplied.
>
> Logan
>
> Levi, Shahar wrote:
>>>
>>> -----Original Message-----
>>> From: Levi, Shahar
>>> Sent: Saturday, July 17, 2010 3:20 PM
>>> To: Pazzo Da Legare
>>> Cc: linux-wireless@vger.kernel.org; Logan Gunthorpe; Luciano Coelho
>>> Subject: RE: wl1271 firmware
>>> Hi Pazzo,
>>> I am still pushing the legal stuff to make it happened. I hope to close
>>> that in a few days.
>>> Regards,
>>> Shahar
>>
>> Hi Pazzo and Logan,
>> Until the file will publish in TI web I am enclosing the file for you in
>> the mail.
>> I will publish link to the community as soon it will be in the TI web.
>>
>> Regards,
>> Shahar
>>
>
^ permalink raw reply
* Re: [PATCH] rtl8180: improve signal reporting for rtl8185 hardware
From: Pauli Nieminen @ 2010-07-21 17:07 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless
In-Reply-To: <20100721133320.GB2355@tuxdriver.com>
On Wed, Jul 21, 2010 at 4:33 PM, John W. Linville
<linville@tuxdriver.com> wrote:
> On Wed, Jul 21, 2010 at 08:08:41AM +0300, Pauli Nieminen wrote:
>> On Mon, Jul 19, 2010 at 11:47 PM, John W. Linville
>> <linville@tuxdriver.com> wrote:
>> > The existing code seemed to be somewhat based on the datasheet, but
>> > varied substantially from the vendor-provided driver. This mirrors the
>> > handling of the rtl8185 case from that driver, but still neglects the
>> > specifics for the rtl8180 hardware. Those details are a bit muddled...
>> >
>> > Signed-off-by: John W. Linville <linville@tuxdriver.com>
>> > ---
>> > drivers/net/wireless/rtl818x/rtl8180_dev.c | 11 ++++++++---
>> > 1 files changed, 8 insertions(+), 3 deletions(-)
>
>> I tested this version of patch. Patch didn't apply cleanly for some
>> reason even tough when I mnauly typed it diff looks same.
>
> Please try the v2 version of the patch. Some "back of the envelope"
> math suggests that the v2 version of the patch will give numbers more
> to your liking.
>
> John
> --
> John W. Linville Someday the world will need a hero, and you
> linville@tuxdriver.com might be all we have. Be ready.
>
But version 2 doesn't change the fact that driver is going to report
same signal strength even tough I know that only one wifi should have
100 % strength and others less than 50 %. There is only one router in
same room with me and all others routers are a lot more father away.
So driver is either reading wrong bits from hardware or my hardware is
broken.
^ permalink raw reply
* Re: [PATCH] b43: silense most sparse warnings
From: John W. Linville @ 2010-07-21 17:11 UTC (permalink / raw)
To: Larry Finger
Cc: Michael Büsch, linux-wireless, Larry Finger,
Gábor Stefanik, Rafał Miłecki
In-Reply-To: <4C4724C5.4080400@lwfinger.net>
On Wed, Jul 21, 2010 at 11:48:05AM -0500, Larry Finger wrote:
> On 07/21/2010 11:05 AM, Michael Büsch wrote:
> >On 07/21/2010 05:45 PM, John W. Linville wrote:
> >>diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
> >>index 29bf34c..0dc33b6 100644
> >>--- a/drivers/net/wireless/b43/phy_g.c
> >>+++ b/drivers/net/wireless/b43/phy_g.c
> >>@@ -972,7 +972,7 @@ b43_radio_interference_mitigation_enable(struct b43_wldev
> >>*dev, int mode)
> >>b43_phy_maskset(dev, 0x04A2, 0xFFF0, 0x000B);
> >>
> >>if (phy->rev>= 3) {
> >>- b43_phy_mask(dev, 0x048A, (u16)~0x8000);
> >>+ b43_phy_mask(dev, 0x048A, 0x7FFF);
> >
> >This cast was introduced to silense a GCC warning. Do we end up in an
> >infinite loop now? ;)
>
> I get no GCC warnings here with the change. I think it is OK.
>
> Is silense a valid British spelling? I prefer silence.
Just a typo. :-)
> Do you wish to clean up the warnings from the N-PHY code as well?
> Ignoring the "should it be static?" parts, I get the following
> sparse warnings:
>
> drivers/net/wireless/b43/phy_n.c:512:53: warning: cast truncates
> bits from constant value (ffff0fff becomes fff)
> drivers/net/wireless/b43/phy_n.c:765:66: warning: cast truncates
> bits from constant value (ffff7fff becomes 7fff)
> drivers/net/wireless/b43/phy_n.c:1012:38: warning: cast truncates
> bits from constant value (ffff00ff becomes ff)
> drivers/net/wireless/b43/phy_n.c:1119:38: warning: cast truncates
> bits from constant value (ffff0fff becomes fff)
> drivers/net/wireless/b43/phy_n.c:2458:56: warning: cast truncates
> bits from constant value (ffff7fff becomes 7fff)
> drivers/net/wireless/b43/phy_n.c:2933:38: warning: cast truncates
> bits from constant value (ffff0fff becomes fff)
> drivers/net/wireless/b43/phy_n.c:3294:57: warning: cast truncates
> bits from constant value (ffff3fff becomes 3fff)
>
> The patch for them is below.
Seems fine -- shall I add your Signed-off-by?
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
* Re: [PATCH] rtl8180: improve signal reporting for rtl8185 hardware
From: Pauli Nieminen @ 2010-07-21 17:22 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless
In-Reply-To: <AANLkTint5uT6PQ8pmEIVSoVYOSCZE5k-TGB1knwHtupw@mail.gmail.com>
On Wed, Jul 21, 2010 at 8:07 PM, Pauli Nieminen <suokkos@gmail.com> wrote:
> On Wed, Jul 21, 2010 at 4:33 PM, John W. Linville
> <linville@tuxdriver.com> wrote:
>> On Wed, Jul 21, 2010 at 08:08:41AM +0300, Pauli Nieminen wrote:
>>> On Mon, Jul 19, 2010 at 11:47 PM, John W. Linville
>>> <linville@tuxdriver.com> wrote:
>>> > The existing code seemed to be somewhat based on the datasheet, but
>>> > varied substantially from the vendor-provided driver. This mirrors the
>>> > handling of the rtl8185 case from that driver, but still neglects the
>>> > specifics for the rtl8180 hardware. Those details are a bit muddled...
>>> >
>>> > Signed-off-by: John W. Linville <linville@tuxdriver.com>
>>> > ---
>>> > drivers/net/wireless/rtl818x/rtl8180_dev.c | 11 ++++++++---
>>> > 1 files changed, 8 insertions(+), 3 deletions(-)
>>
>>> I tested this version of patch. Patch didn't apply cleanly for some
>>> reason even tough when I mnauly typed it diff looks same.
>>
>> Please try the v2 version of the patch. Some "back of the envelope"
>> math suggests that the v2 version of the patch will give numbers more
>> to your liking.
>>
>> John
>> --
>> John W. Linville Someday the world will need a hero, and you
>> linville@tuxdriver.com might be all we have. Be ready.
>>
>
> But version 2 doesn't change the fact that driver is going to report
> same signal strength even tough I know that only one wifi should have
> 100 % strength and others less than 50 %. There is only one router in
> same room with me and all others routers are a lot more father away.
> So driver is either reading wrong bits from hardware or my hardware is
> broken.
>
yes. This time all networks are showing signal strength of 100%.
But I added some debug output to driver:
printk(KERN_DEBUG " [rtl debug] %x %x, signal %x\n", flags, flags2, signal);
after the raw signal value is extracted from flags2.
So what is in flags2 & 0x7f ?
[ 933.501140] [rtl debug] 30050115 27e26, signal 1
[ 933.506067] [rtl debug] 3005004b 27f06, signal 1
[ 933.518955] [rtl debug] 30050067 27f40, signal 1
[ 933.553504] [rtl debug] 30050093 27f14, signal 1
[ 933.574740] [rtl debug] 3005014f 27f35, signal 1
[ 933.603517] [rtl debug] 30050115 27e36, signal 1
[ 933.608457] [rtl debug] 3005004b 27f10, signal 1
[ 933.621354] [rtl debug] 30050067 27f22, signal 1
[ 933.655899] [rtl debug] 30050093 27f0c, signal 1
[ 933.677129] [rtl debug] 3005014f 27f5d, signal 1
[ 933.705938] [rtl debug] 30050115 27e35, signal 1
[ 933.710849] [rtl debug] 3005004b 27f14, signal 1
[ 933.723766] [rtl debug] 30050067 27f1f, signal 1
[ 933.758294] [rtl debug] 30050093 27f0d, signal 1
[ 933.779520] [rtl debug] 3005014f 27f23, signal 1
[ 933.791609] [rtl debug] 3002008d 27f0b, signal 1
[ 933.793015] [rtl debug] 30220067 27f15, signal 1
[ 933.799226] [rtl debug] 300201a7 27f1d, signal 1
[ 933.808314] [rtl debug] 30050115 27e32, signal 1
[ 933.813240] [rtl debug] 3005004b 27f2a, signal 1
[ 933.887783] [rtl debug] 30020170 27e1b, signal 1
[ 933.983846] [rtl debug] 30020170 27e08, signal 1
[ 933.986958] [rtl debug] 3002008d 27e6a, signal 1
[ 934.013075] [rtl debug] 30050115 27e06, signal 1
[ 934.040769] [rtl debug] 300500aa 27f2d, signal 1
[ 934.050505] [rtl debug] 30050070 27e74, signal 1
[ 934.078256] [rtl debug] 300200a4 27e35, signal 1
[ 934.115455] [rtl debug] 30050115 27e2d, signal 1
[ 934.143156] [rtl debug] 300500aa 27f2d, signal 1
[ 934.153119] [rtl debug] 3005011e 27f11, signal 1
[ 934.178435] [rtl debug] 3002006a 27f3f, signal 1
[ 934.182284] [rtl debug] 700200a4 27f38, signal 1
[ 934.245545] [rtl debug] 300500aa 27f07, signal 1
[ 934.255291] [rtl debug] 30050070 27f19, signal 1
[ 934.263122] [rtl debug] 300500b1 27f56, signal 1
[ 934.269774] [rtl debug] 3002006a 27f37, signal 1
[ 934.272079] [rtl debug] 300200a4 27f09, signal 1
[ 934.278878] [rtl debug] 300500b2 27f14, signal 1
[ 934.295966] [rtl debug] 3005006b 27f22, signal 1
[ 934.347946] [rtl debug] 300500aa 27f38, signal 1
[ 934.357664] [rtl debug] 30050070 27f25, signal 1
[ 934.370020] [rtl debug] 300200a4 27f5d, signal 1
[ 934.371459] [rtl debug] 30020069 27f44, signal 1
[ 934.391963] [rtl debug] 30050070 27e23, signal 1
[ 934.398341] [rtl debug] 3005006b 27f53, signal 1
[ 934.450319] [rtl debug] 300500aa 27f47, signal 1
[ 934.460050] [rtl debug] 30050070 27e3d, signal 1
[ 934.461697] [rtl debug] 3002006a 27f5e, signal 1
[ 934.463394] [rtl debug] 3002006a 27f5c, signal 1
[ 934.464816] [rtl debug] 30020069 27f69, signal 1
[ 934.482014] [rtl debug] 30020067 27e51, signal 1
[ 934.494346] [rtl debug] 30050070 27f46, signal 1
[ 934.551575] [rtl debug] 3005007d 27f27, signal 1
[ 934.560559] [rtl debug] 30020069 27f10, signal 1
[ 934.562391] [rtl debug] 3002006a 27f27, signal 1
[ 934.582431] [rtl debug] 3005010d 27f22, signal 1
[ 934.596735] [rtl debug] 30050070 27e06, signal 1
[ 934.603122] [rtl debug] 3005006b 27f4a, signal 1
[ 934.642886] [rtl debug] 3005006d 27e08, signal 1
[ 934.653779] [rtl debug] 3002006a 27e0b, signal 1
[ 934.657375] [rtl debug] 30020067 27f71, signal 1
[ 934.667762] [rtl debug] 3002006b 27f45, signal 1
[ 934.672737] [rtl debug] 30020069 27f34, signal 1
[ 934.676975] [rtl debug] 70050071 27f38, signal 1
[ 934.699125] [rtl debug] 30050070 27f47, signal 1
[ 934.752097] [rtl debug] 300200f9 27e0a, signal 1
[ 934.753643] [rtl debug] 3002006a 27f79, signal 1
[ 934.756595] [rtl debug] 3005007d 27e0c, signal 1
[ 934.758060] [rtl debug] 30020069 27f4f, signal 1
[ 934.767387] [rtl debug] 3002006b 27f12, signal 1
[ 934.775403] [rtl debug] 3005006f 27f40, signal 1
[ 934.801523] [rtl debug] 30050070 27f4e, signal 1
[ 934.847670] [rtl debug] 3005006d 27f6b, signal 1
[ 934.889605] [rtl debug] 3005010d 27f47, signal 1
[ 934.903901] [rtl debug] 30050070 27f33, signal 1
[ 934.961145] [rtl debug] 3005007d 27f26, signal 1
[ 934.984144] [rtl debug] 30050071 27e5b, signal 1
[ 934.991995] [rtl debug] 3005010d 27f59, signal 1
[ 935.063539] [rtl debug] 3005007d 27f2e, signal 1
[ 935.086536] [rtl debug] 30050071 27e59, signal 1
[ 935.094391] [rtl debug] 3005010d 27f28, signal 1
[ 935.294095] [rtl debug] 30050093 27f0d, signal 1
[ 935.315383] [rtl debug] 3005014f 27f2d, signal 1
[ 935.344139] [rtl debug] 30050115 27e2f, signal 1
[ 935.349087] [rtl debug] 3005004b 27f16, signal 1
[ 935.362005] [rtl debug] 30050067 27f23, signal 1
[ 935.396495] [rtl debug] 30050093 27f0a, signal 1
[ 935.417782] [rtl debug] 3005014f 27f42, signal 1
[ 935.446524] [rtl debug] 30050115 27e31, signal 1
[ 935.451484] [rtl debug] 3005004b 27f30, signal 1
[ 935.464403] [rtl debug] 30050067 27f3a, signal 1
[ 935.498892] [rtl debug] 30050093 27f08, signal 1
[ 935.520185] [rtl debug] 3005014f 27f20, signal 1
[ 935.548933] [rtl debug] 30050115 27e44, signal 1
[ 935.553878] [rtl debug] 3005004b 27e2c, signal 1
[ 935.566800] [rtl debug] 70050067 27f3f, signal 1
[ 935.601287] [rtl debug] 30050093 27f0e, signal 1
[ 935.622570] [rtl debug] 3005014f 27f2e, signal 1
[ 935.651311] [rtl debug] 30050115 27e3f, signal 1
[ 935.656268] [rtl debug] 3005004b 27f07, signal 1
[ 935.669200] [rtl debug] 30050067 27e1b, signal 1
[ 935.747870] [rtl debug] 30020170 27e1b, signal 1
[ 935.806065] [rtl debug] 30050093 27e3d, signal 1
[ 935.843897] [rtl debug] 30020170 27e09, signal 1
[ 935.856076] [rtl debug] 30050115 27e05, signal 1
[ 935.883769] [rtl debug] 300500aa 27f48, signal 1
[ 935.893513] [rtl debug] 30050070 27f3f, signal 1
[ 935.896431] [rtl debug] 3005011e 27f51, signal 1
[ 935.939984] [rtl debug] 30020170 27e25, signal 1
[ 935.958469] [rtl debug] 30050115 27e22, signal 1
[ 935.996105] [rtl debug] 3005011e 27f11, signal 1
[ 936.035868] [rtl debug] 30020170 27e30, signal 1
[ 936.061206] [rtl debug] 30050115 27e30, signal 1
[ 936.063493] [rtl debug] 300400fa 27e35, signal 1
[ 936.088562] [rtl debug] 300500aa 27f0a, signal 1
[ 936.098300] [rtl debug] 30050070 27f0d, signal 1
[ 936.122085] [rtl debug] 300500b2 27f17, signal 1
[ 936.139005] [rtl debug] 3005006b 27f4f, signal 1
[ 936.234988] [rtl debug] 30050070 27e34, signal 1
[ 936.281135] [rtl debug] 3005006d 27f4b, signal 1
[ 936.293325] [rtl debug] 300500aa 27f20, signal 1
[ 936.303080] [rtl debug] 30050070 27f4a, signal 1
[ 936.337383] [rtl debug] 30050070 27f4e, signal 1
[ 936.343776] [rtl debug] 3005006b 27f0f, signal 1
[ 936.394633] [rtl debug] 3005007d 27f3b, signal 1
[ 936.413651] [rtl debug] 3005006f 27f0f, signal 1
[ 936.439772] [rtl debug] 30050070 27f36, signal 1
[ 936.446175] [rtl debug] 7005006b 27f35, signal 1
[ 936.485926] [rtl debug] 3005006d 27f11, signal 1
[ 936.497014] [rtl debug] 3005007d 27f3c, signal 1
[ 936.542160] [rtl debug] 30050070 27f0b, signal 1
[ 936.599414] [rtl debug] 3005007d 27f05, signal 1
[ 936.618429] [rtl debug] 3005006f 27f29, signal 1
[ 936.622394] [rtl debug] 30050071 27f13, signal 1
[ 936.630241] [rtl debug] 3005010d 27f10, signal 1
[ 936.631779] [rtl debug] 30050071 27e20, signal 1
[ 936.632875] [rtl debug] 30050062 27f1d, signal 1
[ 936.701810] [rtl debug] 3005007d 27e4f, signal 1
[ 936.724798] [rtl debug] 30050071 27f53, signal 1
[ 936.732630] [rtl debug] 3005010d 27f3d, signal 1
[ 936.746931] [rtl debug] 30050070 27f2e, signal 1
[ 936.793086] [rtl debug] 3005006d 27e67, signal 1
[ 936.835028] [rtl debug] 3005010d 27e4e, signal 1
[ 936.906583] [rtl debug] 3005007d 27f45, signal 1
[ 936.937422] [rtl debug] 3005010d 27f5d, signal 1
[ 936.951708] [rtl debug] 30050070 27f31, signal 1
[ 937.158375] [rtl debug] 3005014f 27f1a, signal 1
[ 937.170097] [rtl debug] 3002002d 27e4c, signal 1
[ 937.187158] [rtl debug] 30050115 27e0b, signal 1
[ 937.210086] [rtl debug] 3002003d 27e03, signal 1
[ 937.212782] [rtl debug] 3002009d 27e05, signal 1
[ 937.289552] [rtl debug] 30050115 7e05, signal 0
[ 937.391949] [rtl debug] 30050115 7e07, signal 0
[ 937.444283] [rtl debug] 30050093 7f30, signal 0
[ 937.494324] [rtl debug] 30050115 7e09, signal 0
[ 937.499296] [rtl debug] 3005004b 7e2e, signal 0
[ 937.596719] [rtl debug] 30050115 7e09, signal 0
[ 937.614632] [rtl debug] 30050067 7f56, signal 0
[ 937.699128] [rtl debug] 30050115 7e08, signal 0
[ 937.704082] [rtl debug] 7005004b 7e47, signal 0
[ 937.717030] [rtl debug] 30050067 7e74, signal 0
[ 937.751456] [rtl debug] 30050093 7e50, signal 0
[ 937.801493] [rtl debug] 30050115 7e05, signal 0
[ 937.819417] [rtl debug] 30050067 7f3d, signal 0
[ 937.903915] [rtl debug] 30050115 7e05, signal 0
[ 937.921808] [rtl debug] 30050067 7f32, signal 0
[ 937.956222] [rtl debug] 30050093 7e44, signal 0
[ 938.006276] [rtl debug] 30050115 7e05, signal 0
[ 938.011255] [rtl debug] 3005004b 7f7c, signal 0
[ 938.058622] [rtl debug] 30050093 7e39, signal 0
[ 938.108670] [rtl debug] 30050115 7e08, signal 0
[ 938.110162] [rtl debug] 3002009d 27e05, signal 1
[ 938.113656] [rtl debug] 3005004b 7f50, signal 0
[ 938.119313] [rtl debug] 300200d7 27e05, signal 1
[ 938.161006] [rtl debug] 30050093 7f3f, signal 0
[ 938.211066] [rtl debug] 30050115 7e0b, signal 0
[ 938.216074] [rtl debug] 3005004b 7f43, signal 0
[ 938.313460] [rtl debug] 30050115 7e06, signal 0
[ 938.415870] [rtl debug] 30050115 7e04, signal 0
[ 938.468184] [rtl debug] 30050093 7e46, signal 0
[ 938.518250] [rtl debug] 30050115 7e05, signal 0
[ 938.523219] [rtl debug] 3005004b 7e3c, signal 0
[ 938.570560] [rtl debug] 30050093 7e3d, signal 0
[ 938.622100] [rtl debug] 30050115 7e06, signal 0
[ 938.723041] [rtl debug] 30050115 7e08, signal 0
[ 938.727448] [rtl debug] 30040200 27e08, signal 1
[ 938.775341] [rtl debug] 30050093 7e47, signal 0
[ 938.825417] [rtl debug] 30050115 7e04, signal 0
[ 938.928355] [rtl debug] 30050115 7e04, signal 0
[ 939.030216] [rtl debug] 30050115 7e05, signal 0
[ 939.034576] [rtl debug] 30040200 27e0b, signal 1
[ 939.132606] [rtl debug] 70050115 7e0d, signal 0
[ 939.150521] [rtl debug] 30050067 7e4e, signal 0
[ 939.234977] [rtl debug] 30050115 7e07, signal 0
[ 939.239339] [rtl debug] 30040200 27e05, signal 1
[ 939.287302] [rtl debug] 30050093 7e46, signal 0
[ 939.337373] [rtl debug] 30050115 7e0e, signal 0
[ 939.342352] [rtl debug] 3005004b 7e4b, signal 0
[ 939.440130] [rtl debug] 30050115 7e06, signal 0
[ 939.444323] [rtl debug] 300401e8 27e09, signal 1
[ 939.492075] [rtl debug] 30050093 7f66, signal 0
[ 939.542162] [rtl debug] 30050115 7e08, signal 0
[ 939.543448] [rtl debug] 30040084 27e0a, signal 1
[ 939.644572] [rtl debug] 30050115 7e09, signal 0
[ 939.696865] [rtl debug] 30050093 7e4f, signal 0
[ 939.746941] [rtl debug] 30050115 7e03, signal 0
[ 939.749714] [rtl debug] 30040131 27e06, signal 1
[ 939.850637] [rtl debug] 30050115 7e06, signal 0
[ 939.854321] [rtl debug] 3005004b 7fba, signal 0
[ 939.951775] [rtl debug] 30050115 7e03, signal 0
[ 940.054123] [rtl debug] 30050115 7e06, signal 0
[ 940.056453] [rtl debug] 300400fa 27e05, signal 1
[ 940.156521] [rtl debug] 30050115 7e06, signal 0
[ 940.258923] [rtl debug] 30050115 7e06, signal 0
[ 940.276844] [rtl debug] 30050067 7e63, signal 0
[ 940.361313] [rtl debug] 30050115 7e09, signal 0
[ 940.366281] [rtl debug] 3005004b 7f3a, signal 0
[ 940.463844] [rtl debug] 30050115 7e0c, signal 0
[ 940.467967] [rtl debug] 300401e8 27e03, signal 1
[ 940.566079] [rtl debug] 30050115 7e05, signal 0
[ 940.571064] [rtl debug] 3005004b 7e32, signal 0
[ 940.618385] [rtl debug] 30050093 7e62, signal 0
[ 940.668480] [rtl debug] 30050115 7e06, signal 0
[ 940.720777] [rtl debug] 70050093 7e43, signal 0
[ 940.770867] [rtl debug] 30050115 7e0b, signal 0
[ 940.788833] [rtl debug] 30050067 7f24, signal 0
[ 940.873266] [rtl debug] 30050115 7e0b, signal 0
[ 940.876593] [rtl debug] 30050180 27e0f, signal 1
[ 940.877623] [rtl debug] 30050066 27e05, signal 1
[ 940.891208] [rtl debug] 30050067 7e35, signal 0
[ 940.975663] [rtl debug] 30050115 7e02, signal 0
[ 940.993603] [rtl debug] 30050067 7e45, signal 0
[ 941.078065] [rtl debug] 30050115 7e04, signal 0
[ 941.096003] [rtl debug] 30050067 7f45, signal 0
[ 941.130335] [rtl debug] 30050093 7e26, signal 0
[ 941.180435] [rtl debug] 30050115 7e05, signal 0
[ 941.198396] [rtl debug] 30050067 7f3f, signal 0
[ 941.282821] [rtl debug] 30050115 7e02, signal 0
[ 941.300783] [rtl debug] 30050067 7e34, signal 0
[ 941.335108] [rtl debug] 30050093 7e51, signal 0
[ 941.385226] [rtl debug] 30050115 7e07, signal 0
[ 941.487626] [rtl debug] 30050115 7e03, signal 0
[ 941.505577] [rtl debug] 30050067 7f54, signal 0
[ 941.589992] [rtl debug] 30050115 7e0a, signal 0
[ 941.607958] [rtl debug] 30050067 7e53, signal 0
[ 941.642285] [rtl debug] 30050093 7e35, signal 0
[ 941.692383] [rtl debug] 30050115 7e05, signal 0
[ 941.710361] [rtl debug] 30050067 7e2e, signal 0
[ 941.794772] [rtl debug] 30050115 7e0c, signal 0
[ 941.799066] [rtl debug] 300401f4 27e05, signal 1
[ 941.828890] [rtl debug] 3032017c 27e04, signal 1
[ 941.847050] [rtl debug] 30050093 7e3c, signal 0
[ 941.897176] [rtl debug] 30050115 7e08, signal 0
[ 941.898256] [rtl debug] 30040060 27e08, signal 1
[ 941.949445] [rtl debug] 30050093 7e4d, signal 0
[ 941.999560] [rtl debug] 70050115 7e0b, signal 0
[ 942.002058] [rtl debug] 3004011d 27e0a, signal 1
[ 942.017538] [rtl debug] 30050067 7f4f, signal 0
[ 942.101965] [rtl debug] 30050115 7e0b, signal 0
[ 942.106946] [rtl debug] 3005004b 7f5e, signal 0
[ 942.154231] [rtl debug] 30050093 7e5f, signal 0
[ 942.204337] [rtl debug] 30050115 7e0c, signal 0
[ 942.209040] [rtl debug] 30040225 27e05, signal 1
[ 942.306739] [rtl debug] 30050115 7e0c, signal 0
[ 942.324720] [rtl debug] 30050067 7f5d, signal 0
[ 942.359000] [rtl debug] 30050093 7e2d, signal 0
[ 942.409134] [rtl debug] 30050115 7e0b, signal 0
[ 942.427123] [rtl debug] 30050067 7e85, signal 0
[ 942.511531] [rtl debug] 30050115 7e00, signal 0
[ 942.516239] [rtl debug] 30040225 27e04, signal 1
[ 942.529510] [rtl debug] 30050067 7e80, signal 0
[ 942.613931] [rtl debug] 30050115 7e04, signal 0
[ 942.615156] [rtl debug] 30040070 27e01, signal 1
[ 942.666177] [rtl debug] 30050093 7e5f, signal 0
[ 942.716300] [rtl debug] 30050115 7e0b, signal 0
[ 942.720763] [rtl debug] 30040207 27e0c, signal 1
[ 942.726560] [rtl debug] 3005004a 27f3f, signal 1
[ 942.737453] [rtl debug] 3005004a 27e63, signal 1
[ 942.818689] [rtl debug] 30050115 7e06, signal 0
[ 942.836666] [rtl debug] 30050067 7f2a, signal 0
[ 942.905983] [rtl debug] 3005004a 27f0c, signal 1
[ 942.910324] [rtl debug] 3005004a 27f0e, signal 1
[ 942.914725] [rtl debug] 3005004a 27f05, signal 1
[ 942.919365] [rtl debug] 3005004a 27f11, signal 1
[ 942.921791] [rtl debug] 30050115 7f56, signal 0
[ 942.939092] [rtl debug] 30050067 7e3b, signal 0
[ 942.939942] [rtl debug] 3005004a 27f3a, signal 1
[ 942.944861] [rtl debug] 7005004a 27f6b, signal 1
[ 943.008754] [rtl debug] 3005004a 27f2e, signal 1
[ 943.009873] [rtl debug] 3005004a 27f40, signal 1
[ 943.010727] [rtl debug] 3005004a 27e5f, signal 1
[ 943.023483] [rtl debug] 30050115 7e0c, signal 0
[ 943.025837] [rtl debug] 300400fa 27e06, signal 1
[ 943.125959] [rtl debug] 30050115 7e08, signal 0
[ 943.178128] [rtl debug] 30050093 7e41, signal 0
[ 943.230676] [rtl debug] 30050115 7e09, signal 0
[ 943.280518] [rtl debug] 30050093 7f45, signal 0
[ 943.332073] [rtl debug] 30050115 7e0c, signal 0
[ 943.433188] [rtl debug] 30050115 7e07, signal 0
[ 943.438046] [rtl debug] 3005004b 7e5f, signal 0
[ 943.535452] [rtl debug] 30050115 7e04, signal 0
[ 943.553435] [rtl debug] 30050067 7f5a, signal 0
[ 943.638570] [rtl debug] 30050115 7e04, signal 0
[ 943.642830] [rtl debug] 3005004b 7f32, signal 0
[ 943.740228] [rtl debug] 30050115 7e07, signal 0
[ 943.744676] [rtl debug] 30040207 27e08, signal 1
[ 943.842634] [rtl debug] 30050115 7e09, signal 0
[ 943.945011] [rtl debug] 30050115 7e05, signal 0
[ 944.047386] [rtl debug] 30050115 7e09, signal 0
[ 944.149789] [rtl debug] 30050115 7e0c, signal 0
[ 944.167804] [rtl debug] 30050067 7f6a, signal 0
[ 944.202032] [rtl debug] 30050093 7f45, signal 0
[ 944.252201] [rtl debug] 30050115 7e06, signal 0
[ 944.270198] [rtl debug] 30050067 7e51, signal 0
[ 944.354571] [rtl debug] 30050115 7e07, signal 0
[ 944.459315] [rtl debug] 30050115 7e04, signal 0
[ 944.559407] [rtl debug] 30050115 7e02, signal 0
[ 944.661755] [rtl debug] 30050115 7e07, signal 0
[ 944.679765] [rtl debug] 30050067 7e70, signal 0
[ 944.764157] [rtl debug] 70050115 7e07, signal 0
[ 944.769146] [rtl debug] 3005004b 7e47, signal 0
[ 944.782178] [rtl debug] 30050067 7f40, signal 0
[ 944.868992] [rtl debug] 30050115 7e05, signal 0
[ 944.887294] [rtl debug] 30050067 7e65, signal 0
[ 944.968937] [rtl debug] 30050115 7e06, signal 0
[ 945.071316] [rtl debug] 30050115 7e08, signal 0
[ 945.075614] [rtl debug] 300401f0 27e07, signal 1
[ 945.076314] [rtl debug] 3005004b 7f57, signal 0
[ 945.123543] [rtl debug] 30050093 7e36, signal 0
[ 945.173710] [rtl debug] 30050115 7e05, signal 0
[ 945.225927] [rtl debug] 30050093 7e28, signal 0
[ 945.276103] [rtl debug] 30050115 7e0a, signal 0
[ 945.378481] [rtl debug] 30050115 7e05, signal 0
[ 945.430720] [rtl debug] 30050093 7e31, signal 0
[ 945.480889] [rtl debug] 30050115 7e09, signal 0
[ 945.485891] [rtl debug] 3005004b 7f42, signal 0
[ 945.498893] [rtl debug] 30050067 7e5f, signal 0
[ 945.533101] [rtl debug] 30050093 7f4f, signal 0
[ 945.583279] [rtl debug] 30050115 7e03, signal 0
[ 945.588271] [rtl debug] 3005004b 7e32, signal 0
[ 945.601354] [rtl debug] 30050067 7f5b, signal 0
[ 945.685654] [rtl debug] 30050115 7e04, signal 0
[ 945.703686] [rtl debug] 30050067 7e60, signal 0
[ 945.737877] [rtl debug] 30050093 7e52, signal 0
[ 945.745718] [rtl debug] 3005004a 27f40, signal 1
[ 945.746729] [rtl debug] 30050056 27f3a, signal 1
[ 945.793119] [rtl debug] 3005004b 7e3b, signal 0
[ 945.840268] [rtl debug] 30050093 7e2c, signal 0
[ 945.890432] [rtl debug] 30050115 7e08, signal 0
[ 945.895443] [rtl debug] 3005004b 7e31, signal 0
[ 945.908467] [rtl debug] 30050067 7e43, signal 0
[ 945.972029] [rtl debug] 7005004a 27f09, signal 1
[ 945.984802] [rtl debug] 30050056 27f07, signal 1
[ 945.985751] [rtl debug] 3005004a 27f11, signal 1
[ 945.995460] [rtl debug] 300400fa 27e04, signal 1
[ 945.996552] [rtl debug] 3005004a 27f0e, signal 1
[ 946.010853] [rtl debug] 30050067 7f54, signal 0
[ 946.044068] [rtl debug] 3005004a 27f4e, signal 1
[ 946.095202] [rtl debug] 30050115 7e05, signal 0
[ 946.133918] [rtl debug] 3005004a 27e39, signal 1
[ 946.197624] [rtl debug] 30050115 7e06, signal 0
[ 946.202618] [rtl debug] 3005004b 7f47, signal 0
[ 946.300019] [rtl debug] 30050115 7e04, signal 0
[ 946.352228] [rtl debug] 30050093 7e1f, signal 0
[ 946.402383] [rtl debug] 30050115 7e06, signal 0
[ 946.504785] [rtl debug] 30050115 7e08, signal 0
[ 946.556994] [rtl debug] 30050093 7e4e, signal 0
[ 946.607182] [rtl debug] 30050115 7e0c, signal 0
[ 946.608742] [rtl debug] 30040070 27e08, signal 1
[ 946.709584] [rtl debug] 30050115 7e0b, signal 0
[ 946.811982] [rtl debug] 30050115 7e08, signal 0
[ 946.915476] [rtl debug] 30050115 7e08, signal 0
[ 946.966573] [rtl debug] 30050093 7e40, signal 0
[ 947.016731] [rtl debug] 30050115 7e09, signal 0
[ 947.119459] [rtl debug] 30050115 7e07, signal 0
[ 947.171337] [rtl debug] 30050093 7f3c, signal 0
[ 947.221519] [rtl debug] 30050115 7e04, signal 0
[ 947.273739] [rtl debug] 30050093 7f3d, signal 0
[ 947.323928] [rtl debug] 30050115 7e02, signal 0
[ 947.341959] [rtl debug] 30050067 7e4c, signal 0
[ 947.426319] [rtl debug] 30050115 7e05, signal 0
[ 947.528717] [rtl debug] 30050115 7e08, signal 0
[ 947.580905] [rtl debug] 30050093 7e1b, signal 0
[ 947.631103] [rtl debug] 70050115 7e04, signal 0
[ 947.632092] [rtl debug] 30040060 27e09, signal 1
[ 947.733521] [rtl debug] 30050115 7e0f, signal 0
[ 947.835905] [rtl debug] 30050115 7e0f, signal 0
[ 947.938301] [rtl debug] 30050115 7e07, signal 0
[ 947.943302] [rtl debug] 3005004b 7f43, signal 0
[ 948.040689] [rtl debug] 30050115 7e08, signal 0
[ 948.092870] [rtl debug] 30050093 7f44, signal 0
[ 948.143064] [rtl debug] 30050115 7e07, signal 0
[ 948.245474] [rtl debug] 30050115 7e0a, signal 0
[ 948.297646] [rtl debug] 30050093 7e53, signal 0
[ 948.347877] [rtl debug] 30050115 7e0b, signal 0
[ 948.400038] [rtl debug] 30050093 7f5f, signal 0
[ 948.450266] [rtl debug] 30050115 7e07, signal 0
[ 948.552642] [rtl debug] 30050115 7e03, signal 0
[ 948.655024] [rtl debug] 30050115 7e05, signal 0
[ 948.707215] [rtl debug] 30050093 7f73, signal 0
[ 948.757897] [rtl debug] 30050115 7e0c, signal 0
[ 948.859822] [rtl debug] 30050115 7e09, signal 0
[ 948.864833] [rtl debug] 3005004b 7e45, signal 0
[ 948.912003] [rtl debug] 30050093 7f48, signal 0
[ 948.962199] [rtl debug] 30050115 7e05, signal 0
[ 948.967225] [rtl debug] 3005004b 7e59, signal 0
[ 949.064601] [rtl debug] 30050115 7e02, signal 0
[ 949.082668] [rtl debug] 30050067 7e8b, signal 0
[ 949.167851] [rtl debug] 30050115 7e08, signal 0
[ 949.269542] [rtl debug] 30050115 7e0b, signal 0
[ 949.371779] [rtl debug] 30050115 7e0d, signal 0
[ 949.474161] [rtl debug] 30050115 7e0c, signal 0
[ 949.576567] [rtl debug] 30050115 7e0d, signal 0
[ 949.678945] [rtl debug] 30050115 7e06, signal 0
[ 949.781350] [rtl debug] 30050115 7e09, signal 0
[ 949.799415] [rtl debug] 70050067 7f66, signal 0
[ 949.833512] [rtl debug] 30050093 7e4e, signal 0
[ 949.883738] [rtl debug] 30050115 7e08, signal 0
[ 949.888758] [rtl debug] 3005004b 7f29, signal 0
[ 949.986119] [rtl debug] 30050115 7e07, signal 0
[ 949.988342] [rtl debug] 300400fa 27e02, signal 1
[ 950.088524] [rtl debug] 30050115 7e07, signal 0
[ 950.190904] [rtl debug] 30050115 7e08, signal 0
[ 950.208993] [rtl debug] 30050067 7f4d, signal 0
[ 950.293319] [rtl debug] 30050115 7e0d, signal 0
[ 950.345469] [rtl debug] 30050093 7f23, signal 0
[ 950.395708] [rtl debug] 30050115 7e0c, signal 0
[ 950.447859] [rtl debug] 30050093 7f3a, signal 0
[ 950.498078] [rtl debug] 30050115 7e04, signal 0
[ 950.600496] [rtl debug] 30050115 7e05, signal 0
[ 950.652642] [rtl debug] 30050093 7e41, signal 0
[ 950.703313] [rtl debug] 30050115 7e04, signal 0
[ 950.720962] [rtl debug] 30050067 7e65, signal 0
[ 950.755031] [rtl debug] 30050093 7e27, signal 0
[ 950.805280] [rtl debug] 30050115 7e02, signal 0
[ 950.823365] [rtl debug] 30050067 7e28, signal 0
[ 950.907658] [rtl debug] 30050115 7e0b, signal 0
[ 950.959804] [rtl debug] 30050093 7e21, signal 0
[ 951.010058] [rtl debug] 30050115 7e08, signal 0
[ 951.112442] [rtl debug] 30050115 7e06, signal 0
[ 951.117479] [rtl debug] 3005004b 7e5d, signal 0
[ 951.130544] [rtl debug] 30050067 7e3f, signal 0
[ 951.214852] [rtl debug] 30050115 7e0a, signal 0
[ 951.232947] [rtl debug] 30050067 7f47, signal 0
[ 951.317225] [rtl debug] 30050115 7e0b, signal 0
[ 951.322263] [rtl debug] 3005004b 7f3d, signal 0
[ 951.419643] [rtl debug] 30050115 7e09, signal 0
[ 951.522008] [rtl debug] 70050115 7e06, signal 0
[ 951.574160] [rtl debug] 30050093 7f31, signal 0
[ 951.624412] [rtl debug] 30050115 7e0a, signal 0
[ 951.629443] [rtl debug] 3005004b 7e31, signal 0
[ 951.642503] [rtl debug] 30050067 7e32, signal 0
[ 951.676544] [rtl debug] 30050093 7e24, signal 0
[ 951.731219] [rtl debug] 30050115 7e0c, signal 0
[ 951.744907] [rtl debug] 30050067 7e57, signal 0
^ permalink raw reply
* Re: wl1271 firmware
From: Pazzo Da Legare @ 2010-07-21 17:27 UTC (permalink / raw)
To: linux-wireless; +Cc: Levi, Shahar, Luciano Coelho, Logan Gunthorpe
In-Reply-To: <AANLkTinjvF9UeV7d2aBUy6HfexuAeL_cdsVPGVxSRVMp@mail.gmail.com>
Dear All again,
I've just test with compact-wireless-2010-07-20 but I've the same problem:
root@hawkboard:~# ifconfig wlan0 192.168.0.1 up
[ 68.920000] wl1271_sdio mmc0:0001:2: firmware: requesting wl1271-fw.bin
[ 69.100000] wl1271_sdio mmc0:0001:2: firmware: requesting wl1271-nvs.bin
[ 69.510000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
root@hawkboard:~# [ 70.020000] wl1271: ERROR ELP wakeup timeout!
[ 70.520000] wl1271: ERROR ELP wakeup timeout!
looking at dmesg:
[ 68.920000] wl1271_sdio mmc0:0001:2: firmware: requesting wl1271-fw.bin
[ 69.100000] wl1271_sdio mmc0:0001:2: firmware: requesting wl1271-nvs.bin
[ 69.500000] wl1271: firmware booted (Rev 6.1.0.0.310)
[ 69.510000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 70.020000] wl1271: ERROR ELP wakeup timeout!
[ 70.520000] wl1271: ERROR ELP wakeup timeout!
[ 68.920000] wl1271_sdio mmc0:0001:2: firmware: requesting wl1271-fw.bin
[ 69.100000] wl1271_sdio mmc0:0001:2: firmware: requesting wl1271-nvs.bin
[ 69.500000] wl1271: firmware booted (Rev 6.1.0.0.310)
[ 70.020000] wl1271: ERROR ELP wakeup timeout!
[ 70.520000] wl1271: ERROR ELP wakeup timeout!
Do you have any clue?
pz
2010/7/21 Pazzo Da Legare <pazzodalegare@gmail.com>:
> Dear All,
> Dear Shahar,
>
> I tried your files but I had errors from the driver.
>
> # ifconfig wlan0 up
>
> [ 194.470000] wl1271_sdio mmc0:0001:2: firmware: requesting wl1271-fw.bin
> [ 194.620000] wl1271_sdio mmc0:0001:2: firmware: requesting wl1271-nvs.bin
> [ 195.080000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
> root@hawkboard:~# [ 195.590000] wl1271: ERROR ELP wakeup timeout!
>
> I tried to scan but it doesn't work. Note that I'm using a driver
> built from compact-wireless-2010-06-20 and I'm going to try to update.
>
> Thank you for your help again,
>
> pz
>
>
> 2010/7/20 Logan Gunthorpe <logang@deltatee.com>:
>> Hi Sharar,
>>
>> Thanks a lot. I'm pleased to report that our module appears to be working
>> with the firmware and NVS files you supplied.
>>
>> Logan
>>
>> Levi, Shahar wrote:
>>>>
>>>> -----Original Message-----
>>>> From: Levi, Shahar
>>>> Sent: Saturday, July 17, 2010 3:20 PM
>>>> To: Pazzo Da Legare
>>>> Cc: linux-wireless@vger.kernel.org; Logan Gunthorpe; Luciano Coelho
>>>> Subject: RE: wl1271 firmware
>>>> Hi Pazzo,
>>>> I am still pushing the legal stuff to make it happened. I hope to close
>>>> that in a few days.
>>>> Regards,
>>>> Shahar
>>>
>>> Hi Pazzo and Logan,
>>> Until the file will publish in TI web I am enclosing the file for you in
>>> the mail.
>>> I will publish link to the community as soon it will be in the TI web.
>>>
>>> Regards,
>>> Shahar
>>>
>>
>
^ permalink raw reply
* Re: [PATCH] rtl8180: improve signal reporting for rtl8185 hardware
From: John W. Linville @ 2010-07-21 17:19 UTC (permalink / raw)
To: Pauli Nieminen; +Cc: linux-wireless
In-Reply-To: <AANLkTint5uT6PQ8pmEIVSoVYOSCZE5k-TGB1knwHtupw@mail.gmail.com>
On Wed, Jul 21, 2010 at 08:07:56PM +0300, Pauli Nieminen wrote:
> On Wed, Jul 21, 2010 at 4:33 PM, John W. Linville
> <linville@tuxdriver.com> wrote:
> > On Wed, Jul 21, 2010 at 08:08:41AM +0300, Pauli Nieminen wrote:
> >> On Mon, Jul 19, 2010 at 11:47 PM, John W. Linville
> >> <linville@tuxdriver.com> wrote:
> >> > The existing code seemed to be somewhat based on the datasheet, but
> >> > varied substantially from the vendor-provided driver. This mirrors the
> >> > handling of the rtl8185 case from that driver, but still neglects the
> >> > specifics for the rtl8180 hardware. Those details are a bit muddled...
> >> >
> >> > Signed-off-by: John W. Linville <linville@tuxdriver.com>
> >> > ---
> >> > drivers/net/wireless/rtl818x/rtl8180_dev.c | 11 ++++++++---
> >> > 1 files changed, 8 insertions(+), 3 deletions(-)
> >
> >> I tested this version of patch. Patch didn't apply cleanly for some
> >> reason even tough when I mnauly typed it diff looks same.
> >
> > Please try the v2 version of the patch. Some "back of the envelope"
> > math suggests that the v2 version of the patch will give numbers more
> > to your liking.
> >
> > John
> > --
> > John W. Linville Someday the world will need a hero, and you
> > linville@tuxdriver.com might be all we have. Be ready.
> >
>
> But version 2 doesn't change the fact that driver is going to report
> same signal strength even tough I know that only one wifi should have
> 100 % strength and others less than 50 %. There is only one router in
> same room with me and all others routers are a lot more father away.
> So driver is either reading wrong bits from hardware or my hardware is
> broken.
Did you try the patch? I suspect not.
I can't really decipher what problem you are reporting here with "100 %
strength and others less than 50 %". In any case, if you have RTL8185
hardware then this patch changes the signal calculation to match what
the Realtek-provided vendor driver does (which doesn't seem to match
their datasheet, FWIW). If you have a better source of information
then I am happy to receive it.
If you have RTL8180 (i.e. not RTL8185) hardware then neither version of
the patch is likely to help you much (beyond avoiding the warning you
originally reported). I hope to improve that as well in the future.
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
* [PATCH v2 00/20] native support for wl1271 on ZOOM
From: Ohad Ben-Cohen @ 2010-07-21 17:33 UTC (permalink / raw)
To: linux-wireless, linux-mmc, linux-omap
Cc: linux-arm-kernel, linux, Chikkature Rajashekar Madhusudhan,
Luciano Coelho, akpm, San Mehat, Roger Quadros, Tony Lindgren,
Nicolas Pitre, Pandita Vikram, Kalle Valo, Ohad Ben-Cohen
This patch series adds native support for wl1271 on ZOOM.
Changes since v1:
- introduce a fixed regulator device to control the power of wl1271
- allow to propagate private board-specific data to SDIO function drivers
- allow SDIO function driver to control the card's power via new API
- make it possible to keep the card's power down (without depending
on an explicit SDIO function driver power-down request)
Thanks to these changes, we no longer need a separate platform
device (carrying e.g. the external irq information of the device),
and no longer need to emulate virtual card detect events.
The two "board muxing" pathces were already taken by Tony, and
are resent here just to make it easier for people to use/test these pathces.
The changes to the MMC core really needs careful review; there still
might be some pitfalls that haven't been covered. E.g., one thing
we plan to look at next is their bahvior together with SDIO Suspend/Resume.
Special thanks to Roger Quadros and Nicolas Pitre for their extensive
review and helpful suggestions.
The patches are based on 2.6.35-rc5, and were tested on ZOOM3.
Thanks,
Ohad Ben-Cohen (20):
sdio: add TI + wl1271 ids
wireless: wl1271: remove SDIO IDs from driver
mmc: support embedded data field in mmc_host
omap zoom2: wlan board muxing
omap zoom3: wlan board muxing
wireless: wl1271: make wl12xx.h common to both spi and sdio
wireless: wl1271: support return value for the set power func
wireless: wl1271: take irq info from private board data
wireless: wl1271: make ref_clock configurable by board
omap: zoom: add fixed regulator device for wlan
omap: hsmmc: support mmc3 regulator power control
omap: hsmmc: allow board-specific settings of private mmc data
omap: zoom: add mmc3/wl1271 device support
mmc: sdio: fully reconfigure oldcard on resume
mmc: sdio: verify existence of resume handler
mmc: introduce API to control the card's power
mmc: sdio: relocate sdio_set_block_size call
mmc: sdio: enable a default power off mode of the card
omap: zoom: keep the MMC3 wl1271 device powered off
wireless: wl1271: call SDIO claim/release power API
arch/arm/mach-omap2/board-zoom-peripherals.c | 54 +++++++++++++++++++
arch/arm/mach-omap2/board-zoom2.c | 13 +++++
arch/arm/mach-omap2/board-zoom3.c | 13 +++++
arch/arm/mach-omap2/hsmmc.c | 15 ++++--
arch/arm/mach-omap2/hsmmc.h | 2 +
arch/arm/plat-omap/include/plat/mmc.h | 5 ++
drivers/mmc/core/bus.c | 3 +
drivers/mmc/core/core.c | 50 ++++++++++++++++++
drivers/mmc/core/sdio.c | 36 +++++++++++--
drivers/mmc/core/sdio_bus.c | 9 ---
drivers/mmc/core/sdio_io.c | 50 ++++++++++++++++++
drivers/mmc/host/omap_hsmmc.c | 72 +++++++++++++++++++++++---
drivers/net/wireless/wl12xx/wl1251_sdio.c | 2 +-
drivers/net/wireless/wl12xx/wl1251_spi.c | 2 +-
drivers/net/wireless/wl12xx/wl1271.h | 3 +-
drivers/net/wireless/wl12xx/wl1271_boot.c | 9 ++--
drivers/net/wireless/wl12xx/wl1271_boot.h | 1 -
drivers/net/wireless/wl12xx/wl1271_io.h | 8 ++-
drivers/net/wireless/wl12xx/wl1271_main.c | 4 +-
drivers/net/wireless/wl12xx/wl1271_sdio.c | 31 +++++------
drivers/net/wireless/wl12xx/wl1271_spi.c | 8 ++-
include/linux/mmc/card.h | 2 +
include/linux/mmc/host.h | 15 +++++
include/linux/mmc/sdio_func.h | 3 +
include/linux/mmc/sdio_ids.h | 3 +
include/linux/spi/wl12xx.h | 34 ------------
include/linux/wl12xx.h | 35 ++++++++++++
27 files changed, 393 insertions(+), 89 deletions(-)
delete mode 100644 include/linux/spi/wl12xx.h
create mode 100644 include/linux/wl12xx.h
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox