diff options
author | Yoni Divinsky <yoni.divinsky@ti.com> | 2012-05-30 12:36:39 +0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-18 16:30:21 +0400 |
commit | de5fad815703b5b24bc4726cd71422929537d259 (patch) | |
tree | 4b2c5ab023fc4577748c2a340f10ab6cd0ea515e /net/mac80211/driver-ops.h | |
parent | 5a32aff37a02ebc959837f08d09ac8ba65d4f1b0 (diff) | |
download | linux-de5fad815703b5b24bc4726cd71422929537d259.tar.xz |
mac80211: add op to configure default key id
There are hardwares which support offload of data packets
for example when auto ARP is enabled the hw will send
the ARP response. In such cases if WEP encryption is
configured the hw must know the default WEP key in order
to encrypt the packets correctly.
When hw_accel is enabled and encryption type is set to WEP,
the driver should get the default key index from mac80211.
Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
[cleanups, fixes, documentation]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r-- | net/mac80211/driver-ops.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 0c07f94c5378..e6033b06caba 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -1020,4 +1020,20 @@ static inline void drv_restart_complete(struct ieee80211_local *local) trace_drv_return_void(local); } +static inline void +drv_set_default_unicast_key(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, + int key_idx) +{ + check_sdata_in_driver(sdata); + + WARN_ON_ONCE(key_idx < -1 || key_idx > 3); + + trace_drv_set_default_unicast_key(local, sdata, key_idx); + if (local->ops->set_default_unicast_key) + local->ops->set_default_unicast_key(&local->hw, &sdata->vif, + key_idx); + trace_drv_return_void(local); +} + #endif /* __MAC80211_DRIVER_OPS */ |