* [PATCH 1/2] ath6kl: fix tx/rx antenna reporting for 2x2 devices. @ 2015-11-30 23:01 greearb 2015-11-30 23:01 ` [PATCH 2/2] ath6kl: add log messages for firmware failure cases greearb 2015-12-11 13:33 ` [PATCH 1/2] ath6kl: fix tx/rx antenna reporting for 2x2 devices Kalle Valo 0 siblings, 2 replies; 3+ messages in thread From: greearb @ 2015-11-30 23:01 UTC (permalink / raw) To: ath6kl; +Cc: linux-wireless, Ben Greear From: Ben Greear <greearb@candelatech.com> My previous patch incorrectly reported the antenna for 2x2 devices. It should be a mask instead of a numeric count. This patch fixes that. Signed-off-by: Ben Greear <greearb@candelatech.com> --- drivers/net/wireless/ath/ath6kl/cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 5e982e2..3ce2584 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -3931,8 +3931,8 @@ int ath6kl_cfg80211_init(struct ath6kl *ar) ath6kl_band_5ghz.ht_cap.mcs.rx_mask[0] = 0xff; ath6kl_band_2ghz.ht_cap.mcs.rx_mask[1] = 0xff; ath6kl_band_5ghz.ht_cap.mcs.rx_mask[1] = 0xff; - ar->hw.tx_ant = 2; - ar->hw.rx_ant = 2; + ar->hw.tx_ant = 0x3; /* mask, 2 antenna */ + ar->hw.rx_ant = 0x3; } else { ath6kl_band_2ghz.ht_cap.mcs.rx_mask[0] = 0xff; ath6kl_band_5ghz.ht_cap.mcs.rx_mask[0] = 0xff; -- 2.4.3 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] ath6kl: add log messages for firmware failure cases. 2015-11-30 23:01 [PATCH 1/2] ath6kl: fix tx/rx antenna reporting for 2x2 devices greearb @ 2015-11-30 23:01 ` greearb 2015-12-11 13:33 ` [PATCH 1/2] ath6kl: fix tx/rx antenna reporting for 2x2 devices Kalle Valo 1 sibling, 0 replies; 3+ messages in thread From: greearb @ 2015-11-30 23:01 UTC (permalink / raw) To: ath6kl; +Cc: linux-wireless, Ben Greear From: Ben Greear <greearb@candelatech.com> This gives a user a chance to know why a firmware load is failing. Signed-off-by: Ben Greear <greearb@candelatech.com> --- drivers/net/wireless/ath/ath6kl/init.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index e3f3a6a..45210d0 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c @@ -953,8 +953,10 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name) snprintf(filename, sizeof(filename), "%s/%s", ar->hw.fw.dir, name); ret = request_firmware(&fw, filename, ar->dev); - if (ret) + if (ret) { + ath6kl_err("Failed request firmware, rv: %d\n", ret); return ret; + } data = fw->data; len = fw->size; @@ -963,11 +965,15 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name) magic_len = strlen(ATH6KL_FIRMWARE_MAGIC) + 1; if (len < magic_len) { + ath6kl_err("Magic length is invalid, len: %zd magic_len: %zd\n", + len, magic_len); ret = -EINVAL; goto out; } if (memcmp(data, ATH6KL_FIRMWARE_MAGIC, magic_len) != 0) { + ath6kl_err("Magic is invalid, magic_len: %zd\n", + magic_len); ret = -EINVAL; goto out; } @@ -986,7 +992,12 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name) len -= sizeof(*hdr); data += sizeof(*hdr); + ath6kl_dbg(ATH6KL_DBG_BOOT, "ie-id: %d len: %zd (0x%zx)\n", + ie_id, ie_len, ie_len); + if (len < ie_len) { + ath6kl_err("IE len is invalid, len: %zd ie_len: %zd ie-id: %d\n", + len, ie_len, ie_id); ret = -EINVAL; goto out; } @@ -1007,6 +1018,7 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name) ar->fw_otp = kmemdup(data, ie_len, GFP_KERNEL); if (ar->fw_otp == NULL) { + ath6kl_err("fw_otp cannot be allocated\n"); ret = -ENOMEM; goto out; } @@ -1024,6 +1036,7 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name) ar->fw = vmalloc(ie_len); if (ar->fw == NULL) { + ath6kl_err("fw storage cannot be allocated, len: %zd\n", ie_len); ret = -ENOMEM; goto out; } @@ -1038,6 +1051,7 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name) ar->fw_patch = kmemdup(data, ie_len, GFP_KERNEL); if (ar->fw_patch == NULL) { + ath6kl_err("fw_patch storage cannot be allocated, len: %zd\n", ie_len); ret = -ENOMEM; goto out; } -- 2.4.3 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] ath6kl: fix tx/rx antenna reporting for 2x2 devices. 2015-11-30 23:01 [PATCH 1/2] ath6kl: fix tx/rx antenna reporting for 2x2 devices greearb 2015-11-30 23:01 ` [PATCH 2/2] ath6kl: add log messages for firmware failure cases greearb @ 2015-12-11 13:33 ` Kalle Valo 1 sibling, 0 replies; 3+ messages in thread From: Kalle Valo @ 2015-12-11 13:33 UTC (permalink / raw) To: greearb; +Cc: ath6kl, linux-wireless greearb@candelatech.com writes: > From: Ben Greear <greearb@candelatech.com> > > My previous patch incorrectly reported the antenna > for 2x2 devices. It should be a mask instead of > a numeric count. This patch fixes that. > > Signed-off-by: Ben Greear <greearb@candelatech.com> Both patches applied, thanks. -- Kalle Valo ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-12-11 13:33 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-11-30 23:01 [PATCH 1/2] ath6kl: fix tx/rx antenna reporting for 2x2 devices greearb 2015-11-30 23:01 ` [PATCH 2/2] ath6kl: add log messages for firmware failure cases greearb 2015-12-11 13:33 ` [PATCH 1/2] ath6kl: fix tx/rx antenna reporting for 2x2 devices Kalle Valo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).