hostif_data_indication is able to be refactored after previous commit. Refactor function in two separate patches to ease review. Signed-off-by: Tobin C. Harding <me@xxxxxxxx> --- drivers/staging/ks7010/ks_hostif.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index f4beb86..565f051 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -340,13 +340,14 @@ static void check_13th_byte_of_rx_data(struct ks_wlan_private *priv) if (skb) { memcpy(skb_put(skb, 12), priv->rxp, 12); /* 8802/FDDI MAC copy */ /* (SNAP+UI..) skip */ - memcpy(skb_put(skb, rx_ind_size - 12), priv->rxp + 18, rx_ind_size - 12); /* copy after Type */ + + /* copy after Type */ + memcpy(skb_put(skb, rx_ind_size - 12), priv->rxp + 18, rx_ind_size - 12); aa1x_hdr = (struct ieee802_1x_hdr *)(priv->rxp + 20); - if (aa1x_hdr->type == IEEE802_1X_TYPE_EAPOL_KEY - && priv->wpa.rsn_enabled) { - eap_key = - (struct wpa_eapol_key *)(aa1x_hdr + 1); + if (aa1x_hdr->type == IEEE802_1X_TYPE_EAPOL_KEY && + priv->wpa.rsn_enabled) { + eap_key = (struct wpa_eapol_key *)(aa1x_hdr + 1); atomic_set(&priv->psstatus.snooze_guard, 1); } @@ -367,19 +368,19 @@ static void check_13th_byte_of_rx_data(struct ks_wlan_private *priv) DPRINTK(3, "NETBEUI/NetBIOS rx_ind_size=%d\n", rx_ind_size); if (skb) { - memcpy(skb_put(skb, 12), priv->rxp, 12); /* 8802/FDDI MAC copy */ + memcpy(skb_put(skb, 12), priv->rxp, 12); /* 8802/FDDI MAC copy */ - temp[0] = (((rx_ind_size - 12) >> 8) & 0xff); /* NETBEUI size add */ + temp[0] = (((rx_ind_size - 12) >> 8) & 0xff); /* NETBEUI size add */ temp[1] = ((rx_ind_size - 12) & 0xff); memcpy(skb_put(skb, 2), temp, 2); - memcpy(skb_put(skb, rx_ind_size - 14), priv->rxp + 12, rx_ind_size - 14); /* copy after Type */ + /* copy after Type */ + memcpy(skb_put(skb, rx_ind_size - 14), priv->rxp + 12, rx_ind_size - 14); aa1x_hdr = (struct ieee802_1x_hdr *)(priv->rxp + 14); - if (aa1x_hdr->type == IEEE802_1X_TYPE_EAPOL_KEY - && priv->wpa.rsn_enabled) { - eap_key = - (struct wpa_eapol_key *)(aa1x_hdr + 1); + if (aa1x_hdr->type == IEEE802_1X_TYPE_EAPOL_KEY && + priv->wpa.rsn_enabled) { + eap_key = (struct wpa_eapol_key *)(aa1x_hdr + 1); atomic_set(&priv->psstatus.snooze_guard, 1); } -- 2.7.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel