diff mbox

WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150 [mac80211]()

Message ID BANLkTim3-ve4BD6wghA=F-asEqJmcDip6Q@mail.gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Mohammed Shafi May 3, 2011, 11:44 a.m. UTC
On Tue, May 3, 2011 at 4:57 PM, rossi.f@inwind.it <rossi.f@inwind.it> wrote:
>>Da: yogeshp@marvell.com
>>Data: 03/05/2011 12.51
>>A: "rossi.f@inwind.it"<rossi.f@inwind.it>, "johannes@sipsolutions.net"
> <johannes@sipsolutions.net>
>>Cc: "linux-wireless@vger.kernel.org"<linux-wireless@vger.kernel.org>
>>Ogg: RE: WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x52/0x150
> [mac80211]()
>>
>>>I get the warning every few seconds.
>>>
>>>Fabio
>>I failed to regenerate the issue on my setup. I am using WEP40 on
>>Ath5k as station on 32 bit machine. I even tried disabling hw encryption.
>>
>>Some more details would be helpful.
>>
>>Thanks
>>Yogesh
>
> I'm using WEP with 128bit key on a 64bit system using ath5k driver. The hw
> encryption is configured with the default value. I don't have access right now
> to the machine, I can provide more details tonight if needed. I can test
> patches to diagnose the problem.
>
> Regards,
> Fabio

this also hits ath9k i think.
just running a traffic between WEP secured AP will reproduce this issue.
saw in set_key call back in ath9k/ath5k

            key->hw_key_idx = ret;
                        /* push IV and Michael MIC generation to stack */
                        key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
                        if (key->cipher == WLAN_CIPHER_SUITE_TKIP)
                                key->flags |= IEEE80211_KEY_FLAG_GENERATE_MM

so may will this help? I don't know whether its a correct and with a
quick test the warning gets fixed.


                return 0;
@@ -161,7 +162,8 @@ static void ieee80211_key_disable_hw_accel(struct
ieee80211_key *key)

        key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE;

-       if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC))
+               if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC)||
+                                       (key->conf.flags &
IEEE80211_KEY_FLAG_GENERATE_IV)))
                key->local->crypto_tx_tailroom_needed_cnt++;
 }



>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index ca3c626..49444c8 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -102,7 +102,8 @@  static int ieee80211_key_enable_hw_accel(struct
ieee80211_key *key)
        if (!ret) {
                key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE;

-               if (!(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC))
+               if (!((key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC)||
+                                       (key->conf.flags &
IEEE80211_KEY_FLAG_GENERATE_IV)))
                        key->local->crypto_tx_tailroom_needed_cnt--;