Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
This commit is contained in:
commit
f552ce5fc2
@ -4280,7 +4280,7 @@ F: drivers/video/aty/aty128fb.c
|
|||||||
RALINK RT2X00 WIRELESS LAN DRIVER
|
RALINK RT2X00 WIRELESS LAN DRIVER
|
||||||
P: rt2x00 project
|
P: rt2x00 project
|
||||||
L: linux-wireless@vger.kernel.org
|
L: linux-wireless@vger.kernel.org
|
||||||
L: users@rt2x00.serialmonkey.com
|
L: users@rt2x00.serialmonkey.com (moderated for non-subscribers)
|
||||||
W: http://rt2x00.serialmonkey.com/
|
W: http://rt2x00.serialmonkey.com/
|
||||||
S: Maintained
|
S: Maintained
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git
|
||||||
|
@ -4790,9 +4790,8 @@ static int proc_stats_rid_open( struct inode *inode,
|
|||||||
static int get_dec_u16( char *buffer, int *start, int limit ) {
|
static int get_dec_u16( char *buffer, int *start, int limit ) {
|
||||||
u16 value;
|
u16 value;
|
||||||
int valid = 0;
|
int valid = 0;
|
||||||
for( value = 0; buffer[*start] >= '0' &&
|
for (value = 0; *start < limit && buffer[*start] >= '0' &&
|
||||||
buffer[*start] <= '9' &&
|
buffer[*start] <= '9'; (*start)++) {
|
||||||
*start < limit; (*start)++ ) {
|
|
||||||
valid = 1;
|
valid = 1;
|
||||||
value *= 10;
|
value *= 10;
|
||||||
value += buffer[*start] - '0';
|
value += buffer[*start] - '0';
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef B43_LEDS_H_
|
#ifndef B43_LEDS_H_
|
||||||
#define B43_LEDS_H_
|
#define B43_LEDS_H_
|
||||||
|
|
||||||
|
struct b43_wl;
|
||||||
struct b43_wldev;
|
struct b43_wldev;
|
||||||
|
|
||||||
#ifdef CONFIG_B43_LEDS
|
#ifdef CONFIG_B43_LEDS
|
||||||
|
@ -4501,7 +4501,6 @@ static void b43_op_stop(struct ieee80211_hw *hw)
|
|||||||
|
|
||||||
cancel_work_sync(&(wl->beacon_update_trigger));
|
cancel_work_sync(&(wl->beacon_update_trigger));
|
||||||
|
|
||||||
wiphy_rfkill_stop_polling(hw->wiphy);
|
|
||||||
mutex_lock(&wl->mutex);
|
mutex_lock(&wl->mutex);
|
||||||
if (b43_status(dev) >= B43_STAT_STARTED) {
|
if (b43_status(dev) >= B43_STAT_STARTED) {
|
||||||
dev = b43_wireless_core_stop(dev);
|
dev = b43_wireless_core_stop(dev);
|
||||||
|
@ -33,7 +33,8 @@ bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
|
|||||||
& B43_MMIO_RADIO_HWENABLED_HI_MASK))
|
& B43_MMIO_RADIO_HWENABLED_HI_MASK))
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
if (b43_read16(dev, B43_MMIO_RADIO_HWENABLED_LO)
|
if (b43_status(dev) >= B43_STAT_STARTED &&
|
||||||
|
b43_read16(dev, B43_MMIO_RADIO_HWENABLED_LO)
|
||||||
& B43_MMIO_RADIO_HWENABLED_LO_MASK)
|
& B43_MMIO_RADIO_HWENABLED_LO_MASK)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ static void spu_transaction_finish(struct if_spi_card *card)
|
|||||||
static int spu_write(struct if_spi_card *card, u16 reg, const u8 *buf, int len)
|
static int spu_write(struct if_spi_card *card, u16 reg, const u8 *buf, int len)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
u16 reg_out = cpu_to_le16(reg | IF_SPI_WRITE_OPERATION_MASK);
|
__le16 reg_out = cpu_to_le16(reg | IF_SPI_WRITE_OPERATION_MASK);
|
||||||
struct spi_message m;
|
struct spi_message m;
|
||||||
struct spi_transfer reg_trans;
|
struct spi_transfer reg_trans;
|
||||||
struct spi_transfer data_trans;
|
struct spi_transfer data_trans;
|
||||||
@ -166,7 +166,7 @@ static int spu_write(struct if_spi_card *card, u16 reg, const u8 *buf, int len)
|
|||||||
|
|
||||||
static inline int spu_write_u16(struct if_spi_card *card, u16 reg, u16 val)
|
static inline int spu_write_u16(struct if_spi_card *card, u16 reg, u16 val)
|
||||||
{
|
{
|
||||||
u16 buff;
|
__le16 buff;
|
||||||
|
|
||||||
buff = cpu_to_le16(val);
|
buff = cpu_to_le16(val);
|
||||||
return spu_write(card, reg, (u8 *)&buff, sizeof(u16));
|
return spu_write(card, reg, (u8 *)&buff, sizeof(u16));
|
||||||
@ -188,7 +188,7 @@ static int spu_read(struct if_spi_card *card, u16 reg, u8 *buf, int len)
|
|||||||
{
|
{
|
||||||
unsigned int delay;
|
unsigned int delay;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
u16 reg_out = cpu_to_le16(reg | IF_SPI_READ_OPERATION_MASK);
|
__le16 reg_out = cpu_to_le16(reg | IF_SPI_READ_OPERATION_MASK);
|
||||||
struct spi_message m;
|
struct spi_message m;
|
||||||
struct spi_transfer reg_trans;
|
struct spi_transfer reg_trans;
|
||||||
struct spi_transfer dummy_trans;
|
struct spi_transfer dummy_trans;
|
||||||
@ -235,7 +235,7 @@ static int spu_read(struct if_spi_card *card, u16 reg, u8 *buf, int len)
|
|||||||
/* Read 16 bits from an SPI register */
|
/* Read 16 bits from an SPI register */
|
||||||
static inline int spu_read_u16(struct if_spi_card *card, u16 reg, u16 *val)
|
static inline int spu_read_u16(struct if_spi_card *card, u16 reg, u16 *val)
|
||||||
{
|
{
|
||||||
u16 buf;
|
__le16 buf;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = spu_read(card, reg, (u8 *)&buf, sizeof(buf));
|
ret = spu_read(card, reg, (u8 *)&buf, sizeof(buf));
|
||||||
@ -248,7 +248,7 @@ static inline int spu_read_u16(struct if_spi_card *card, u16 reg, u16 *val)
|
|||||||
* The low 16 bits are read first. */
|
* The low 16 bits are read first. */
|
||||||
static int spu_read_u32(struct if_spi_card *card, u16 reg, u32 *val)
|
static int spu_read_u32(struct if_spi_card *card, u16 reg, u32 *val)
|
||||||
{
|
{
|
||||||
u32 buf;
|
__le32 buf;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = spu_read(card, reg, (u8 *)&buf, sizeof(buf));
|
err = spu_read(card, reg, (u8 *)&buf, sizeof(buf));
|
||||||
|
@ -1994,7 +1994,7 @@ static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
|
|||||||
rt2x00_set_field32(&word, TXWI_W1_BW_WIN_SIZE, txdesc->ba_size);
|
rt2x00_set_field32(&word, TXWI_W1_BW_WIN_SIZE, txdesc->ba_size);
|
||||||
rt2x00_set_field32(&word, TXWI_W1_WIRELESS_CLI_ID,
|
rt2x00_set_field32(&word, TXWI_W1_WIRELESS_CLI_ID,
|
||||||
test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ?
|
test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ?
|
||||||
(skbdesc->entry->entry_idx + 1) : 0xff);
|
txdesc->key_idx : 0xff);
|
||||||
rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT,
|
rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT,
|
||||||
skb->len - txdesc->l2pad);
|
skb->len - txdesc->l2pad);
|
||||||
rt2x00_set_field32(&word, TXWI_W1_PACKETID,
|
rt2x00_set_field32(&word, TXWI_W1_PACKETID,
|
||||||
|
@ -538,13 +538,12 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
|
|||||||
WLAN_CAPABILITY_PRIVACY,
|
WLAN_CAPABILITY_PRIVACY,
|
||||||
capability);
|
capability);
|
||||||
|
|
||||||
|
if (bss) {
|
||||||
#ifdef CONFIG_MAC80211_IBSS_DEBUG
|
#ifdef CONFIG_MAC80211_IBSS_DEBUG
|
||||||
if (bss)
|
|
||||||
printk(KERN_DEBUG " sta_find_ibss: selected %pM current "
|
printk(KERN_DEBUG " sta_find_ibss: selected %pM current "
|
||||||
"%pM\n", bss->cbss.bssid, ifibss->bssid);
|
"%pM\n", bss->cbss.bssid, ifibss->bssid);
|
||||||
#endif /* CONFIG_MAC80211_IBSS_DEBUG */
|
#endif /* CONFIG_MAC80211_IBSS_DEBUG */
|
||||||
|
|
||||||
if (bss && !memcmp(ifibss->bssid, bss->cbss.bssid, ETH_ALEN)) {
|
|
||||||
printk(KERN_DEBUG "%s: Selected IBSS BSSID %pM"
|
printk(KERN_DEBUG "%s: Selected IBSS BSSID %pM"
|
||||||
" based on configured SSID\n",
|
" based on configured SSID\n",
|
||||||
sdata->dev->name, bss->cbss.bssid);
|
sdata->dev->name, bss->cbss.bssid);
|
||||||
@ -552,8 +551,7 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
|
|||||||
ieee80211_sta_join_ibss(sdata, bss);
|
ieee80211_sta_join_ibss(sdata, bss);
|
||||||
ieee80211_rx_bss_put(local, bss);
|
ieee80211_rx_bss_put(local, bss);
|
||||||
return;
|
return;
|
||||||
} else if (bss)
|
}
|
||||||
ieee80211_rx_bss_put(local, bss);
|
|
||||||
|
|
||||||
#ifdef CONFIG_MAC80211_IBSS_DEBUG
|
#ifdef CONFIG_MAC80211_IBSS_DEBUG
|
||||||
printk(KERN_DEBUG " did not try to join ibss\n");
|
printk(KERN_DEBUG " did not try to join ibss\n");
|
||||||
|
@ -259,7 +259,7 @@ static u32 airtime_link_metric_get(struct ieee80211_local *local,
|
|||||||
* @hwmp_ie: hwmp information element (PREP or PREQ)
|
* @hwmp_ie: hwmp information element (PREP or PREQ)
|
||||||
*
|
*
|
||||||
* This function updates the path routing information to the originator and the
|
* This function updates the path routing information to the originator and the
|
||||||
* transmitter of a HWMP PREQ or PREP fram.
|
* transmitter of a HWMP PREQ or PREP frame.
|
||||||
*
|
*
|
||||||
* Returns: metric to frame originator or 0 if the frame should not be further
|
* Returns: metric to frame originator or 0 if the frame should not be further
|
||||||
* processed
|
* processed
|
||||||
|
@ -1457,8 +1457,7 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
|
|||||||
if (status_code != WLAN_STATUS_SUCCESS) {
|
if (status_code != WLAN_STATUS_SUCCESS) {
|
||||||
printk(KERN_DEBUG "%s: AP denied association (code=%d)\n",
|
printk(KERN_DEBUG "%s: AP denied association (code=%d)\n",
|
||||||
sdata->dev->name, status_code);
|
sdata->dev->name, status_code);
|
||||||
list_del(&wk->list);
|
wk->state = IEEE80211_MGD_STATE_IDLE;
|
||||||
kfree(wk);
|
|
||||||
return RX_MGMT_CFG80211_ASSOC;
|
return RX_MGMT_CFG80211_ASSOC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1445,7 +1445,7 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
|
|||||||
if (tmp_sdata->vif.type != NL80211_IFTYPE_AP)
|
if (tmp_sdata->vif.type != NL80211_IFTYPE_AP)
|
||||||
continue;
|
continue;
|
||||||
if (compare_ether_addr(tmp_sdata->dev->dev_addr,
|
if (compare_ether_addr(tmp_sdata->dev->dev_addr,
|
||||||
hdr->addr2)) {
|
hdr->addr2) == 0) {
|
||||||
dev_hold(tmp_sdata->dev);
|
dev_hold(tmp_sdata->dev);
|
||||||
dev_put(sdata->dev);
|
dev_put(sdata->dev);
|
||||||
sdata = tmp_sdata;
|
sdata = tmp_sdata;
|
||||||
|
@ -358,6 +358,7 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev,
|
|||||||
struct wireless_dev *wdev);
|
struct wireless_dev *wdev);
|
||||||
|
|
||||||
void cfg80211_conn_work(struct work_struct *work);
|
void cfg80211_conn_work(struct work_struct *work);
|
||||||
|
void cfg80211_sme_failed_assoc(struct wireless_dev *wdev);
|
||||||
bool cfg80211_sme_failed_reassoc(struct wireless_dev *wdev);
|
bool cfg80211_sme_failed_reassoc(struct wireless_dev *wdev);
|
||||||
|
|
||||||
/* internal helpers */
|
/* internal helpers */
|
||||||
|
@ -62,6 +62,7 @@ void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len)
|
|||||||
u8 *ie = mgmt->u.assoc_resp.variable;
|
u8 *ie = mgmt->u.assoc_resp.variable;
|
||||||
int i, ieoffs = offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
|
int i, ieoffs = offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
|
||||||
struct cfg80211_internal_bss *bss = NULL;
|
struct cfg80211_internal_bss *bss = NULL;
|
||||||
|
bool need_connect_result = true;
|
||||||
|
|
||||||
wdev_lock(wdev);
|
wdev_lock(wdev);
|
||||||
|
|
||||||
@ -94,6 +95,14 @@ void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
WARN_ON(!bss);
|
WARN_ON(!bss);
|
||||||
|
} else if (wdev->conn) {
|
||||||
|
cfg80211_sme_failed_assoc(wdev);
|
||||||
|
need_connect_result = false;
|
||||||
|
/*
|
||||||
|
* do not call connect_result() now because the
|
||||||
|
* sme will schedule work that does it later.
|
||||||
|
*/
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wdev->conn && wdev->sme_state == CFG80211_SME_IDLE) {
|
if (!wdev->conn && wdev->sme_state == CFG80211_SME_IDLE) {
|
||||||
|
@ -26,6 +26,7 @@ struct cfg80211_conn {
|
|||||||
CFG80211_CONN_AUTHENTICATING,
|
CFG80211_CONN_AUTHENTICATING,
|
||||||
CFG80211_CONN_ASSOCIATE_NEXT,
|
CFG80211_CONN_ASSOCIATE_NEXT,
|
||||||
CFG80211_CONN_ASSOCIATING,
|
CFG80211_CONN_ASSOCIATING,
|
||||||
|
CFG80211_CONN_DEAUTH_ASSOC_FAIL,
|
||||||
} state;
|
} state;
|
||||||
u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN];
|
u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN];
|
||||||
u8 *ie;
|
u8 *ie;
|
||||||
@ -148,6 +149,12 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev)
|
|||||||
NULL, 0,
|
NULL, 0,
|
||||||
WLAN_REASON_DEAUTH_LEAVING);
|
WLAN_REASON_DEAUTH_LEAVING);
|
||||||
return err;
|
return err;
|
||||||
|
case CFG80211_CONN_DEAUTH_ASSOC_FAIL:
|
||||||
|
__cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid,
|
||||||
|
NULL, 0,
|
||||||
|
WLAN_REASON_DEAUTH_LEAVING);
|
||||||
|
/* return an error so that we call __cfg80211_connect_result() */
|
||||||
|
return -EINVAL;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -158,6 +165,7 @@ void cfg80211_conn_work(struct work_struct *work)
|
|||||||
struct cfg80211_registered_device *rdev =
|
struct cfg80211_registered_device *rdev =
|
||||||
container_of(work, struct cfg80211_registered_device, conn_work);
|
container_of(work, struct cfg80211_registered_device, conn_work);
|
||||||
struct wireless_dev *wdev;
|
struct wireless_dev *wdev;
|
||||||
|
u8 bssid[ETH_ALEN];
|
||||||
|
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
cfg80211_lock_rdev(rdev);
|
cfg80211_lock_rdev(rdev);
|
||||||
@ -173,10 +181,10 @@ void cfg80211_conn_work(struct work_struct *work)
|
|||||||
wdev_unlock(wdev);
|
wdev_unlock(wdev);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
memcpy(bssid, wdev->conn->params.bssid, ETH_ALEN);
|
||||||
if (cfg80211_conn_do_work(wdev))
|
if (cfg80211_conn_do_work(wdev))
|
||||||
__cfg80211_connect_result(
|
__cfg80211_connect_result(
|
||||||
wdev->netdev,
|
wdev->netdev, bssid,
|
||||||
wdev->conn->params.bssid,
|
|
||||||
NULL, 0, NULL, 0,
|
NULL, 0, NULL, 0,
|
||||||
WLAN_STATUS_UNSPECIFIED_FAILURE,
|
WLAN_STATUS_UNSPECIFIED_FAILURE,
|
||||||
false, NULL);
|
false, NULL);
|
||||||
@ -337,6 +345,15 @@ bool cfg80211_sme_failed_reassoc(struct wireless_dev *wdev)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cfg80211_sme_failed_assoc(struct wireless_dev *wdev)
|
||||||
|
{
|
||||||
|
struct wiphy *wiphy = wdev->wiphy;
|
||||||
|
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
|
||||||
|
|
||||||
|
wdev->conn->state = CFG80211_CONN_DEAUTH_ASSOC_FAIL;
|
||||||
|
schedule_work(&rdev->conn_work);
|
||||||
|
}
|
||||||
|
|
||||||
void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
|
void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
|
||||||
const u8 *req_ie, size_t req_ie_len,
|
const u8 *req_ie, size_t req_ie_len,
|
||||||
const u8 *resp_ie, size_t resp_ie_len,
|
const u8 *resp_ie, size_t resp_ie_len,
|
||||||
|
Loading…
Reference in New Issue
Block a user