+static int i802_set_encryption(const char *iface, void *priv, const char *alg,
+ const u8 *addr, int idx, const u8 *key,
+ size_t key_len, int txkey)
+{
+ struct i802_driver_data *drv = priv;
+ int ret;
+
+ ret = nl_set_encr(if_nametoindex(iface), drv, alg, addr, idx, key,
+ key_len, txkey);
+ if (ret < 0)
+ return ret;
+
+ if (strcmp(alg, "IGTK") == 0) {
+ ret = nl_set_encr(drv->monitor_ifidx, drv, alg, addr, idx, key,
+ key_len, txkey);
+ }
+
+ return ret;
+}
+
+