staging: rtl8723au: issue_probersp(): Don't insert beacon data twice
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sat, 21 Jun 2014 14:50:18 +0000 (16:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Jun 2014 20:08:37 +0000 (13:08 -0700)
In case of AP mode, we were inserting the beacon data twice in the
probe_resp frame, leading to a corrupted on the wire frame.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_mlme_ext.c

index d1c40ae465413ef4ed09822c90a8c0296d3e07f5..4f9e5a918bb0717d95ea6f1f4a974872cb6c917b 100644 (file)
@@ -2592,7 +2592,8 @@ static void issue_probersp(struct rtw_adapter *padapter, unsigned char *da,
                                                  cur_network->IELength -
                                                  _FIXED_IE_LENGTH_);
 
-               memcpy(pframe, cur_network->IEs, cur_network->IELength);
+               memcpy(pframe, cur_network->IEs + _FIXED_IE_LENGTH_,
+                      cur_network->IELength - _FIXED_IE_LENGTH_);
                pframe += cur_network->IELength;
                pattrib->pktlen += cur_network->IELength;