brcmfmac: change parameter list for send_key_to_dongle()

The first two parameters given to send_key_to_dongle() are redundant
so they have been removed.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Arend van Spriel 2012-10-22 10:36:26 -07:00 коммит произвёл John W. Linville
Родитель 0af29bf7c1
Коммит 2eaba7e8b4
1 изменённых файлов: 6 добавлений и 19 удалений

Просмотреть файл

@ -432,8 +432,7 @@ static void convert_key_from_CPU(struct brcmf_wsec_key *key,
} }
static int static int
send_key_to_dongle(struct brcmf_cfg80211_info *cfg, s32 bssidx, send_key_to_dongle(struct net_device *ndev, struct brcmf_wsec_key *key)
struct net_device *ndev, struct brcmf_wsec_key *key)
{ {
int err; int err;
struct brcmf_wsec_key_le key_le; struct brcmf_wsec_key_le key_le;
@ -1556,7 +1555,6 @@ brcmf_set_sharedkey(struct net_device *ndev,
struct brcmf_wsec_key key; struct brcmf_wsec_key key;
s32 val; s32 val;
s32 err = 0; s32 err = 0;
s32 bssidx;
WL_CONN("key len (%d)\n", sme->key_len); WL_CONN("key len (%d)\n", sme->key_len);
@ -1599,8 +1597,7 @@ brcmf_set_sharedkey(struct net_device *ndev,
WL_CONN("key length (%d) key index (%d) algo (%d)\n", WL_CONN("key length (%d) key index (%d) algo (%d)\n",
key.len, key.index, key.algo); key.len, key.index, key.algo);
WL_CONN("key \"%s\"\n", key.data); WL_CONN("key \"%s\"\n", key.data);
bssidx = brcmf_find_bssidx(cfg, ndev); err = send_key_to_dongle(ndev, &key);
err = send_key_to_dongle(cfg, bssidx, ndev, &key);
if (err) if (err)
return err; return err;
@ -1846,10 +1843,8 @@ static s32
brcmf_add_keyext(struct wiphy *wiphy, struct net_device *ndev, brcmf_add_keyext(struct wiphy *wiphy, struct net_device *ndev,
u8 key_idx, const u8 *mac_addr, struct key_params *params) u8 key_idx, const u8 *mac_addr, struct key_params *params)
{ {
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_wsec_key key; struct brcmf_wsec_key key;
s32 err = 0; s32 err = 0;
s32 bssidx;
memset(&key, 0, sizeof(key)); memset(&key, 0, sizeof(key));
key.index = (u32) key_idx; key.index = (u32) key_idx;
@ -1858,11 +1853,10 @@ brcmf_add_keyext(struct wiphy *wiphy, struct net_device *ndev,
if (!is_multicast_ether_addr(mac_addr)) if (!is_multicast_ether_addr(mac_addr))
memcpy((char *)&key.ea, (void *)mac_addr, ETH_ALEN); memcpy((char *)&key.ea, (void *)mac_addr, ETH_ALEN);
key.len = (u32) params->key_len; key.len = (u32) params->key_len;
bssidx = brcmf_find_bssidx(cfg, ndev);
/* check for key index change */ /* check for key index change */
if (key.len == 0) { if (key.len == 0) {
/* key delete */ /* key delete */
err = send_key_to_dongle(cfg, bssidx, ndev, &key); err = send_key_to_dongle(ndev, &key);
if (err) if (err)
WL_ERR("key delete error (%d)\n", err); WL_ERR("key delete error (%d)\n", err);
} else { } else {
@ -1917,7 +1911,7 @@ brcmf_add_keyext(struct wiphy *wiphy, struct net_device *ndev,
WL_ERR("Invalid cipher (0x%x)\n", params->cipher); WL_ERR("Invalid cipher (0x%x)\n", params->cipher);
return -EINVAL; return -EINVAL;
} }
err = send_key_to_dongle(cfg, bssidx, ndev, &key); err = send_key_to_dongle(ndev, &key);
if (err) if (err)
WL_ERR("wsec_key error (%d)\n", err); WL_ERR("wsec_key error (%d)\n", err);
} }
@ -1935,7 +1929,6 @@ brcmf_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
s32 wsec; s32 wsec;
s32 err = 0; s32 err = 0;
u8 keybuf[8]; u8 keybuf[8];
s32 bssidx;
WL_TRACE("Enter\n"); WL_TRACE("Enter\n");
WL_CONN("key index (%d)\n", key_idx); WL_CONN("key index (%d)\n", key_idx);
@ -1997,8 +1990,7 @@ brcmf_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
goto done; goto done;
} }
bssidx = brcmf_find_bssidx(cfg, ndev); err = send_key_to_dongle(ndev, &key);
err = send_key_to_dongle(cfg, bssidx, ndev, &key);
if (err) if (err)
goto done; goto done;
@ -2023,10 +2015,8 @@ static s32
brcmf_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev, brcmf_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
u8 key_idx, bool pairwise, const u8 *mac_addr) u8 key_idx, bool pairwise, const u8 *mac_addr)
{ {
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_wsec_key key; struct brcmf_wsec_key key;
s32 err = 0; s32 err = 0;
s32 bssidx;
WL_TRACE("Enter\n"); WL_TRACE("Enter\n");
if (!check_sys_up(wiphy)) if (!check_sys_up(wiphy))
@ -2041,8 +2031,7 @@ brcmf_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
WL_CONN("key index (%d)\n", key_idx); WL_CONN("key index (%d)\n", key_idx);
/* Set the new key/index */ /* Set the new key/index */
bssidx = brcmf_find_bssidx(cfg, ndev); err = send_key_to_dongle(ndev, &key);
err = send_key_to_dongle(cfg, bssidx, ndev, &key);
if (err) { if (err) {
if (err == -EINVAL) { if (err == -EINVAL) {
if (key.index >= DOT11_MAX_DEFAULT_KEYS) if (key.index >= DOT11_MAX_DEFAULT_KEYS)
@ -2068,7 +2057,6 @@ brcmf_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,
struct brcmf_cfg80211_security *sec; struct brcmf_cfg80211_security *sec;
s32 wsec; s32 wsec;
s32 err = 0; s32 err = 0;
s32 bssidx;
WL_TRACE("Enter\n"); WL_TRACE("Enter\n");
WL_CONN("key index (%d)\n", key_idx); WL_CONN("key index (%d)\n", key_idx);
@ -2077,7 +2065,6 @@ brcmf_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,
memset(&params, 0, sizeof(params)); memset(&params, 0, sizeof(params));
bssidx = brcmf_find_bssidx(cfg, ndev);
err = brcmf_fil_bsscfg_int_get(netdev_priv(ndev), "wsec", &wsec); err = brcmf_fil_bsscfg_int_get(netdev_priv(ndev), "wsec", &wsec);
if (err) { if (err) {
WL_ERR("WLC_GET_WSEC error (%d)\n", err); WL_ERR("WLC_GET_WSEC error (%d)\n", err);