cfg80211.c (93fbff1197474d7b65e598c6f48fa82a5c334539) cfg80211.c (e7a7b84e33178db4a839c5e1773247be17597c1f)
1/*
2 * Copyright (c) 2004-2011 Atheros Communications Inc.
3 * Copyright (c) 2011-2012 Qualcomm Atheros, Inc.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *

--- 1110 unchanged lines hidden (view full) ---

1119 NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT);
1120
1121 mutex_lock(&vif->wdev.mtx);
1122 cfg80211_ch_switch_notify(vif->ndev, &chandef, 0);
1123 mutex_unlock(&vif->wdev.mtx);
1124}
1125
1126static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
1/*
2 * Copyright (c) 2004-2011 Atheros Communications Inc.
3 * Copyright (c) 2011-2012 Qualcomm Atheros, Inc.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *

--- 1110 unchanged lines hidden (view full) ---

1119 NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT);
1120
1121 mutex_lock(&vif->wdev.mtx);
1122 cfg80211_ch_switch_notify(vif->ndev, &chandef, 0);
1123 mutex_unlock(&vif->wdev.mtx);
1124}
1125
1126static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
1127 u8 key_index, bool pairwise,
1127 int link_id, u8 key_index, bool pairwise,
1128 const u8 *mac_addr,
1129 struct key_params *params)
1130{
1131 struct ath6kl *ar = ath6kl_priv(ndev);
1132 struct ath6kl_vif *vif = netdev_priv(ndev);
1133 struct ath6kl_key *key = NULL;
1134 int seq_len;
1135 u8 key_usage;

--- 108 unchanged lines hidden (view full) ---

1244 return ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx, key_index,
1245 key_type, key_usage, key->key_len,
1246 key->seq, key->seq_len, key->key,
1247 KEY_OP_INIT_VAL,
1248 (u8 *) mac_addr, SYNC_BOTH_WMIFLAG);
1249}
1250
1251static int ath6kl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
1128 const u8 *mac_addr,
1129 struct key_params *params)
1130{
1131 struct ath6kl *ar = ath6kl_priv(ndev);
1132 struct ath6kl_vif *vif = netdev_priv(ndev);
1133 struct ath6kl_key *key = NULL;
1134 int seq_len;
1135 u8 key_usage;

--- 108 unchanged lines hidden (view full) ---

1244 return ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx, key_index,
1245 key_type, key_usage, key->key_len,
1246 key->seq, key->seq_len, key->key,
1247 KEY_OP_INIT_VAL,
1248 (u8 *) mac_addr, SYNC_BOTH_WMIFLAG);
1249}
1250
1251static int ath6kl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
1252 u8 key_index, bool pairwise,
1252 int link_id, u8 key_index, bool pairwise,
1253 const u8 *mac_addr)
1254{
1255 struct ath6kl *ar = ath6kl_priv(ndev);
1256 struct ath6kl_vif *vif = netdev_priv(ndev);
1257
1258 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: index %d\n", __func__, key_index);
1259
1260 if (!ath6kl_cfg80211_ready(vif))

--- 13 unchanged lines hidden (view full) ---

1274 }
1275
1276 vif->keys[key_index].key_len = 0;
1277
1278 return ath6kl_wmi_deletekey_cmd(ar->wmi, vif->fw_vif_idx, key_index);
1279}
1280
1281static int ath6kl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,
1253 const u8 *mac_addr)
1254{
1255 struct ath6kl *ar = ath6kl_priv(ndev);
1256 struct ath6kl_vif *vif = netdev_priv(ndev);
1257
1258 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: index %d\n", __func__, key_index);
1259
1260 if (!ath6kl_cfg80211_ready(vif))

--- 13 unchanged lines hidden (view full) ---

1274 }
1275
1276 vif->keys[key_index].key_len = 0;
1277
1278 return ath6kl_wmi_deletekey_cmd(ar->wmi, vif->fw_vif_idx, key_index);
1279}
1280
1281static int ath6kl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,
1282 u8 key_index, bool pairwise,
1282 int link_id, u8 key_index, bool pairwise,
1283 const u8 *mac_addr, void *cookie,
1284 void (*callback) (void *cookie,
1285 struct key_params *))
1286{
1287 struct ath6kl_vif *vif = netdev_priv(ndev);
1288 struct ath6kl_key *key = NULL;
1289 struct key_params params;
1290

--- 18 unchanged lines hidden (view full) ---

1309 params.key = key->key;
1310
1311 callback(cookie, &params);
1312
1313 return key->key_len ? 0 : -ENOENT;
1314}
1315
1316static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy,
1283 const u8 *mac_addr, void *cookie,
1284 void (*callback) (void *cookie,
1285 struct key_params *))
1286{
1287 struct ath6kl_vif *vif = netdev_priv(ndev);
1288 struct ath6kl_key *key = NULL;
1289 struct key_params params;
1290

--- 18 unchanged lines hidden (view full) ---

1309 params.key = key->key;
1310
1311 callback(cookie, &params);
1312
1313 return key->key_len ? 0 : -ENOENT;
1314}
1315
1316static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy,
1317 struct net_device *ndev,
1317 struct net_device *ndev, int link_id,
1318 u8 key_index, bool unicast,
1319 bool multicast)
1320{
1321 struct ath6kl *ar = ath6kl_priv(ndev);
1322 struct ath6kl_vif *vif = netdev_priv(ndev);
1323 struct ath6kl_key *key = NULL;
1324 u8 key_usage;
1325 enum ath6kl_crypto_type key_type = NONE_CRYPT;

--- 2715 unchanged lines hidden ---
1318 u8 key_index, bool unicast,
1319 bool multicast)
1320{
1321 struct ath6kl *ar = ath6kl_priv(ndev);
1322 struct ath6kl_vif *vif = netdev_priv(ndev);
1323 struct ath6kl_key *key = NULL;
1324 u8 key_usage;
1325 enum ath6kl_crypto_type key_type = NONE_CRYPT;

--- 2715 unchanged lines hidden ---