linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
To: linville@tuxdriver.com, johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org,
	"Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
	Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Subject: [PATCH 5/6] ath9k: check for NULL rate when using ieee80211_get_rts_cts_rate()
Date: Mon, 14 Oct 2013 17:42:10 -0700	[thread overview]
Message-ID: <1381797731-2454-6-git-send-email-mcgrof@do-not-panic.com> (raw)
In-Reply-To: <1381797731-2454-1-git-send-email-mcgrof@do-not-panic.com>

ieee80211_get_rts_cts_rate() can return NULL, so don't rely
on its members when it does return NULL.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
 drivers/net/wireless/ath/ath9k/xmit.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 47696d2..b9b0819 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -2020,6 +2020,9 @@ static void setup_frame_info(struct ieee80211_hw *hw,
 		fi->keyix = ATH9K_TXKEYIX_INVALID;
 	fi->keytype = keytype;
 	fi->framelen = framelen;
+
+	if (!rate)
+		return;
 	fi->rtscts_rate = rate->hw_value;
 	if (short_preamble)
 		fi->rtscts_rate |= rate->hw_value_short;
-- 
1.8.4.rc3


  parent reply	other threads:[~2013-10-15  0:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15  0:42 [PATCH 0/6] ath / ath9k updates Luis R. Rodriguez
2013-10-15  0:42 ` [PATCH 1/6] cfg80211: export reg_initiator_name() Luis R. Rodriguez
2013-10-17 14:34   ` Johannes Berg
2013-10-18 18:01   ` John W. Linville
2013-10-18 18:21     ` Johannes Berg
2013-10-20  9:55       ` Luis R. Rodriguez
2013-10-15  0:42 ` [PATCH 2/6] ath: move common dynamic regulatory domain setting to a helper Luis R. Rodriguez
2013-10-15  0:42 ` [PATCH 3/6] ath: split user and driver reguluatory hint parsing Luis R. Rodriguez
2013-10-15  0:42 ` [PATCH 4/6] ath: add support for proper dynamic regulatory hints Luis R. Rodriguez
2013-10-15  0:42 ` Luis R. Rodriguez [this message]
2013-10-15  0:42 ` [PATCH 6/6] ath9k: add TX99 support Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1381797731-2454-6-git-send-email-mcgrof@do-not-panic.com \
    --to=mcgrof@do-not-panic.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rmanohar@qca.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).