}
static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, u8 key_index,
- int set_tx,
+ int set_tx, const u8 *sta_addr,
struct ieee_param *param,
u32 param_len,
struct key_params *keyparms)
DBG_8723A("%s\n", __func__);
- if (is_broadcast_ether_addr(param->sta_addr)) {
+ if (is_broadcast_ether_addr(sta_addr)) {
if (key_index >= WEP_KEYS) {
ret = -EINVAL;
goto exit;
}
} else {
- psta = rtw_get_stainfo23a(pstapriv, param->sta_addr);
+ psta = rtw_get_stainfo23a(pstapriv, sta_addr);
if (!psta) {
/* ret = -EINVAL; */
DBG_8723A("rtw_set_encryption(), sta has already "
#endif
static int rtw_cfg80211_set_encryption(struct net_device *dev, u8 key_index,
- int set_tx,
+ int set_tx, const u8 *sta_addr,
struct ieee_param *param, u32 param_len,
struct key_params *keyparms)
{
key_len = keyparms->key_len;
- if (is_broadcast_ether_addr(param->sta_addr)) {
+ if (is_broadcast_ether_addr(sta_addr)) {
if (key_index >= WEP_KEYS) {
ret = -EINVAL;
goto exit;
struct wireless_dev *rtw_wdev = wiphy_to_wdev(wiphy);
struct rtw_adapter *padapter = wiphy_to_adapter(wiphy);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
+ u8 sta_addr[ETH_ALEN];
DBG_8723A("%s(%s): adding key for %pM\n", __func__, ndev->name,
mac_addr);
return -ENOMEM;
param->cmd = IEEE_CMD_SET_ENCRYPTION;
- eth_broadcast_addr(param->sta_addr);
+ eth_broadcast_addr(sta_addr);
if (!mac_addr || is_broadcast_ether_addr(mac_addr))
set_tx = 0; /* for wpa/wpa2 group key */
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
ret = rtw_cfg80211_set_encryption(ndev, key_index, set_tx,
+ sta_addr,
param, param_len, params);
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
#ifdef CONFIG_8723AU_AP_MODE
if (mac_addr)
- ether_addr_copy(param->sta_addr, mac_addr);
+ ether_addr_copy(sta_addr, mac_addr);
ret = rtw_cfg80211_ap_set_encryption(ndev, key_index, set_tx,
+ sta_addr,
param, param_len, params);
#endif
} else {