Commit 902f49ca authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman

staging: ks7010: refactor, whitespace only

Code may be refactored to take advantage of previous patches which
reduced the level of indentation. Function parameter line breaks can
be adjusted in line with kernel coding standards.

Refactor layout of function call parameters. Make whitespace changes
only.
Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f0a4c596
...@@ -2036,10 +2036,8 @@ static int ks_wlan_set_pmksa(struct net_device *dev, ...@@ -2036,10 +2036,8 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
list_for_each(ptr, &priv->pmklist.head) { list_for_each(ptr, &priv->pmklist.head) {
pmk = list_entry(ptr, struct pmk_t, list); pmk = list_entry(ptr, struct pmk_t, list);
if (!memcmp(pmksa->bssid.sa_data, pmk->bssid, ETH_ALEN)) { /* match address! list move to head. */ if (!memcmp(pmksa->bssid.sa_data, pmk->bssid, ETH_ALEN)) { /* match address! list move to head. */
memcpy(pmk->pmkid, pmksa->pmkid, memcpy(pmk->pmkid, pmksa->pmkid, IW_PMKID_LEN);
IW_PMKID_LEN); list_move(&pmk->list, &priv->pmklist.head);
list_move(&pmk->list,
&priv->pmklist.head);
break; /* list_for_each */ break; /* list_for_each */
} }
} }
...@@ -2049,28 +2047,20 @@ static int ks_wlan_set_pmksa(struct net_device *dev, ...@@ -2049,28 +2047,20 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
if (priv->pmklist.size <= PMK_LIST_MAX) { /* new cache data */ if (priv->pmklist.size <= PMK_LIST_MAX) { /* new cache data */
for (i = 0; i < PMK_LIST_MAX; i++) { for (i = 0; i < PMK_LIST_MAX; i++) {
pmk = &priv->pmklist.pmk[i]; pmk = &priv->pmklist.pmk[i];
if (!memcmp if (!memcmp("\x00\x00\x00\x00\x00\x00",
("\x00\x00\x00\x00\x00\x00", pmk->bssid, ETH_ALEN))
pmk->bssid, ETH_ALEN)) break; /* loop */
break;
} }
memcpy(pmk->bssid, pmksa->bssid.sa_data, memcpy(pmk->bssid, pmksa->bssid.sa_data, ETH_ALEN);
ETH_ALEN); memcpy(pmk->pmkid, pmksa->pmkid, IW_PMKID_LEN);
memcpy(pmk->pmkid, pmksa->pmkid, list_add(&pmk->list, &priv->pmklist.head);
IW_PMKID_LEN);
list_add(&pmk->list,
&priv->pmklist.head);
priv->pmklist.size++; priv->pmklist.size++;
} else { /* overwrite old cache data */ } else { /* overwrite old cache data */
pmk = pmk = list_entry(priv->pmklist.head.prev, struct pmk_t,
list_entry(priv->pmklist.head.prev, list);
struct pmk_t, list); memcpy(pmk->bssid, pmksa->bssid.sa_data, ETH_ALEN);
memcpy(pmk->bssid, pmksa->bssid.sa_data, memcpy(pmk->pmkid, pmksa->pmkid, IW_PMKID_LEN);
ETH_ALEN); list_move(&pmk->list, &priv->pmklist.head);
memcpy(pmk->pmkid, pmksa->pmkid,
IW_PMKID_LEN);
list_move(&pmk->list,
&priv->pmklist.head);
} }
break; break;
case IW_PMKSA_REMOVE: case IW_PMKSA_REMOVE:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment