Skip to content

Commit 5be8084

Browse files
author
Jeff Garzik
committed
Merge branch 'upstream-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream
2 parents 8910b49 + 4cf92a3 commit 5be8084

File tree

22 files changed

+280
-269
lines changed

22 files changed

+280
-269
lines changed

drivers/net/wireless/airo.c

Lines changed: 105 additions & 103 deletions
Large diffs are not rendered by default.

drivers/net/wireless/ipw2100.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,8 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
17681768

17691769
if (priv->stop_rf_kill) {
17701770
priv->stop_rf_kill = 0;
1771-
queue_delayed_work(priv->workqueue, &priv->rf_kill, HZ);
1771+
queue_delayed_work(priv->workqueue, &priv->rf_kill,
1772+
round_jiffies(HZ));
17721773
}
17731774

17741775
deferred = 1;
@@ -2098,7 +2099,7 @@ static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status)
20982099
/* Make sure the RF Kill check timer is running */
20992100
priv->stop_rf_kill = 0;
21002101
cancel_delayed_work(&priv->rf_kill);
2101-
queue_delayed_work(priv->workqueue, &priv->rf_kill, HZ);
2102+
queue_delayed_work(priv->workqueue, &priv->rf_kill, round_jiffies(HZ));
21022103
}
21032104

21042105
static void isr_scan_complete(struct ipw2100_priv *priv, u32 status)
@@ -4233,7 +4234,8 @@ static int ipw_radio_kill_sw(struct ipw2100_priv *priv, int disable_radio)
42334234
/* Make sure the RF_KILL check timer is running */
42344235
priv->stop_rf_kill = 0;
42354236
cancel_delayed_work(&priv->rf_kill);
4236-
queue_delayed_work(priv->workqueue, &priv->rf_kill, HZ);
4237+
queue_delayed_work(priv->workqueue, &priv->rf_kill,
4238+
round_jiffies(HZ));
42374239
} else
42384240
schedule_reset(priv);
42394241
}
@@ -5969,7 +5971,8 @@ static void ipw2100_rf_kill(struct work_struct *work)
59695971
if (rf_kill_active(priv)) {
59705972
IPW_DEBUG_RF_KILL("RF Kill active, rescheduling GPIO check\n");
59715973
if (!priv->stop_rf_kill)
5972-
queue_delayed_work(priv->workqueue, &priv->rf_kill, HZ);
5974+
queue_delayed_work(priv->workqueue, &priv->rf_kill,
5975+
round_jiffies(HZ));
59735976
goto exit_unlock;
59745977
}
59755978

drivers/net/wireless/ipw2200.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,7 +1751,7 @@ static int ipw_radio_kill_sw(struct ipw_priv *priv, int disable_radio)
17511751
/* Make sure the RF_KILL check timer is running */
17521752
cancel_delayed_work(&priv->rf_kill);
17531753
queue_delayed_work(priv->workqueue, &priv->rf_kill,
1754-
2 * HZ);
1754+
round_jiffies(2 * HZ));
17551755
} else
17561756
queue_work(priv->workqueue, &priv->up);
17571757
}
@@ -4690,7 +4690,8 @@ static void ipw_rx_notification(struct ipw_priv *priv,
46904690
else if (priv->config & CFG_BACKGROUND_SCAN
46914691
&& priv->status & STATUS_ASSOCIATED)
46924692
queue_delayed_work(priv->workqueue,
4693-
&priv->request_scan, HZ);
4693+
&priv->request_scan,
4694+
round_jiffies(HZ));
46944695

46954696
/* Send an empty event to user space.
46964697
* We don't send the received data on the event because

drivers/net/wireless/libertas/cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ static int wlan_cmd_802_11_enable_rsn(wlan_private * priv,
240240
if (*enable)
241241
penableRSN->enable = cpu_to_le16(cmd_enable_rsn);
242242
else
243-
penableRSN->enable = cpu_to_le16(cmd_enable_rsn);
243+
penableRSN->enable = cpu_to_le16(cmd_disable_rsn);
244244
}
245245

246246
lbs_deb_leave(LBS_DEB_CMD);

drivers/net/wireless/libertas/rx.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,6 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb)
439439
ret = 0;
440440

441441
done:
442-
skb->protocol = __constant_htons(0x0019); /* ETH_P_80211_RAW */
443442
lbs_deb_leave_args(LBS_DEB_RX, "ret %d", ret);
444443
return ret;
445444
}

