Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327918
b: refs/heads/master
c: 8e2c406
h: refs/heads/master
v: v3
  • Loading branch information
Larry Finger authored and John W. Linville committed Sep 7, 2012
1 parent 9f3ee39 commit f5a3823
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 229bd9df49cf772b0540ea13d64e8ca1bfcc6b48
refs/heads/master: 8e2c406a5bd3923995f298f32eef25d5c2bcd4a8
11 changes: 3 additions & 8 deletions trunk/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1214,18 +1214,13 @@ static void rtl92c_dm_refresh_rate_adaptive_mask(struct ieee80211_hw *hw)
"PreState = %d, CurState = %d\n",
p_ra->pre_ratr_state, p_ra->ratr_state);

/* Only the PCI card uses sta in the update rate table
* callback routine */
if (rtlhal->interface == INTF_PCI) {
rcu_read_lock();
sta = ieee80211_find_sta(mac->vif, mac->bssid);
}
rcu_read_lock();
sta = ieee80211_find_sta(mac->vif, mac->bssid);
rtlpriv->cfg->ops->update_rate_tbl(hw, sta,
p_ra->ratr_state);

p_ra->pre_ratr_state = p_ra->ratr_state;
if (rtlhal->interface == INTF_PCI)
rcu_read_unlock();
rcu_read_unlock();
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1906,8 +1906,8 @@ static void rtl92ce_update_hal_rate_mask(struct ieee80211_hw *hw,
}
RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG,
"ratr_bitmap :%x\n", ratr_bitmap);
*(u32 *)&rate_mask = EF4BYTE((ratr_bitmap & 0x0fffffff) |
(ratr_index << 28));
*(u32 *)&rate_mask = (ratr_bitmap & 0x0fffffff) |
(ratr_index << 28);
rate_mask[4] = macid | (shortgi ? 0x20 : 0x00) | 0x80;
RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG,
"Rate_index:%x, ratr_val:%x, %x:%x:%x:%x:%x\n",
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ static struct rtl_hal_cfg rtl92ce_hal_cfg = {
.maps[RTL_RC_HT_RATEMCS15] = DESC92_RATEMCS15,
};

DEFINE_PCI_DEVICE_TABLE(rtl92ce_pci_ids) = {
static DEFINE_PCI_DEVICE_TABLE(rtl92ce_pci_ids) = {
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8191, rtl92ce_hal_cfg)},
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8178, rtl92ce_hal_cfg)},
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8177, rtl92ce_hal_cfg)},
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ static void _rtl_tx_desc_checksum(u8 *txdesc)
SET_TX_DESC_TX_DESC_CHECKSUM(txdesc, 0);
for (index = 0; index < 16; index++)
checksum = checksum ^ (*(ptr + index));
SET_TX_DESC_TX_DESC_CHECKSUM(txdesc, cpu_to_le16(checksum));
SET_TX_DESC_TX_DESC_CHECKSUM(txdesc, checksum);
}

void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ void rtl92se_tx_fill_desc(struct ieee80211_hw *hw,
SET_TX_DESC_TX_BUFFER_SIZE(pdesc, (u16) skb->len);

/* DOWRD 8 */
SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc, cpu_to_le32(mapping));
SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc, mapping);

RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, "\n");
}
Expand Down Expand Up @@ -786,7 +786,7 @@ void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
/* 92SE need not to set TX packet size when firmware download */
SET_TX_DESC_PKT_SIZE(pdesc, (u16)(skb->len));
SET_TX_DESC_TX_BUFFER_SIZE(pdesc, (u16)(skb->len));
SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc, cpu_to_le32(mapping));
SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc, mapping);

wmb();
SET_TX_DESC_OWN(pdesc, 1);
Expand All @@ -805,7 +805,7 @@ void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
SET_BITS_TO_LE_4BYTE(skb->data, 24, 7, rtlhal->h2c_txcmd_seq);

SET_TX_DESC_TX_BUFFER_SIZE(pdesc, (u16)(skb->len));
SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc, cpu_to_le32(mapping));
SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc, mapping);

wmb();
SET_TX_DESC_OWN(pdesc, 1);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/rtlwifi/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request,

if (status < 0 && count++ < 4)
pr_err("reg 0x%x, usbctrl_vendorreq TimeOut! status:0x%x value=0x%x\n",
value, status, le32_to_cpu(*(u32 *)pdata));
value, status, *(u32 *)pdata);
return status;
}

Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/net/wireless/rtlwifi/wifi.h
Original file line number Diff line number Diff line change
Expand Up @@ -1820,9 +1820,9 @@ struct bt_coexist_info {
EF1BYTE(*((u8 *)(_ptr)))
/* Read le16 data from memory and convert to host ordering */
#define READEF2BYTE(_ptr) \
EF2BYTE(*((u16 *)(_ptr)))
EF2BYTE(*(_ptr))
#define READEF4BYTE(_ptr) \
EF4BYTE(*((u32 *)(_ptr)))
EF4BYTE(*(_ptr))

/* Write data to memory */
#define WRITEEF1BYTE(_ptr, _val) \
Expand All @@ -1831,7 +1831,7 @@ struct bt_coexist_info {
#define WRITEEF2BYTE(_ptr, _val) \
(*((u16 *)(_ptr))) = EF2BYTE(_val)
#define WRITEEF4BYTE(_ptr, _val) \
(*((u16 *)(_ptr))) = EF2BYTE(_val)
(*((u32 *)(_ptr))) = EF2BYTE(_val)

/* Create a bit mask
* Examples:
Expand Down Expand Up @@ -1864,9 +1864,9 @@ struct bt_coexist_info {
* 4-byte pointer in little-endian system.
*/
#define LE_P4BYTE_TO_HOST_4BYTE(__pstart) \
(EF4BYTE(*((u32 *)(__pstart))))
(EF4BYTE(*((__le32 *)(__pstart))))
#define LE_P2BYTE_TO_HOST_2BYTE(__pstart) \
(EF2BYTE(*((u16 *)(__pstart))))
(EF2BYTE(*((__le16 *)(__pstart))))
#define LE_P1BYTE_TO_HOST_1BYTE(__pstart) \
(EF1BYTE(*((u8 *)(__pstart))))

Expand Down Expand Up @@ -1913,13 +1913,13 @@ value to host byte ordering.*/
* Set subfield of little-endian 4-byte value to specified value.
*/
#define SET_BITS_TO_LE_4BYTE(__pstart, __bitoffset, __bitlen, __val) \
*((u32 *)(__pstart)) = EF4BYTE \
*((u32 *)(__pstart)) = \
( \
LE_BITS_CLEARED_TO_4BYTE(__pstart, __bitoffset, __bitlen) | \
((((u32)__val) & BIT_LEN_MASK_32(__bitlen)) << (__bitoffset)) \
);
#define SET_BITS_TO_LE_2BYTE(__pstart, __bitoffset, __bitlen, __val) \
*((u16 *)(__pstart)) = EF2BYTE \
*((u16 *)(__pstart)) = \
( \
LE_BITS_CLEARED_TO_2BYTE(__pstart, __bitoffset, __bitlen) | \
((((u16)__val) & BIT_LEN_MASK_16(__bitlen)) << (__bitoffset)) \
Expand Down

0 comments on commit f5a3823

Please sign in to comment.