@@ -85,9 +85,7 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
sdata = key->sdata;
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
- sdata = container_of(sdata->bss,
- struct ieee80211_sub_if_data,
- u.ap);
+ goto out_unsupported;
ret = drv_set_key(key->local, SET_KEY, sdata, sta, &key->conf);
@@ -135,9 +133,7 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
sdata = key->sdata;
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
- sdata = container_of(sdata->bss,
- struct ieee80211_sub_if_data,
- u.ap);
+ return;
ret = drv_set_key(key->local, DISABLE_KEY, sdata,
sta, &key->conf);