aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/key.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/key.c')
-rw-r--r--net/mac80211/key.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 4700718e010f..37e372896230 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -167,8 +167,10 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
167 * The driver doesn't know anything about VLAN interfaces. 167 * The driver doesn't know anything about VLAN interfaces.
168 * Hence, don't send GTKs for VLAN interfaces to the driver. 168 * Hence, don't send GTKs for VLAN interfaces to the driver.
169 */ 169 */
170 if (!(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE)) 170 if (!(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
171 ret = 1;
171 goto out_unsupported; 172 goto out_unsupported;
173 }
172 } 174 }
173 175
174 ret = drv_set_key(key->local, SET_KEY, sdata, 176 ret = drv_set_key(key->local, SET_KEY, sdata,
@@ -213,11 +215,8 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
213 /* all of these we can do in software - if driver can */ 215 /* all of these we can do in software - if driver can */
214 if (ret == 1) 216 if (ret == 1)
215 return 0; 217 return 0;
216 if (ieee80211_hw_check(&key->local->hw, SW_CRYPTO_CONTROL)) { 218 if (ieee80211_hw_check(&key->local->hw, SW_CRYPTO_CONTROL))
217 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
218 return 0;
219 return -EINVAL; 219 return -EINVAL;
220 }
221 return 0; 220 return 0;
222 default: 221 default:
223 return -EINVAL; 222 return -EINVAL;