Commit 3fe56324 authored by Rickard Strandqvist's avatar Rickard Strandqvist Committed by Greg Kroah-Hartman

staging: rtl8192u: r8192U_core.c: Cleaning up unclear and confusing code

Removes confusing and unclear code.
Signed-off-by: default avatarRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2fb1cccc
...@@ -1237,12 +1237,11 @@ u8 DrvAggr_GetAggregatibleList(struct net_device *dev, struct sk_buff *skb, ...@@ -1237,12 +1237,11 @@ u8 DrvAggr_GetAggregatibleList(struct net_device *dev, struct sk_buff *skb,
static void rtl8192_tx_isr(struct urb *tx_urb) static void rtl8192_tx_isr(struct urb *tx_urb)
{ {
struct sk_buff *skb = (struct sk_buff *)tx_urb->context; struct sk_buff *skb = (struct sk_buff *)tx_urb->context;
struct net_device *dev = NULL; struct net_device *dev = (struct net_device *)(skb->cb);
struct r8192_priv *priv = NULL; struct r8192_priv *priv = NULL;
cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
u8 queue_index = tcb_desc->queue_index; u8 queue_index = tcb_desc->queue_index;
memcpy(&dev, (struct net_device *)(skb->cb), sizeof(struct net_device *));
priv = ieee80211_priv(dev); priv = ieee80211_priv(dev);
if (tcb_desc->queue_index != TXCMD_QUEUE) { if (tcb_desc->queue_index != TXCMD_QUEUE) {
...@@ -1448,7 +1447,7 @@ static void rtl8192_net_update(struct net_device *dev) ...@@ -1448,7 +1447,7 @@ static void rtl8192_net_update(struct net_device *dev)
net = &priv->ieee80211->current_network; net = &priv->ieee80211->current_network;
rtl8192_config_rate(dev, &rate_config); rtl8192_config_rate(dev, &rate_config);
priv->basic_rate = rate_config &= 0x15f; priv->basic_rate = rate_config & 0x15f;
write_nic_dword(dev, BSSIDR, ((u32 *)net->bssid)[0]); write_nic_dword(dev, BSSIDR, ((u32 *)net->bssid)[0]);
write_nic_word(dev, BSSIDR+4, ((u16 *)net->bssid)[2]); write_nic_word(dev, BSSIDR+4, ((u16 *)net->bssid)[2]);
......
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