drivers/net/wireless/libertas/version.h

Lines changed: 0 additions & 1 deletion
This file was deleted.

drivers/net/wireless/libertas/wext.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,9 +1719,6 @@ static int wlan_set_encodeext(struct net_device *dev,
17191719
pkey->type = KEY_TYPE_ID_TKIP;
17201720
} else if (alg == IW_ENCODE_ALG_CCMP) {
17211721
pkey->type = KEY_TYPE_ID_AES;
1722-
} else {
1723-
ret = -EINVAL;
1724-
goto out;
17251722
}
17261723

17271724
/* If WPA isn't enabled yet, do that now */

drivers/net/wireless/prism54/isl_ioctl.c

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,19 +1853,16 @@ prism54_del_mac(struct net_device *ndev, struct iw_request_info *info,
18531853
islpci_private *priv = netdev_priv(ndev);
18541854
struct islpci_acl *acl = &priv->acl;
18551855
struct mac_entry *entry;
1856-
struct list_head *ptr;
18571856
struct sockaddr *addr = (struct sockaddr *) extra;
18581857

18591858
if (addr->sa_family != ARPHRD_ETHER)
18601859
return -EOPNOTSUPP;
18611860

18621861
if (down_interruptible(&acl->sem))
18631862
return -ERESTARTSYS;
1864-
for (ptr = acl->mac_list.next; ptr != &acl->mac_list; ptr = ptr->next) {
1865-
entry = list_entry(ptr, struct mac_entry, _list);
1866-
1863+
list_for_each_entry(entry, &acl->mac_list, _list) {
18671864
if (memcmp(entry->addr, addr->sa_data, ETH_ALEN) == 0) {
1868-
list_del(ptr);
1865+
list_del(&entry->_list);
18691866
acl->size--;
18701867
kfree(entry);
18711868
up(&acl->sem);
@@ -1883,17 +1880,14 @@ prism54_get_mac(struct net_device *ndev, struct iw_request_info *info,
18831880
islpci_private *priv = netdev_priv(ndev);
18841881
struct islpci_acl *acl = &priv->acl;
18851882
struct mac_entry *entry;
1886-
struct list_head *ptr;
18871883
struct sockaddr *dst = (struct sockaddr *) extra;
18881884

18891885
dwrq->length = 0;
18901886

18911887
if (down_interruptible(&acl->sem))
18921888
return -ERESTARTSYS;
18931889

1894-
for (ptr = acl->mac_list.next; ptr != &acl->mac_list; ptr = ptr->next) {
1895-
entry = list_entry(ptr, struct mac_entry, _list);
1896-
1890+
list_for_each_entry(entry, &acl->mac_list, _list) {
18971891
memcpy(dst->sa_data, entry->addr, ETH_ALEN);
18981892
dst->sa_family = ARPHRD_ETHER;
18991893
dwrq->length++;
@@ -1960,7 +1954,6 @@ prism54_get_policy(struct net_device *ndev, struct iw_request_info *info,
19601954
static int
19611955
prism54_mac_accept(struct islpci_acl *acl, char *mac)
19621956
{
1963-
struct list_head *ptr;
19641957
struct mac_entry *entry;
19651958
int res = 0;
19661959

@@ -1972,8 +1965,7 @@ prism54_mac_accept(struct islpci_acl *acl, char *mac)
19721965
return 1;
19731966
}
19741967

1975-
for (ptr = acl->mac_list.next; ptr != &acl->mac_list; ptr = ptr->next) {
1976-
entry = list_entry(ptr, struct mac_entry, _list);
1968+
list_for_each_entry(entry, &acl->mac_list, _list) {
19771969
if (memcmp(entry->addr, mac, ETH_ALEN) == 0) {
19781970
res = 1;
19791971
break;
@@ -2216,11 +2208,9 @@ prism54_wpa_bss_ie_init(islpci_private *priv)
22162208
void
22172209
prism54_wpa_bss_ie_clean(islpci_private *priv)
22182210
{
2219-
struct list_head *ptr, *n;
2211+
struct islpci_bss_wpa_ie *bss, *n;
22202212

2221-
list_for_each_safe(ptr, n, &priv->bss_wpa_list) {
2222-
struct islpci_bss_wpa_ie *bss;
2223-
bss = list_entry(ptr, struct islpci_bss_wpa_ie, list);
2213+
list_for_each_entry_safe(bss, n, &priv->bss_wpa_list, list) {
22242214
kfree(bss);
22252215
}
22262216
}

drivers/net/wireless/rtl8187_rtl8225.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static void rtl8225_write_bitbang(struct ieee80211_hw *dev, u8 addr, u16 data)
6767
msleep(2);
6868
}
6969

70-
static void rtl8225_write_8051(struct ieee80211_hw *dev, u8 addr, u16 data)
70+
static void rtl8225_write_8051(struct ieee80211_hw *dev, u8 addr, __le16 data)
7171
{
7272
struct rtl8187_priv *priv = dev->priv;
7373
u16 reg80, reg82, reg84;
@@ -106,7 +106,7 @@ void rtl8225_write(struct ieee80211_hw *dev, u8 addr, u16 data)
106106
struct rtl8187_priv *priv = dev->priv;
107107

108108
if (priv->asic_rev)
109-
rtl8225_write_8051(dev, addr, data);
109+
rtl8225_write_8051(dev, addr, cpu_to_le16(data));
110110
else
111111
rtl8225_write_bitbang(dev, addr, data);
112112
}

drivers/net/wireless/zd1211rw/zd_chip.c

Lines changed: 15 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ void zd_chip_clear(struct zd_chip *chip)
4949
ZD_MEMCLEAR(chip, sizeof(*chip));
5050
}
5151

52-
static int scnprint_mac_oui(const u8 *addr, char *buffer, size_t size)
52+
static int scnprint_mac_oui(struct zd_chip *chip, char *buffer, size_t size)
5353
{
54+
u8 *addr = zd_usb_to_netdev(&chip->usb)->dev_addr;
5455
return scnprintf(buffer, size, "%02x-%02x-%02x",
5556
addr[0], addr[1], addr[2]);
5657
}
@@ -61,10 +62,10 @@ static int scnprint_id(struct zd_chip *chip, char *buffer, size_t size)
6162
int i = 0;
6263

6364
i = scnprintf(buffer, size, "zd1211%s chip ",
64-
chip->is_zd1211b ? "b" : "");
65+
zd_chip_is_zd1211b(chip) ? "b" : "");
6566
i += zd_usb_scnprint_id(&chip->usb, buffer+i, size-i);
6667
i += scnprintf(buffer+i, size-i, " ");
67-
i += scnprint_mac_oui(chip->e2p_mac, buffer+i, size-i);
68+
i += scnprint_mac_oui(chip, buffer+i, size-i);
6869
i += scnprintf(buffer+i, size-i, " ");
6970
i += zd_rf_scnprint_id(&chip->rf, buffer+i, size-i);
7071
i += scnprintf(buffer+i, size-i, " pa%1x %c%c%c%c%c", chip->pa_type,
@@ -366,64 +367,9 @@ static int read_pod(struct zd_chip *chip, u8 *rf_type)
366367
return r;
367368
}
368369

369-
static int _read_mac_addr(struct zd_chip *chip, u8 *mac_addr,
370-
const zd_addr_t *addr)
371-
{
372-
int r;
373-
u32 parts[2];
374-
375-
r = zd_ioread32v_locked(chip, parts, (const zd_addr_t *)addr, 2);
376-
if (r) {
377-
dev_dbg_f(zd_chip_dev(chip),
378-
"error: couldn't read e2p macs. Error number %d\n", r);
379-
return r;
380-
}
381-
382-
mac_addr[0] = parts[0];
383-
mac_addr[1] = parts[0] >> 8;
384-
mac_addr[2] = parts[0] >> 16;
385-
mac_addr[3] = parts[0] >> 24;
386-
mac_addr[4] = parts[1];
387-
mac_addr[5] = parts[1] >> 8;
388-
389-
return 0;
390-
}
391-
392-
static int read_e2p_mac_addr(struct zd_chip *chip)
393-
{
394-
static const zd_addr_t addr[2] = { E2P_MAC_ADDR_P1, E2P_MAC_ADDR_P2 };
395-
396-
ZD_ASSERT(mutex_is_locked(&chip->mutex));
397-
return _read_mac_addr(chip, chip->e2p_mac, (const zd_addr_t *)addr);
398-
}
399-
400370
/* MAC address: if custom mac addresses are to to be used CR_MAC_ADDR_P1 and
401371
* CR_MAC_ADDR_P2 must be overwritten
402372
*/
403-
void zd_get_e2p_mac_addr(struct zd_chip *chip, u8 *mac_addr)
404-
{
405-
mutex_lock(&chip->mutex);
406-
memcpy(mac_addr, chip->e2p_mac, ETH_ALEN);
407-
mutex_unlock(&chip->mutex);
408-
}
409-
410-
static int read_mac_addr(struct zd_chip *chip, u8 *mac_addr)
411-
{
412-
static const zd_addr_t addr[2] = { CR_MAC_ADDR_P1, CR_MAC_ADDR_P2 };
413-
return _read_mac_addr(chip, mac_addr, (const zd_addr_t *)addr);
414-
}
415-
416-
int zd_read_mac_addr(struct zd_chip *chip, u8 *mac_addr)
417-
{
418-
int r;
419-
420-
dev_dbg_f(zd_chip_dev(chip), "\n");
421-
mutex_lock(&chip->mutex);
422-
r = read_mac_addr(chip, mac_addr);
423-
mutex_unlock(&chip->mutex);
424-
return r;
425-
}
426-
427373
int zd_write_mac_addr(struct zd_chip *chip, const u8 *mac_addr)
428374
{
429375
int r;
@@ -444,12 +390,6 @@ int zd_write_mac_addr(struct zd_chip *chip, const u8 *mac_addr)
444390

445391
mutex_lock(&chip->mutex);
446392
r = zd_iowrite32a_locked(chip, reqs, ARRAY_SIZE(reqs));
447-
#ifdef DEBUG
448-
{
449-
u8 tmp[ETH_ALEN];
450-
read_mac_addr(chip, tmp);
451-
}
452-
#endif /* DEBUG */
453393
mutex_unlock(&chip->mutex);
454394
return r;
455395
}
@@ -809,7 +749,7 @@ static int zd1211b_hw_reset_phy(struct zd_chip *chip)
809749

810750
static int hw_reset_phy(struct zd_chip *chip)
811751
{
812-
return chip->is_zd1211b ? zd1211b_hw_reset_phy(chip) :
752+
return zd_chip_is_zd1211b(chip) ? zd1211b_hw_reset_phy(chip) :
813753
zd1211_hw_reset_phy(chip);
814754
}
815755

@@ -874,7 +814,7 @@ static int hw_init_hmac(struct zd_chip *chip)
874814
if (r)
875815
return r;
876816

877-
return chip->is_zd1211b ?
817+
return zd_chip_is_zd1211b(chip) ?
878818
zd1211b_hw_init_hmac(chip) : zd1211_hw_init_hmac(chip);
879819
}
880820

@@ -1136,16 +1076,22 @@ static int read_fw_regs_offset(struct zd_chip *chip)
11361076
return 0;
11371077
}
11381078

1079+
/* Read mac address using pre-firmware interface */
1080+
int zd_chip_read_mac_addr_fw(struct zd_chip *chip, u8 *addr)
1081+
{
1082+
dev_dbg_f(zd_chip_dev(chip), "\n");
1083+
return zd_usb_read_fw(&chip->usb, E2P_MAC_ADDR_P1, addr,
1084+
ETH_ALEN);
1085+
}
11391086

1140-
int zd_chip_init_hw(struct zd_chip *chip, u8 device_type)
1087+
int zd_chip_init_hw(struct zd_chip *chip)
11411088
{
11421089
int r;
11431090
u8 rf_type;
11441091

11451092
dev_dbg_f(zd_chip_dev(chip), "\n");
11461093

11471094
mutex_lock(&chip->mutex);
1148-
chip->is_zd1211b = (device_type == DEVICE_ZD1211B) != 0;
11491095

11501096
#ifdef DEBUG
11511097
r = test_init(chip);
@@ -1201,10 +1147,6 @@ int zd_chip_init_hw(struct zd_chip *chip, u8 device_type)
12011147
goto out;
12021148
#endif /* DEBUG */
12031149

1204-
r = read_e2p_mac_addr(chip);
1205-
if (r)
1206-
goto out;
1207-
12081150
r = read_cal_int_tables(chip);
12091151
if (r)
12101152
goto out;
@@ -1259,7 +1201,7 @@ static int update_channel_integration_and_calibration(struct zd_chip *chip,
12591201
r = update_pwr_int(chip, channel);
12601202
if (r)
12611203
return r;
1262-
if (chip->is_zd1211b) {
1204+
if (zd_chip_is_zd1211b(chip)) {
12631205
static const struct zd_ioreq16 ioreqs[] = {
12641206
{ CR69, 0x28 },
12651207
{},

drivers/net/wireless/zd1211rw/zd_chip.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,6 @@ struct zd_chip {
704704
struct mutex mutex;
705705
/* Base address of FW_REG_ registers */
706706
zd_addr_t fw_regs_base;
707-
u8 e2p_mac[ETH_ALEN];
708707
/* EepSetPoint in the vendor driver */
709708
u8 pwr_cal_values[E2P_CHANNEL_COUNT];
710709
/* integration values in the vendor driver */
@@ -715,7 +714,7 @@ struct zd_chip {
715714
unsigned int pa_type:4,
716715
patch_cck_gain:1, patch_cr157:1, patch_6m_band_edge:1,
717716
new_phy_layout:1, al2230s_bit:1,
718-
is_zd1211b:1, supports_tx_led:1;
717+
supports_tx_led:1;
719718
};
720719

721720
static inline struct zd_chip *zd_usb_to_chip(struct zd_usb *usb)
@@ -734,9 +733,15 @@ void zd_chip_init(struct zd_chip *chip,
734733
struct net_device *netdev,
735734
struct usb_interface *intf);
736735
void zd_chip_clear(struct zd_chip *chip);
737-
int zd_chip_init_hw(struct zd_chip *chip, u8 device_type);
736+
int zd_chip_read_mac_addr_fw(struct zd_chip *chip, u8 *addr);
737+
int zd_chip_init_hw(struct zd_chip *chip);
738738
int zd_chip_reset(struct zd_chip *chip);
739739

740+
static inline int zd_chip_is_zd1211b(struct zd_chip *chip)
741+
{
742+
return chip->usb.is_zd1211b;
743+
}
744+
740745
static inline int zd_ioread16v_locked(struct zd_chip *chip, u16 *values,
741746
const zd_addr_t *addresses,
742747
unsigned int count)
@@ -825,8 +830,6 @@ static inline u8 _zd_chip_get_channel(struct zd_chip *chip)
825830
}
826831
u8 zd_chip_get_channel(struct zd_chip *chip);
827832
int zd_read_regdomain(struct zd_chip *chip, u8 *regdomain);
828-
void zd_get_e2p_mac_addr(struct zd_chip *chip, u8 *mac_addr);
829-
int zd_read_mac_addr(struct zd_chip *chip, u8 *mac_addr);
830833
int zd_write_mac_addr(struct zd_chip *chip, const u8 *mac_addr);
831834
int zd_chip_switch_radio_on(struct zd_chip *chip);
832835
int zd_chip_switch_radio_off(struct zd_chip *chip);

0 commit comments

Comments
 (0)