Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275677
b: refs/heads/rpi-4.1.y
c: 4dff523
h: refs/heads/rpi-4.1.y
i:
  275675: 7f9ab37
  • Loading branch information
xpuarli authored and Gustavo F. Padovan committed Nov 7, 2011
1 parent a76470c commit 77f9a1d
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 75 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/rpi-4.1.y: 24b9c373ab787ccacfa2c46736153708796f5cd6
refs/heads/rpi-4.1.y: 4dff523a913197e3314c7b0d08734ab037709093
15 changes: 2 additions & 13 deletions trunk/drivers/net/wireless/b43/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ void b43_generate_plcp_hdr(struct b43_plcp_hdr4 *plcp,
}
}

/* TODO: verify if needed for SSLPN or LCN */
static u16 b43_generate_tx_phy_ctl1(struct b43_wldev *dev, u8 bitrate)
{
const struct b43_phy *phy = &dev->phy;
Expand Down Expand Up @@ -257,9 +256,6 @@ int b43_generate_txhdr(struct b43_wldev *dev,
unsigned int plcp_fragment_len;
u32 mac_ctl = 0;
u16 phy_ctl = 0;
bool fill_phy_ctl1 = (phy->type == B43_PHYTYPE_LP ||
phy->type == B43_PHYTYPE_N ||
phy->type == B43_PHYTYPE_HT);
u8 extra_ft = 0;
struct ieee80211_rate *txrate;
struct ieee80211_tx_rate *rates;
Expand Down Expand Up @@ -535,7 +531,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
extra_ft |= B43_TXH_EFT_RTSFB_CCK;

if (rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS &&
fill_phy_ctl1) {
phy->type == B43_PHYTYPE_N) {
txhdr->phy_ctl1_rts = cpu_to_le16(
b43_generate_tx_phy_ctl1(dev, rts_rate));
txhdr->phy_ctl1_rts_fb = cpu_to_le16(
Expand All @@ -556,7 +552,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
break;
}

if (fill_phy_ctl1) {
if (phy->type == B43_PHYTYPE_N) {
txhdr->phy_ctl1 =
cpu_to_le16(b43_generate_tx_phy_ctl1(dev, rate));
txhdr->phy_ctl1_fb =
Expand Down Expand Up @@ -740,14 +736,7 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)

/* Link quality statistics */
switch (chanstat & B43_RX_CHAN_PHYTYPE) {
case B43_PHYTYPE_HT:
/* TODO: is max the right choice? */
status.signal = max_t(__s8,
max(rxhdr->phy_ht_power0, rxhdr->phy_ht_power1),
rxhdr->phy_ht_power2);
break;
case B43_PHYTYPE_N:
/* Broadcom has code for min and avg, but always uses max */
if (rxhdr->power0 == 16 || rxhdr->power0 == 32)
status.signal = max(rxhdr->power1, rxhdr->power2);
else
Expand Down
16 changes: 1 addition & 15 deletions trunk/drivers/net/wireless/b43/xmit.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,6 @@ struct b43_rxhdr_fw4 {
} __packed;
} __packed;
union {
/* HT-PHY */
struct {
PAD_BYTES(1);
__s8 phy_ht_power0;
} __packed;

/* RSSI for N-PHYs */
struct {
__s8 power2;
Expand All @@ -263,15 +257,7 @@ struct b43_rxhdr_fw4 {

__le16 phy_status2; /* PHY RX Status 2 */
} __packed;
union {
/* HT-PHY */
struct {
__s8 phy_ht_power1;
__s8 phy_ht_power2;
} __packed;

__le16 phy_status3; /* PHY RX Status 3 */
} __packed;
__le16 phy_status3; /* PHY RX Status 3 */
union {
/* Tested with 598.314, 644.1001 and 666.2 */
struct {
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/net/wireless/brcm80211/brcmsmac/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,13 @@ static uint nrxdactive(struct dma_info *di, uint h, uint t)

static uint _dma_ctrlflags(struct dma_info *di, uint mask, uint flags)
{
uint dmactrlflags;
uint dmactrlflags = di->dma.dmactrlflags;

if (di == NULL) {
DMA_ERROR(("_dma_ctrlflags: NULL dma handle\n"));
DMA_ERROR(("%s: _dma_ctrlflags: NULL dma handle\n", di->name));
return 0;
}

dmactrlflags = di->dma.dmactrlflags;
dmactrlflags &= ~mask;
dmactrlflags |= flags;

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/wireless/mwifiex/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,7 @@ mwifiex_update_curr_bss_params(struct mwifiex_private *priv, u8 *bssid,
s32 rssi, const u8 *ie_buf, size_t ie_len,
u16 beacon_period, u16 cap_info_bitmap, u8 band)
{
struct mwifiex_bssdescriptor *bss_desc;
struct mwifiex_bssdescriptor *bss_desc = NULL;
int ret;
unsigned long flags;
u8 *beacon_ie;
Expand All @@ -1484,7 +1484,6 @@ mwifiex_update_curr_bss_params(struct mwifiex_private *priv, u8 *bssid,

beacon_ie = kmemdup(ie_buf, ie_len, GFP_KERNEL);
if (!beacon_ie) {
kfree(bss_desc);
dev_err(priv->adapter->dev, " failed to alloc beacon_ie\n");
return -ENOMEM;
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -3567,9 +3567,8 @@ rate_lowest_index(struct ieee80211_supported_band *sband,
return i;

/* warn when we cannot find a rate. */
WARN_ON_ONCE(1);
WARN_ON(1);

/* and return 0 (the lowest index) */
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/hci_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
goto encrypt;

auth:
if (test_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend))
if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend))
return 0;

if (!hci_conn_auth(conn, sec_level, auth_type))
Expand Down
19 changes: 0 additions & 19 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,6 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
int i, j, err;
bool have_higher_than_11mbit = false;
u16 ap_ht_cap_flags;
int min_rate = INT_MAX, min_rate_index = -1;

/* AssocResp and ReassocResp have identical structure */

Expand Down Expand Up @@ -1552,10 +1551,6 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
rates |= BIT(j);
if (is_basic)
basic_rates |= BIT(j);
if (rate < min_rate) {
min_rate = rate;
min_rate_index = j;
}
break;
}
}
Expand All @@ -1573,25 +1568,11 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
rates |= BIT(j);
if (is_basic)
basic_rates |= BIT(j);
if (rate < min_rate) {
min_rate = rate;
min_rate_index = j;
}
break;
}
}
}

/*
* some buggy APs don't advertise basic_rates. use the lowest
* supported rate instead.
*/
if (unlikely(!basic_rates) && min_rate_index >= 0) {
printk(KERN_DEBUG "%s: No basic rates in AssocResp. "
"Using min supported rate instead.\n", sdata->name);
basic_rates = BIT(min_rate_index);
}

sta->sta.supp_rates[wk->chan->band] = rates;
sdata->vif.bss_conf.basic_rates = basic_rates;

Expand Down
8 changes: 4 additions & 4 deletions trunk/net/mac80211/sta_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -1354,12 +1354,12 @@ ieee80211_sta_ps_deliver_response(struct sta_info *sta,
* Use MoreData flag to indicate whether there are
* more buffered frames for this STA
*/
if (more_data || !skb_queue_empty(&frames))
hdr->frame_control |=
cpu_to_le16(IEEE80211_FCTL_MOREDATA);
else
if (!more_data)
hdr->frame_control &=
cpu_to_le16(~IEEE80211_FCTL_MOREDATA);
else
hdr->frame_control |=
cpu_to_le16(IEEE80211_FCTL_MOREDATA);

if (ieee80211_is_data_qos(hdr->frame_control) ||
ieee80211_is_qos_nullfunc(hdr->frame_control))
Expand Down
9 changes: 2 additions & 7 deletions trunk/net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
[NL80211_ATTR_MESH_CONFIG] = { .type = NLA_NESTED },
[NL80211_ATTR_SUPPORT_MESH_AUTH] = { .type = NLA_FLAG },

[NL80211_ATTR_HT_CAPABILITY] = { .len = NL80211_HT_CAPABILITY_LEN },
[NL80211_ATTR_HT_CAPABILITY] = { .type = NLA_BINARY,
.len = NL80211_HT_CAPABILITY_LEN },

[NL80211_ATTR_MGMT_SUBTYPE] = { .type = NLA_U8 },
[NL80211_ATTR_IE] = { .type = NLA_BINARY,
Expand Down Expand Up @@ -1252,12 +1253,6 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
goto bad_res;
}

if (netdev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
netdev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO) {
result = -EINVAL;
goto bad_res;
}

nla_for_each_nested(nl_txq_params,
info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS],
rem_txq_params) {
Expand Down
13 changes: 5 additions & 8 deletions trunk/net/wireless/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,20 +259,17 @@ static int cmp_ies(u8 num, u8 *ies1, size_t len1, u8 *ies2, size_t len2)
{
const u8 *ie1 = cfg80211_find_ie(num, ies1, len1);
const u8 *ie2 = cfg80211_find_ie(num, ies2, len2);
int r;

/* equal if both missing */
if (!ie1 && !ie2)
return 0;
/* sort missing IE before (left of) present IE */
if (!ie1)
if (!ie1 || !ie2)
return -1;
if (!ie2)
return 1;

/* sort by length first, then by contents */
if (ie1[1] != ie2[1])
r = memcmp(ie1 + 2, ie2 + 2, min(ie1[1], ie2[1]));
if (r == 0 && ie1[1] != ie2[1])
return ie2[1] - ie1[1];
return memcmp(ie1 + 2, ie2 + 2, ie1[1]);
return r;
}

static bool is_bss(struct cfg80211_bss *a,
Expand Down

0 comments on commit 77f9a1d

Please sign in to comment.