Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

This commit is contained in:
Jeff Garzik 2006-01-31 11:50:11 -05:00
commit 0febb720fe
4 changed files with 34 additions and 28 deletions

View File

@ -75,7 +75,7 @@ config HOSTAP_PCI
config HOSTAP_CS
tristate "Host AP driver for Prism2/2.5/3 PC Cards"
depends on PCMCIA!=n && HOSTAP
depends on PCMCIA && HOSTAP
---help---
Host AP driver's version for Prism2/2.5/3 PC Cards.

View File

@ -2201,6 +2201,17 @@ static int ipw2100_alloc_skb(struct ipw2100_priv *priv,
#define SEARCH_SNAPSHOT 1
#define SNAPSHOT_ADDR(ofs) (priv->snapshot[((ofs) >> 12) & 0xff] + ((ofs) & 0xfff))
static void ipw2100_snapshot_free(struct ipw2100_priv *priv)
{
int i;
if (!priv->snapshot[0])
return;
for (i = 0; i < 0x30; i++)
kfree(priv->snapshot[i]);
priv->snapshot[0] = NULL;
}
#ifdef CONFIG_IPW2100_DEBUG_C3
static int ipw2100_snapshot_alloc(struct ipw2100_priv *priv)
{
int i;
@ -2221,16 +2232,6 @@ static int ipw2100_snapshot_alloc(struct ipw2100_priv *priv)
return 1;
}
static void ipw2100_snapshot_free(struct ipw2100_priv *priv)
{
int i;
if (!priv->snapshot[0])
return;
for (i = 0; i < 0x30; i++)
kfree(priv->snapshot[i]);
priv->snapshot[0] = NULL;
}
static u32 ipw2100_match_buf(struct ipw2100_priv *priv, u8 * in_buf,
size_t len, int mode)
{
@ -2269,6 +2270,7 @@ static u32 ipw2100_match_buf(struct ipw2100_priv *priv, u8 * in_buf,
return ret;
}
#endif
/*
*
@ -7112,11 +7114,17 @@ static int ipw2100_wx_set_txpow(struct net_device *dev,
{
struct ipw2100_priv *priv = ieee80211_priv(dev);
int err = 0, value;
if (ipw_radio_kill_sw(priv, wrqu->txpower.disabled))
return -EINPROGRESS;
if (priv->ieee->iw_mode != IW_MODE_ADHOC)
return 0;
if ((wrqu->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM)
return -EINVAL;
if (wrqu->txpower.disabled == 1 || wrqu->txpower.fixed == 0)
if (wrqu->txpower.fixed == 0)
value = IPW_TX_POWER_DEFAULT;
else {
if (wrqu->txpower.value < IPW_TX_POWER_MIN_DBM ||
@ -7151,24 +7159,19 @@ static int ipw2100_wx_get_txpow(struct net_device *dev,
struct ipw2100_priv *priv = ieee80211_priv(dev);
if (priv->ieee->iw_mode != IW_MODE_ADHOC) {
wrqu->power.disabled = 1;
return 0;
}
wrqu->txpower.disabled = (priv->status & STATUS_RF_KILL_MASK) ? 1 : 0;
if (priv->tx_power == IPW_TX_POWER_DEFAULT) {
wrqu->power.fixed = 0;
wrqu->power.value = IPW_TX_POWER_MAX_DBM;
wrqu->power.disabled = 1;
wrqu->txpower.fixed = 0;
wrqu->txpower.value = IPW_TX_POWER_MAX_DBM;
} else {
wrqu->power.disabled = 0;
wrqu->power.fixed = 1;
wrqu->power.value = priv->tx_power;
wrqu->txpower.fixed = 1;
wrqu->txpower.value = priv->tx_power;
}
wrqu->power.flags = IW_TXPOW_DBM;
wrqu->txpower.flags = IW_TXPOW_DBM;
IPW_DEBUG_WX("GET TX Power -> %d \n", wrqu->power.value);
IPW_DEBUG_WX("GET TX Power -> %d \n", wrqu->txpower.value);
return 0;
}

View File

@ -8012,6 +8012,10 @@ static int ipw_sw_reset(struct ipw_priv *priv, int init)
else
IPW_DEBUG_INFO("Auto adhoc creation disabled.\n");
priv->config &= ~CFG_STATIC_ESSID;
priv->essid_len = 0;
memset(priv->essid, 0, IW_ESSID_MAX_SIZE);
if (disable) {
priv->status |= STATUS_RF_KILL_SW;
IPW_DEBUG_INFO("Radio disabled.\n");
@ -11035,7 +11039,6 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
net_dev->set_multicast_list = ipw_net_set_multicast_list;
net_dev->set_mac_address = ipw_net_set_mac_address;
priv->wireless_data.spy_data = &priv->ieee->spy_data;
priv->wireless_data.ieee80211 = priv->ieee;
net_dev->wireless_data = &priv->wireless_data;
net_dev->wireless_handlers = &ipw_wx_handler_def;
net_dev->ethtool_ops = &ipw_ethtool_ops;
@ -11121,8 +11124,8 @@ static void ipw_pci_remove(struct pci_dev *pdev)
/* Free MAC hash list for ADHOC */
for (i = 0; i < IPW_IBSS_MAC_HASH_SIZE; i++) {
list_for_each_safe(p, q, &priv->ibss_mac_hash[i]) {
kfree(list_entry(p, struct ipw_ibss_seq, list));
list_del(p);
kfree(list_entry(p, struct ipw_ibss_seq, list));
}
}

View File

@ -1451,7 +1451,7 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee,
break;
case IEEE80211_STYPE_PROBE_REQ:
IEEE80211_DEBUG_MGMT("recieved auth (%d)\n",
IEEE80211_DEBUG_MGMT("received auth (%d)\n",
WLAN_FC_GET_STYPE(le16_to_cpu
(header->frame_ctl)));
@ -1485,7 +1485,7 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee,
break;
case IEEE80211_STYPE_AUTH:
IEEE80211_DEBUG_MGMT("recieved auth (%d)\n",
IEEE80211_DEBUG_MGMT("received auth (%d)\n",
WLAN_FC_GET_STYPE(le16_to_cpu
(header->frame_ctl)));