Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb21199a authored by Florian Schilhabel's avatar Florian Schilhabel Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192su: merge updated ieee80211_crypto_ops()

parent 353db17d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1141,6 +1141,7 @@ struct ieee80211_device {
	/* hw security related */
	u8 hwsec_active;
	bool is_silent_reset;
	bool force_mic_error;
	bool is_roaming;
	bool ieee_up;
	bool bSupportRemoteWakeUp;
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ struct ieee80211_crypto_ops {
	 * These can be NULL if full MSDU operations are not needed. */
	int (*encrypt_msdu)(struct sk_buff *skb, int hdr_len, void *priv);
	int (*decrypt_msdu)(struct sk_buff *skb, int keyidx, int hdr_len,
			    void *priv);
			    void *priv, struct ieee80211_device* ieee);

	int (*set_key)(void *key, int len, u8 *seq, void *priv);
	int (*get_key)(void *key, int len, u8 *seq, void *priv);
+7 −2
Original line number Diff line number Diff line
@@ -604,7 +604,7 @@ static void ieee80211_michael_mic_failure(struct net_device *dev,
}

static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx,
				     int hdr_len, void *priv)
				     int hdr_len, void *priv, struct ieee80211_device* ieee)
{
	struct ieee80211_tkip_data *tkey = priv;
	u8 mic[8];
@@ -630,9 +630,14 @@ static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx,
		       "MSDU from %pM keyidx=%d\n",
		       skb->dev ? skb->dev->name : "N/A", hdr->addr2,
		       keyidx);
		if (skb->dev)
                printk("%d, force_mic_error = %d\n", (memcmp(mic, skb->data + skb->len - 8, 8) != 0),\
                        ieee->force_mic_error);
		if (skb->dev) {
                        printk("skb->dev != NULL\n");
			ieee80211_michael_mic_failure(skb->dev, hdr, keyidx);
                }
		tkey->dot11RSNAStatsTKIPLocalMICFailures++;
                ieee->force_mic_error = false;
		return -1;
	}

+1 −1
Original line number Diff line number Diff line
@@ -360,7 +360,7 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device* ieee, struct sk_buff *s
	hdrlen = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));

	atomic_inc(&crypt->refcnt);
	res = crypt->ops->decrypt_msdu(skb, keyidx, hdrlen, crypt->priv);
	res = crypt->ops->decrypt_msdu(skb, keyidx, hdrlen, crypt->priv,ieee);
	atomic_dec(&crypt->refcnt);
	if (res < 0) {
		printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed"