From: Stephen Rothwell <sfr@canb.auug.org.au>
To: David Miller <davem@davemloft.net>, <netdev@vger.kernel.org>,
"John W. Linville" <linville@tuxdriver.com>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Felix Fietkau <nbd@openwrt.org>,
Oleksij Rempel <linux@rempel-privat.de>
Subject: linux-next: manual merge of the net-next tree with the wireless tree
Date: Wed, 26 Feb 2014 14:21:05 +1100 [thread overview]
Message-ID: <20140226142105.6e7154303b423b0eef78518d@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 4441 bytes --]
Hi all,
Today's linux-next merge of the net-next tree got a conflict in
drivers/net/wireless/ath/ath9k/recv.c between commit b7b146c9c9a0
("ath9k: fix invalid descriptor discarding") from the wireless tree and
commits 1274603646a8 ("ath9k: move ath9k_process_rate to common.c") and
6438696efa81 ("ath9k: move ath9k_rx_accept to common.c") from the
net-next tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/net/wireless/ath/ath9k/recv.c
index 82e340d3ec60,076dae1e5ab7..000000000000
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@@ -1055,8 -853,10 +857,8 @@@ static int ath9k_rx_skb_preprocess(stru
* everything but the rate is checked here, the rate check is done
* separately to avoid doing two lookups for a rate for each frame.
*/
- if (!ath9k_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error))
- if (!ath9k_cmn_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error, sc->rx.rxfilter)) {
- ret = -EINVAL;
- goto exit;
- }
++ if (!ath9k_cmn_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error, sc->rx.rxfilter))
+ return -EINVAL;
if (ath_is_mybeacon(common, hdr)) {
RX_STAT_INC(rx_beacons);
@@@ -1066,13 -866,24 +868,21 @@@
/*
* This shouldn't happen, but have a safety check anyway.
*/
- if (WARN_ON(!ah->curchan)) {
- ret = -EINVAL;
- goto exit;
- }
+ if (WARN_ON(!ah->curchan))
+ return -EINVAL;
- if (ath9k_process_rate(common, hw, rx_stats, rx_status))
+ if (ath9k_cmn_process_rate(common, hw, rx_stats, rx_status)) {
+ /*
+ * No valid hardware bitrate found -- we should not get here
+ * because hardware has already validated this frame as OK.
+ */
+ ath_dbg(common, ANY, "unsupported hw bitrate detected 0x%02x using 1 Mbit\n",
+ rx_stats->rs_rate);
+ RX_STAT_INC(rx_rate_err);
- ret =-EINVAL;
- goto exit;
+ return -EINVAL;
+ }
- ath9k_process_rssi(common, hw, rx_stats, rx_status);
+ ath9k_cmn_process_rssi(common, hw, rx_stats, rx_status);
rx_status->band = ah->curchan->chan->band;
rx_status->freq = ah->curchan->chan->center_freq;
@@@ -1085,64 -896,11 +895,13 @@@
sc->rx.num_pkts++;
#endif
-exit:
- sc->rx.discard_next = false;
- return ret;
+ return 0;
+
+corrupt:
+ sc->rx.discard_next = rx_stats->rs_more;
+ return -EINVAL;
}
- static void ath9k_rx_skb_postprocess(struct ath_common *common,
- struct sk_buff *skb,
- struct ath_rx_status *rx_stats,
- struct ieee80211_rx_status *rxs,
- bool decrypt_error)
- {
- struct ath_hw *ah = common->ah;
- struct ieee80211_hdr *hdr;
- int hdrlen, padpos, padsize;
- u8 keyix;
- __le16 fc;
-
- /* see if any padding is done by the hw and remove it */
- hdr = (struct ieee80211_hdr *) skb->data;
- hdrlen = ieee80211_get_hdrlen_from_skb(skb);
- fc = hdr->frame_control;
- padpos = ieee80211_hdrlen(fc);
-
- /* The MAC header is padded to have 32-bit boundary if the
- * packet payload is non-zero. The general calculation for
- * padsize would take into account odd header lengths:
- * padsize = (4 - padpos % 4) % 4; However, since only
- * even-length headers are used, padding can only be 0 or 2
- * bytes and we can optimize this a bit. In addition, we must
- * not try to remove padding from short control frames that do
- * not have payload. */
- padsize = padpos & 3;
- if (padsize && skb->len>=padpos+padsize+FCS_LEN) {
- memmove(skb->data + padsize, skb->data, padpos);
- skb_pull(skb, padsize);
- }
-
- keyix = rx_stats->rs_keyix;
-
- if (!(keyix == ATH9K_RXKEYIX_INVALID) && !decrypt_error &&
- ieee80211_has_protected(fc)) {
- rxs->flag |= RX_FLAG_DECRYPTED;
- } else if (ieee80211_has_protected(fc)
- && !decrypt_error && skb->len >= hdrlen + 4) {
- keyix = skb->data[hdrlen + 3] >> 6;
-
- if (test_bit(keyix, common->keymap))
- rxs->flag |= RX_FLAG_DECRYPTED;
- }
- if (ah->sw_mgmt_crypto &&
- (rxs->flag & RX_FLAG_DECRYPTED) &&
- ieee80211_is_mgmt(fc))
- /* Use software decrypt for management frames. */
- rxs->flag &= ~RX_FLAG_DECRYPTED;
- }
-
/*
* Run the LNA combining algorithm only in these cases:
*
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2014-02-26 3:21 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-26 3:21 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-10-24 0:24 linux-next: manual merge of the net-next tree with the wireless tree Stephen Rothwell
2023-10-12 0:37 Stephen Rothwell
2023-10-12 8:10 ` Johannes Berg
2023-10-19 21:40 ` Jakub Kicinski
2023-10-20 5:49 ` Johannes Berg
2014-07-24 2:47 Stephen Rothwell
2014-07-23 2:00 Stephen Rothwell
2014-05-23 3:45 Stephen Rothwell
2014-02-21 2:34 Stephen Rothwell
2013-09-27 3:03 Stephen Rothwell
2013-08-27 4:10 Stephen Rothwell
2013-04-04 0:44 Stephen Rothwell
2013-05-02 3:19 ` Stephen Rothwell
2013-04-02 2:00 Stephen Rothwell
2013-04-02 9:30 ` Samuel Ortiz
2013-03-26 0:51 Stephen Rothwell
2013-03-26 0:48 Stephen Rothwell
2012-07-03 1:44 Stephen Rothwell
2012-07-03 2:33 ` John W. Linville
2012-06-14 3:12 Stephen Rothwell
2012-06-14 4:50 ` Mohammed Shafi Shajakhan
2012-06-14 12:59 ` John W. Linville
2012-05-04 3:21 Stephen Rothwell
2012-05-04 4:35 ` Guy, Wey-Yi
2012-02-16 1:40 Stephen Rothwell
2012-02-16 1:37 Stephen Rothwell
2011-12-20 2:02 Stephen Rothwell
2011-12-15 2:53 Stephen Rothwell
2011-12-15 3:16 ` Stephen Rothwell
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=20140226142105.6e7154303b423b0eef78518d@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux@rempel-privat.de \
--cc=linville@tuxdriver.com \
--cc=nbd@openwrt.org \
--cc=netdev@vger.kernel.org \
/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).