Commit 282fa9f3 authored by Mike McCormack's avatar Mike McCormack Committed by Greg Kroah-Hartman

staging: rtl8192e: Pass priv to EnableHWSecurityConfig8192

Signed-off-by: default avatarMike McCormack <mikem@ring3k.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e676ae58
...@@ -1121,7 +1121,7 @@ int rtl8192_up(struct net_device *dev); ...@@ -1121,7 +1121,7 @@ int rtl8192_up(struct net_device *dev);
void rtl8192_commit(struct r8192_priv *priv); void rtl8192_commit(struct r8192_priv *priv);
void write_phy(struct net_device *dev, u8 adr, u8 data); void write_phy(struct net_device *dev, u8 adr, u8 data);
void CamResetAllEntry(struct r8192_priv *priv); void CamResetAllEntry(struct r8192_priv *priv);
void EnableHWSecurityConfig8192(struct net_device *dev); void EnableHWSecurityConfig8192(struct r8192_priv *priv);
void setKey(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u16 KeyType, const u8 *MacAddr, u8 DefaultKey, u32 *KeyContent ); void setKey(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u16 KeyType, const u8 *MacAddr, u8 DefaultKey, u32 *KeyContent );
void firmware_init_param(struct net_device *dev); void firmware_init_param(struct net_device *dev);
RT_STATUS cmpk_message_handle_tx(struct net_device *dev, u8* codevirtualaddress, u32 packettype, u32 buffer_len); RT_STATUS cmpk_message_handle_tx(struct net_device *dev, u8* codevirtualaddress, u32 packettype, u32 buffer_len);
......
...@@ -1488,7 +1488,7 @@ static void rtl8192_link_change(struct net_device *dev) ...@@ -1488,7 +1488,7 @@ static void rtl8192_link_change(struct net_device *dev)
//add this as in pure N mode, wep encryption will use software way, but there is no chance to set this as wep will not set group key in wext. WB.2008.07.08 //add this as in pure N mode, wep encryption will use software way, but there is no chance to set this as wep will not set group key in wext. WB.2008.07.08
if ((KEY_TYPE_WEP40 == ieee->pairwise_key_type) || (KEY_TYPE_WEP104 == ieee->pairwise_key_type)) if ((KEY_TYPE_WEP40 == ieee->pairwise_key_type) || (KEY_TYPE_WEP104 == ieee->pairwise_key_type))
EnableHWSecurityConfig8192(dev); EnableHWSecurityConfig8192(priv);
} }
else else
{ {
...@@ -3561,7 +3561,7 @@ static void r8192e_set_hw_key(struct r8192_priv *priv, struct ieee_param *ipw) ...@@ -3561,7 +3561,7 @@ static void r8192e_set_hw_key(struct r8192_priv *priv, struct ieee_param *ipw)
if (ieee->pairwise_key_type) { if (ieee->pairwise_key_type) {
memcpy(key, ipw->u.crypt.key, 16); memcpy(key, ipw->u.crypt.key, 16);
EnableHWSecurityConfig8192(dev); EnableHWSecurityConfig8192(priv);
/* /*
* We fill both index entry and 4th entry for pairwise * We fill both index entry and 4th entry for pairwise
* key as in IPW interface, adhoc will only get here, * key as in IPW interface, adhoc will only get here,
...@@ -4913,10 +4913,9 @@ static irqreturn_t rtl8192_interrupt(int irq, void *netdev) ...@@ -4913,10 +4913,9 @@ static irqreturn_t rtl8192_interrupt(int irq, void *netdev)
return ret; return ret;
} }
void EnableHWSecurityConfig8192(struct net_device *dev) void EnableHWSecurityConfig8192(struct r8192_priv *priv)
{ {
u8 SECR_value = 0x0; u8 SECR_value = 0x0;
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
struct ieee80211_device* ieee = priv->ieee80211; struct ieee80211_device* ieee = priv->ieee80211;
SECR_value = SCR_TxEncEnable | SCR_RxDecEnable; SECR_value = SCR_TxEncEnable | SCR_RxDecEnable;
......
...@@ -685,7 +685,7 @@ static int r8192_wx_set_enc(struct net_device *dev, ...@@ -685,7 +685,7 @@ static int r8192_wx_set_enc(struct net_device *dev,
//printk("-------====>length:%d, key_idx:%d, flag:%x\n", wrqu->encoding.length, key_idx, wrqu->encoding.flags); //printk("-------====>length:%d, key_idx:%d, flag:%x\n", wrqu->encoding.length, key_idx, wrqu->encoding.flags);
if(wrqu->encoding.length==0x5){ if(wrqu->encoding.length==0x5){
ieee->pairwise_key_type = KEY_TYPE_WEP40; ieee->pairwise_key_type = KEY_TYPE_WEP40;
EnableHWSecurityConfig8192(dev); EnableHWSecurityConfig8192(priv);
setKey( dev, setKey( dev,
key_idx, //EntryNo key_idx, //EntryNo
key_idx, //KeyIndex key_idx, //KeyIndex
...@@ -697,7 +697,7 @@ static int r8192_wx_set_enc(struct net_device *dev, ...@@ -697,7 +697,7 @@ static int r8192_wx_set_enc(struct net_device *dev,
else if(wrqu->encoding.length==0xd){ else if(wrqu->encoding.length==0xd){
ieee->pairwise_key_type = KEY_TYPE_WEP104; ieee->pairwise_key_type = KEY_TYPE_WEP104;
EnableHWSecurityConfig8192(dev); EnableHWSecurityConfig8192(priv);
setKey( dev, setKey( dev,
key_idx, //EntryNo key_idx, //EntryNo
key_idx, //KeyIndex key_idx, //KeyIndex
...@@ -901,7 +901,7 @@ static int r8192_wx_set_enc_ext(struct net_device *dev, ...@@ -901,7 +901,7 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
if ((ext->key_len == 13) && (alg == KEY_TYPE_WEP40) ) if ((ext->key_len == 13) && (alg == KEY_TYPE_WEP40) )
alg = KEY_TYPE_WEP104; alg = KEY_TYPE_WEP104;
ieee->pairwise_key_type = alg; ieee->pairwise_key_type = alg;
EnableHWSecurityConfig8192(dev); EnableHWSecurityConfig8192(priv);
} }
memcpy((u8*)key, ext->key, 16); //we only get 16 bytes key.why? WB 2008.7.1 memcpy((u8*)key, ext->key, 16); //we only get 16 bytes key.why? WB 2008.7.1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment