2013-11-08 17:35:00

by Eugene Krasnikov

[permalink] [raw]
Subject: [PATCH 0/3] pull request: wcn36xx 2013-11-08

Hi John,

This is a bunch of patches for wcn36xx driver on top of current wireless-next.
The format is just a list of patches but not a git pull request. If you prefere
to have them as a git pull link please let me know. Also please let me know if
there is any problem.

Dan Carpenter (1):
wcn36xx: missing unlocks on error paths

Eugene Krasnikov (1):
wcn36xx: Fix logging macro with unnecessary semicolon

Wei Yongjun (1):
Add the missing unlock before return from function
wcn36xx_smd_update_proberesp_tmpl() in the error handling case.

drivers/net/wireless/ath/wcn36xx/smd.c | 9 ++++++---
drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)

--
1.8.3.2



2013-11-08 17:35:00

by Eugene Krasnikov

[permalink] [raw]
Subject: [PATCH 1/3] Add the missing unlock before return from function wcn36xx_smd_update_proberesp_tmpl() in the error handling case.

From: Wei Yongjun <[email protected]>

Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index f8c3a10..04df70b 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1327,7 +1327,8 @@ int wcn36xx_smd_update_proberesp_tmpl(struct wcn36xx *wcn,
if (skb->len > BEACON_TEMPLATE_SIZE) {
wcn36xx_warn("probe response template is too big: %d\n",
skb->len);
- return -E2BIG;
+ ret = -E2BIG;
+ goto out;
}

msg.probe_resp_template_len = skb->len;
--
1.8.3.2


2013-11-08 17:35:03

by Eugene Krasnikov

[permalink] [raw]
Subject: [PATCH 2/3] wcn36xx: missing unlocks on error paths

From: Dan Carpenter <[email protected]>

There are several places which are missing unlocks.

Signed-off-by: Dan Carpenter <[email protected]>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 04df70b..de9eb2c 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1286,7 +1286,8 @@ int wcn36xx_smd_send_beacon(struct wcn36xx *wcn, struct ieee80211_vif *vif,
} else {
wcn36xx_err("Beacon is to big: beacon size=%d\n",
msg_body.beacon_length);
- return -ENOMEM;
+ ret = -ENOMEM;
+ goto out;
}
memcpy(msg_body.bssid, vif->addr, ETH_ALEN);

@@ -1607,7 +1608,8 @@ int wcn36xx_smd_keep_alive_req(struct wcn36xx *wcn,
/* TODO: it also support ARP response type */
} else {
wcn36xx_warn("unknow keep alive packet type %d\n", packet_type);
- return -EINVAL;
+ ret = -EINVAL;
+ goto out;
}

PREPARE_HAL_BUF(wcn->hal_buf, msg_body);
--
1.8.3.2


2013-11-08 17:35:04

by Eugene Krasnikov

[permalink] [raw]
Subject: [PATCH 3/3] wcn36xx: Fix logging macro with unnecessary semicolon

The wcn36xx_err macro should not end in a semicolon as
there are 2 consecutive semicolons in the preprocessed
output.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Eugene Krasnikov <[email protected]>
---
drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
index 58b6383..8fa5cba 100644
--- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
+++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
@@ -54,7 +54,7 @@ enum wcn36xx_debug_mask {
};

#define wcn36xx_err(fmt, arg...) \
- printk(KERN_ERR pr_fmt("ERROR " fmt), ##arg);
+ printk(KERN_ERR pr_fmt("ERROR " fmt), ##arg)

#define wcn36xx_warn(fmt, arg...) \
printk(KERN_WARNING pr_fmt("WARNING " fmt), ##arg)
--
1.8.3.2