Re: [patch 7/7] d80211: do not pass an invalid key index to set_key()
> Use HW_KEY_IDX_INVALID, please. oops, here you go (also fixed bad indentation): -- d80211: do not pass an invalid key index to set_key() If a hardware key has not been configured then there is no point to calling DISABLE_KEY. Signed-off-by: David Kimdon <[EMAIL PROTECTED]> Index: wireless-dev/net/d80211/ieee80211_ioctl.c === --- wireless-dev.orig/net/d80211/ieee80211_ioctl.c +++ wireless-dev/net/d80211/ieee80211_ioctl.c @@ -612,7 +612,9 @@ static int ieee80211_set_encryption(stru if (alg == ALG_NONE) { keyconf = NULL; - if (try_hwaccel && key && local->ops->set_key && + if (try_hwaccel && key && + key->hw_key_idx != HW_KEY_IDX_INVALID && + local->ops->set_key && (keyconf = ieee80211_key_data2conf(local, key)) != NULL && local->ops->set_key(local_to_hw(local), DISABLE_KEY, sta_addr, keyconf, sta ? sta->aid : 0)) { - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch 7/7] d80211: do not pass an invalid key index to set_key()
On Wed, 6 Dec 2006 16:45:40 -0800, David Kimdon wrote: > Index: wireless-dev/net/d80211/ieee80211_ioctl.c > === > --- wireless-dev.orig/net/d80211/ieee80211_ioctl.c > +++ wireless-dev/net/d80211/ieee80211_ioctl.c > @@ -612,7 +612,7 @@ static int ieee80211_set_encryption(stru > > if (alg == ALG_NONE) { > keyconf = NULL; > - if (try_hwaccel && key && local->ops->set_key && > + if (try_hwaccel && key && key->hw_key_idx != -1 && > local->ops->set_key && Use HW_KEY_IDX_INVALID, please. Thanks, Jiri -- Jiri Benc SUSE Labs - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 7/7] d80211: do not pass an invalid key index to set_key()
If a hardware key has not been configured then there is no point to calling DISABLE_KEY. Signed-off-by: David Kimdon <[EMAIL PROTECTED]> Index: wireless-dev/net/d80211/ieee80211_ioctl.c === --- wireless-dev.orig/net/d80211/ieee80211_ioctl.c +++ wireless-dev/net/d80211/ieee80211_ioctl.c @@ -612,7 +612,7 @@ static int ieee80211_set_encryption(stru if (alg == ALG_NONE) { keyconf = NULL; - if (try_hwaccel && key && local->ops->set_key && + if (try_hwaccel && key && key->hw_key_idx != -1 && local->ops->set_key && (keyconf = ieee80211_key_data2conf(local, key)) != NULL && local->ops->set_key(local_to_hw(local), DISABLE_KEY, sta_addr, keyconf, sta ? sta->aid : 0)) { -- - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html