[PATCH 49/76] staging: rtl8723au: cfg80211_rtw_connect(): Remove obfuscating pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>

dst_ssid and dst_bssid were just obfuscating that we were in fact
looking at pnetwork.

Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
---
 drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
index 1de7e9e..c959adb 100644
--- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
@@ -2118,8 +2118,6 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
 	struct list_head *phead, *plist, *ptmp;
 	struct wlan_network *pnetwork = NULL;
 	struct cfg80211_ssid ssid;
-	u8 *dst_ssid;
-	u8 *dst_bssid;
 	/* u8 matched_by_bssid = false; */
 	/* u8 matched_by_ssid = false; */
 	u8 matched = false;
@@ -2172,9 +2170,6 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
 	list_for_each_safe(plist, ptmp, phead) {
 		pnetwork = container_of(plist, struct wlan_network, list);
 
-		dst_ssid = pnetwork->network.Ssid.ssid;
-		dst_bssid = pnetwork->network.MacAddress;
-
 		if (sme->bssid) {
 			if (!ether_addr_equal(pnetwork->network.MacAddress,
 					      sme->bssid))
@@ -2189,7 +2184,8 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
 		}
 
 		if (sme->bssid) {
-			if (ether_addr_equal(dst_bssid, sme->bssid)) {
+			if (ether_addr_equal(pnetwork->network.MacAddress,
+					     sme->bssid)) {
 				DBG_8723A("matched by bssid\n");
 
 				memcpy(ssid.ssid, pnetwork->network.Ssid.ssid,
@@ -2200,7 +2196,8 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
 				break;
 			}
 		} else if (sme->ssid && sme->ssid_len) {
-			if (!memcmp(dst_ssid, sme->ssid, sme->ssid_len) &&
+			if (!memcmp(pnetwork->network.Ssid.ssid,
+				    sme->ssid, sme->ssid_len) &&
 			    pnetwork->network.Ssid.ssid_len == sme->ssid_len) {
 				DBG_8723A("matched by ssid\n");
 
-- 
1.9.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux