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: Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
29d1e7209e
Коммит
ec03ab77cc
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче