mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-09 06:43:06 +00:00
rtl8188eu: Fix some edit errors from replace spin lock wrappers
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
238f9a6fa1
commit
849d585656
16 changed files with 292 additions and 294 deletions
|
@ -354,7 +354,7 @@ static int __nat25_db_network_lookup_and_replace(struct adapter *priv,
|
|||
{
|
||||
struct nat25_network_db_entry *db;
|
||||
|
||||
spin_lock(&priv->br_ext_lock);
|
||||
spin_lock_bh(&priv->br_ext_lock);
|
||||
|
||||
db = priv->nethash[__nat25_network_hash(networkAddr)];
|
||||
while (db != NULL) {
|
||||
|
@ -390,12 +390,12 @@ static int __nat25_db_network_lookup_and_replace(struct adapter *priv,
|
|||
db->networkAddr[15],
|
||||
db->networkAddr[16]);
|
||||
}
|
||||
spin_unlock(&priv->br_ext_lock);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
return 1;
|
||||
}
|
||||
db = db->next_hash;
|
||||
}
|
||||
spin_unlock(&priv->br_ext_lock);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -405,21 +405,21 @@ static void __nat25_db_network_insert(struct adapter *priv,
|
|||
struct nat25_network_db_entry *db;
|
||||
int hash;
|
||||
|
||||
spin_lock(&priv->br_ext_lock);
|
||||
spin_lock_bh(&priv->br_ext_lock);
|
||||
hash = __nat25_network_hash(networkAddr);
|
||||
db = priv->nethash[hash];
|
||||
while (db != NULL) {
|
||||
if (!memcmp(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN)) {
|
||||
memcpy(db->macAddr, macAddr, ETH_ALEN);
|
||||
db->ageing_timer = jiffies;
|
||||
spin_unlock(&priv->br_ext_lock);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
return;
|
||||
}
|
||||
db = db->next_hash;
|
||||
}
|
||||
db = (struct nat25_network_db_entry *) rtw_malloc(sizeof(*db));
|
||||
if (db == NULL) {
|
||||
spin_unlock(&priv->br_ext_lock);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
return;
|
||||
}
|
||||
memcpy(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN);
|
||||
|
@ -429,7 +429,7 @@ static void __nat25_db_network_insert(struct adapter *priv,
|
|||
|
||||
__network_hash_link(priv, db, hash);
|
||||
|
||||
spin_unlock(&priv->br_ext_lock);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
}
|
||||
|
||||
static void __nat25_db_print(struct adapter *priv)
|
||||
|
@ -444,7 +444,7 @@ void nat25_db_cleanup(struct adapter *priv)
|
|||
{
|
||||
int i;
|
||||
|
||||
spin_lock(&priv->br_ext_lock);
|
||||
spin_lock_bh(&priv->br_ext_lock);
|
||||
|
||||
for (i = 0; i < NAT25_HASH_SIZE; i++) {
|
||||
struct nat25_network_db_entry *f;
|
||||
|
@ -463,14 +463,14 @@ void nat25_db_cleanup(struct adapter *priv)
|
|||
f = g;
|
||||
}
|
||||
}
|
||||
spin_unlock(&priv->br_ext_lock);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
}
|
||||
|
||||
void nat25_db_expire(struct adapter *priv)
|
||||
{
|
||||
int i;
|
||||
|
||||
spin_lock(&priv->br_ext_lock);
|
||||
spin_lock_bh(&priv->br_ext_lock);
|
||||
|
||||
for (i = 0; i < NAT25_HASH_SIZE; i++) {
|
||||
struct nat25_network_db_entry *f;
|
||||
|
@ -494,7 +494,7 @@ void nat25_db_expire(struct adapter *priv)
|
|||
f = g;
|
||||
}
|
||||
}
|
||||
spin_unlock(&priv->br_ext_lock);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
}
|
||||
|
||||
int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
||||
|
@ -1059,7 +1059,7 @@ int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb)
|
|||
}
|
||||
|
||||
if (!priv->ethBrExtInfo.nat25_disable) {
|
||||
spin_lock(&priv->br_ext_lock);
|
||||
spin_lock_bh(&priv->br_ext_lock);
|
||||
/*
|
||||
* This function look up the destination network address from
|
||||
* the NAT2.5 database. Return value = -1 means that the
|
||||
|
@ -1070,9 +1070,9 @@ int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb)
|
|||
!memcmp(priv->scdb_ip, skb->data+ETH_HLEN+16, 4)) {
|
||||
memcpy(skb->data, priv->scdb_mac, ETH_ALEN);
|
||||
|
||||
spin_unlock(&priv->br_ext_lock);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
} else {
|
||||
spin_unlock(&priv->br_ext_lock);
|
||||
spin_unlock_bh(&priv->br_ext_lock);
|
||||
|
||||
retval = nat25_db_handle(priv, skb, NAT25_LOOKUP);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue