2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 13:43:55 +08:00
linux-next/drivers/net/wireless
David S. Miller 4a5a553dde brcmfmac: Use standard SKB list accessors in brcmf_sdiod_sglist_rw.
Instead of direct SKB list pointer accesses.

The loops in this function had to be rewritten to accommodate this
more easily.

The first loop iterates now over the target list in the outer loop,
and triggers an mmc data operation when the per-operation limits are
hit.

Then after the loops, if we have any residue, we trigger the last
and final operation.

For the page aligned workaround, where we have to copy the read data
back into the original list of SKBs, we use a two-tiered loop.  The
outer loop stays the same and iterates over pktlist, and then we have
an inner loop which uses skb_peek_next().  The break logic has been
simplified because we know that the aggregate length of the SKBs in
the source and destination lists are the same.

This change also ends up fixing a bug, having to do with the
maintainance of the seg_sz variable and how it drove the outermost
loop.  It begins as:

	seg_sz = target_list->qlen;

ie. the number of packets in the target_list queue.  The loop
structure was then:

	while (seq_sz) {
		...
		while (not at end of target_list) {
			...
			sg_cnt++
			...
		}
		...
		seg_sz -= sg_cnt;

The assumption built into that last statement is that sg_cnt counts
how many packets from target_list have been fully processed by the
inner loop.  But this not true.

If we hit one of the limits, such as the max segment size or the max
request size, we will break and copy a partial packet then contine
back up to the top of the outermost loop.

With the new loops we don't have this problem as we don't guard the
loop exit with a packet count, but instead use the progression of the
pkt_next SKB through the list to the end.  The general structure is:

	sg_cnt = 0;
	skb_queue_walk(target_list, pkt_next) {
		pkt_offset = 0;
		...
		sg_cnt++;
		...
		while (pkt_offset < pkt_next->len) {
			pkt_offset += sg_data_size;
			if (queued up max per request)
				mmc_submit_one();
		}
	}
	if (sg_cnt)
		mmc_submit_one();

The variables that maintain where we are in the MMC command state such
as req_sz, sg_cnt, and sgl are reset when we emit one of these full
sized requests.

Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-10 16:31:15 -08:00
..
admtek
ath ath10k: add QMI message handshake for wcn3990 client 2018-10-13 20:31:56 +03:00
atmel atmel: Replace mdelay() with msleep() in probe_atmel_card() 2018-07-31 10:25:33 +03:00
broadcom brcmfmac: Use standard SKB list accessors in brcmf_sdiod_sglist_rw. 2018-11-10 16:31:15 -08:00
cisco airo: remove unused variables len and dev and clean up formatting 2018-07-31 10:17:19 +03:00
intel iwlegacy: Add a lock assertion in il4965_send_rxon_assoc() 2018-10-13 20:02:29 +03:00
intersil wireless-drivers-next patches for 4.20 2018-10-02 11:46:29 -07:00
marvell libertas: return errno from lbs_add_card() 2018-10-13 20:03:53 +03:00
mediatek mt76x0: phy: do not run calibration during channel switch 2018-10-13 17:39:53 +02:00
quantenna qtnfmac_pcie: cleanup Pearl platform headers 2018-10-13 20:04:48 +03:00
ralink rt2800: flush and txstatus rework for rt2800mmio 2018-10-01 18:37:35 +03:00
realtek rtl8xxxu: Remove set but not used variables 'usedesc40' and 'seq_number' 2018-10-13 20:05:26 +03:00
rsi rsi: Remove unnecessary boolean condition 2018-10-01 18:31:10 +03:00
st cw1200: Remove extra parentheses 2018-08-31 18:42:25 +03:00
ti wlcore: Add support for optional wakeirq 2018-10-05 11:33:31 +03:00
zydas zd1211rw: Replace spin_is_locked() with lockdep 2018-10-05 11:35:05 +03:00
Kconfig
mac80211_hwsim.c mac80211_hwsim: drop now unused work-queue from hwsim 2018-10-08 09:49:06 +02:00
mac80211_hwsim.h
Makefile
ray_cs.c ray_cs: remove redundant pointer 'p' 2018-07-31 10:19:50 +03:00
ray_cs.h
rayctl.h
rndis_wlan.c wireless-drivers: use BIT_ULL for NL80211_STA_INFO_ attribute types 2018-06-27 19:07:39 +03:00
wl3501_cs.c
wl3501.h