Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec03ab77 authored by Wilfried Klaebe's avatar Wilfried Klaebe Committed by Greg Kroah-Hartman
Browse files

staging: rtl8188eu: remove spaces, correct counts to unbreak P2P ioctls



staging: rtl8188eu: remove spaces, correct counts to unbreak P2P ioctls

It looks like someone did a search-and-replace on that driver, putting
spaces before "=" characters, without checking this is OK everywhere.
Also, in some places, there's memcpm()s/strncmp()s checking for some
different length than the fixed string argument.

These things result in code not working as intended. Fix that.

Signed-off-by: default avatarWilfried Klaebe <w-lkml@lebenslange-mailadresse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 29d1e720
Loading
Loading
Loading
Loading
+37 −37
Original line number Diff line number Diff line
@@ -3887,7 +3887,7 @@ static int rtw_p2p_get(struct net_device *dev,
			"group_id", 8)) {
		rtw_p2p_get_groupid(dev, info, wrqu, extra);
	} else if (!memcmp((__force const char *)wrqu->data.pointer,
			"peer_deva_inv", 9)) {
			"peer_deva_inv", 13)) {
		/*	Get the P2P device address when receiving the P2P Invitation request frame. */
		rtw_p2p_get_peer_devaddr_by_invitation(dev, info, wrqu, extra);
	} else if (!memcmp((__force const char *)wrqu->data.pointer,
@@ -6920,7 +6920,7 @@ static int rtw_mp_ctx(struct net_device *dev,

	DBG_88E("%s: in =%s\n", __func__, extra);

	countPkTx = strncmp(extra, "count =", 5); /*  strncmp true is 0 */
	countPkTx = strncmp(extra, "count=", 6); /*  strncmp true is 0 */
	cotuTx = strncmp(extra, "background", 20);
	CarrSprTx = strncmp(extra, "background, cs", 20);
	scTx = strncmp(extra, "background, sc", 20);
@@ -7044,7 +7044,7 @@ static int rtw_mp_arx(struct net_device *dev,
	DBG_88E("%s: %s\n", __func__, input);

	bStartRx = (strncmp(input, "start", 5) == 0) ? 1 : 0; /*  strncmp true is 0 */
	bStopRx = (strncmp(input, "stop", 5) == 0) ? 1 : 0; /*  strncmp true is 0 */
	bStopRx = (strncmp(input, "stop", 4) == 0) ? 1 : 0; /*  strncmp true is 0 */
	bQueryPhy = (strncmp(input, "phy", 3) == 0) ? 1 : 0; /*  strncmp true is 0 */

	if (bStartRx) {