On Sun September 12 2010 02:22:50 m...@bobcopeland.com wrote:
> On Wed, Sep 08, 2010 at 04:04:43PM +0900, Bruno Randolf wrote:
> > Use common ath key management functions in ath5k. This fixes problems
> > with HW encryption in AP mode, which was broken in the ath5k
> > implementation.
> 
> We went from this:
> > -           key->flags |= (IEEE80211_KEY_FLAG_GENERATE_IV |
> > -                          IEEE80211_KEY_FLAG_GENERATE_MMIC);
> 
> to:
> > +                   /* 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_MMIC;
> 
> There's no need to special case the flags based on whether the
> cipher is TKIP; mac80211 does this already.
> 
> > +                   if (key->cipher == WLAN_CIPHER_SUITE_CCMP)
> > +                           key->flags |= IEEE80211_KEY_FLAG_SW_MGMT;
> 
> Ditto, this already only affects CCMP in mac80211 (btw, why can't we do
> management frames in hardware?) so it can be more simply written as:
> 
> key->flags |= (IEEE80211_KEY_FLAG_GENERATE_IV |
>                IEEE80211_KEY_FLAG_GENERATE_MMIC |
>                IEEE80211_KEY_FLAG_SW_MGMT);

i just copied the code from ath9k, but you're right - i'll simplify it and 
send a patch v2.

i don't know wether we can encrypt management frames in HW, so until this is 
sorted out, i disabled it.

bruno


_______________________________________________
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to