aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ps3_gelic_wireless.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 00:04:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 00:04:44 -0400
commitf8965467f366fd18f01feafb5db10512d7b4422c (patch)
tree3706a9cd779859271ca61b85c63a1bc3f82d626e /drivers/net/ps3_gelic_wireless.c
parenta26272e5200765691e67d6780e52b32498fdb659 (diff)
parent2ec8c6bb5d8f3a62a79f463525054bae1e3d4487 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1674 commits) qlcnic: adding co maintainer ixgbe: add support for active DA cables ixgbe: dcb, do not tag tc_prio_control frames ixgbe: fix ixgbe_tx_is_paused logic ixgbe: always enable vlan strip/insert when DCB is enabled ixgbe: remove some redundant code in setting FCoE FIP filter ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp ixgbe: fix header len when unsplit packet overflows to data buffer ipv6: Never schedule DAD timer on dead address ipv6: Use POSTDAD state ipv6: Use state_lock to protect ifa state ipv6: Replace inet6_ifaddr->dead with state cxgb4: notify upper drivers if the device is already up when they load cxgb4: keep interrupts available when the ports are brought down cxgb4: fix initial addition of MAC address cnic: Return SPQ credit to bnx2x after ring setup and shutdown. cnic: Convert cnic_local_flags to atomic ops. can: Fix SJA1000 command register writes on SMP systems bridge: fix build for CONFIG_SYSFS disabled ARCNET: Limit com20020 PCI ID matches for SOHARD cards ... Fix up various conflicts with pcmcia tree drivers/net/ {pcmcia/3c589_cs.c, wireless/orinoco/orinoco_cs.c and wireless/orinoco/spectrum_cs.c} and feature removal (Documentation/feature-removal-schedule.txt). Also fix a non-content conflict due to pm_qos_requirement getting renamed in the PM tree (now pm_qos_request) in net/mac80211/scan.c
Diffstat (limited to 'drivers/net/ps3_gelic_wireless.c')
-rw-r--r--drivers/net/ps3_gelic_wireless.c74
1 files changed, 36 insertions, 38 deletions
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c
index 369a8016b1ff..43b8d7797f0a 100644
--- a/drivers/net/ps3_gelic_wireless.c
+++ b/drivers/net/ps3_gelic_wireless.c
@@ -301,7 +301,6 @@ static void gelic_wl_get_ch_info(struct gelic_wl_info *wl)
301 /* 16 bits of MSB has available channels */ 301 /* 16 bits of MSB has available channels */
302 wl->ch_info = ch_info_raw >> 48; 302 wl->ch_info = ch_info_raw >> 48;
303 } 303 }
304 return;
305} 304}
306 305
307/* SIOGIWRANGE */ 306/* SIOGIWRANGE */
@@ -528,7 +527,7 @@ static void gelic_wl_parse_ie(u8 *data, size_t len,
528 u8 item_len; 527 u8 item_len;
529 u8 item_id; 528 u8 item_id;
530 529
531 pr_debug("%s: data=%p len=%ld \n", __func__, 530 pr_debug("%s: data=%p len=%ld\n", __func__,
532 data, len); 531 data, len);
533 memset(ie_info, 0, sizeof(struct ie_info)); 532 memset(ie_info, 0, sizeof(struct ie_info));
534 533
@@ -897,7 +896,7 @@ static int gelic_wl_set_auth(struct net_device *netdev,
897 default: 896 default:
898 ret = -EOPNOTSUPP; 897 ret = -EOPNOTSUPP;
899 break; 898 break;
900 }; 899 }
901 900
902 if (!ret) 901 if (!ret)
903 set_bit(GELIC_WL_STAT_CONFIGURED, &wl->stat); 902 set_bit(GELIC_WL_STAT_CONFIGURED, &wl->stat);
@@ -979,7 +978,7 @@ static int gelic_wl_set_essid(struct net_device *netdev,
979 pr_debug("%s: essid = '%s'\n", __func__, extra); 978 pr_debug("%s: essid = '%s'\n", __func__, extra);
980 set_bit(GELIC_WL_STAT_ESSID_SET, &wl->stat); 979 set_bit(GELIC_WL_STAT_ESSID_SET, &wl->stat);
981 } else { 980 } else {
982 pr_debug("%s: ESSID any \n", __func__); 981 pr_debug("%s: ESSID any\n", __func__);
983 clear_bit(GELIC_WL_STAT_ESSID_SET, &wl->stat); 982 clear_bit(GELIC_WL_STAT_ESSID_SET, &wl->stat);
984 } 983 }
985 set_bit(GELIC_WL_STAT_CONFIGURED, &wl->stat); 984 set_bit(GELIC_WL_STAT_CONFIGURED, &wl->stat);
@@ -987,7 +986,7 @@ static int gelic_wl_set_essid(struct net_device *netdev,
987 986
988 987
989 gelic_wl_try_associate(netdev); /* FIXME */ 988 gelic_wl_try_associate(netdev); /* FIXME */
990 pr_debug("%s: -> \n", __func__); 989 pr_debug("%s: ->\n", __func__);
991 return 0; 990 return 0;
992} 991}
993 992
@@ -998,7 +997,7 @@ static int gelic_wl_get_essid(struct net_device *netdev,
998 struct gelic_wl_info *wl = port_wl(netdev_priv(netdev)); 997 struct gelic_wl_info *wl = port_wl(netdev_priv(netdev));
999 unsigned long irqflag; 998 unsigned long irqflag;
1000 999
1001 pr_debug("%s: <- \n", __func__); 1000 pr_debug("%s: <-\n", __func__);
1002 mutex_lock(&wl->assoc_stat_lock); 1001 mutex_lock(&wl->assoc_stat_lock);
1003 spin_lock_irqsave(&wl->lock, irqflag); 1002 spin_lock_irqsave(&wl->lock, irqflag);
1004 if (test_bit(GELIC_WL_STAT_ESSID_SET, &wl->stat) || 1003 if (test_bit(GELIC_WL_STAT_ESSID_SET, &wl->stat) ||
@@ -1011,7 +1010,7 @@ static int gelic_wl_get_essid(struct net_device *netdev,
1011 1010
1012 mutex_unlock(&wl->assoc_stat_lock); 1011 mutex_unlock(&wl->assoc_stat_lock);
1013 spin_unlock_irqrestore(&wl->lock, irqflag); 1012 spin_unlock_irqrestore(&wl->lock, irqflag);
1014 pr_debug("%s: -> len=%d \n", __func__, data->essid.length); 1013 pr_debug("%s: -> len=%d\n", __func__, data->essid.length);
1015 1014
1016 return 0; 1015 return 0;
1017} 1016}
@@ -1028,7 +1027,7 @@ static int gelic_wl_set_encode(struct net_device *netdev,
1028 int key_index, index_specified; 1027 int key_index, index_specified;
1029 int ret = 0; 1028 int ret = 0;
1030 1029
1031 pr_debug("%s: <- \n", __func__); 1030 pr_debug("%s: <-\n", __func__);
1032 flags = enc->flags & IW_ENCODE_FLAGS; 1031 flags = enc->flags & IW_ENCODE_FLAGS;
1033 key_index = enc->flags & IW_ENCODE_INDEX; 1032 key_index = enc->flags & IW_ENCODE_INDEX;
1034 1033
@@ -1087,7 +1086,7 @@ static int gelic_wl_set_encode(struct net_device *netdev,
1087 set_bit(GELIC_WL_STAT_CONFIGURED, &wl->stat); 1086 set_bit(GELIC_WL_STAT_CONFIGURED, &wl->stat);
1088done: 1087done:
1089 spin_unlock_irqrestore(&wl->lock, irqflag); 1088 spin_unlock_irqrestore(&wl->lock, irqflag);
1090 pr_debug("%s: -> \n", __func__); 1089 pr_debug("%s: ->\n", __func__);
1091 return ret; 1090 return ret;
1092} 1091}
1093 1092
@@ -1101,7 +1100,7 @@ static int gelic_wl_get_encode(struct net_device *netdev,
1101 unsigned int key_index, index_specified; 1100 unsigned int key_index, index_specified;
1102 int ret = 0; 1101 int ret = 0;
1103 1102
1104 pr_debug("%s: <- \n", __func__); 1103 pr_debug("%s: <-\n", __func__);
1105 key_index = enc->flags & IW_ENCODE_INDEX; 1104 key_index = enc->flags & IW_ENCODE_INDEX;
1106 pr_debug("%s: flag=%#x point=%p len=%d extra=%p\n", __func__, 1105 pr_debug("%s: flag=%#x point=%p len=%d extra=%p\n", __func__,
1107 enc->flags, enc->pointer, enc->length, extra); 1106 enc->flags, enc->pointer, enc->length, extra);
@@ -1215,7 +1214,7 @@ static int gelic_wl_set_encodeext(struct net_device *netdev,
1215 int key_index; 1214 int key_index;
1216 int ret = 0; 1215 int ret = 0;
1217 1216
1218 pr_debug("%s: <- \n", __func__); 1217 pr_debug("%s: <-\n", __func__);
1219 flags = enc->flags & IW_ENCODE_FLAGS; 1218 flags = enc->flags & IW_ENCODE_FLAGS;
1220 alg = ext->alg; 1219 alg = ext->alg;
1221 key_index = enc->flags & IW_ENCODE_INDEX; 1220 key_index = enc->flags & IW_ENCODE_INDEX;
@@ -1288,7 +1287,7 @@ static int gelic_wl_set_encodeext(struct net_device *netdev,
1288 } 1287 }
1289done: 1288done:
1290 spin_unlock_irqrestore(&wl->lock, irqflag); 1289 spin_unlock_irqrestore(&wl->lock, irqflag);
1291 pr_debug("%s: -> \n", __func__); 1290 pr_debug("%s: ->\n", __func__);
1292 return ret; 1291 return ret;
1293} 1292}
1294 1293
@@ -1304,7 +1303,7 @@ static int gelic_wl_get_encodeext(struct net_device *netdev,
1304 int ret = 0; 1303 int ret = 0;
1305 int max_key_len; 1304 int max_key_len;
1306 1305
1307 pr_debug("%s: <- \n", __func__); 1306 pr_debug("%s: <-\n", __func__);
1308 1307
1309 max_key_len = enc->length - sizeof(struct iw_encode_ext); 1308 max_key_len = enc->length - sizeof(struct iw_encode_ext);
1310 if (max_key_len < 0) 1309 if (max_key_len < 0)
@@ -1359,7 +1358,7 @@ static int gelic_wl_get_encodeext(struct net_device *netdev,
1359 } 1358 }
1360out: 1359out:
1361 spin_unlock_irqrestore(&wl->lock, irqflag); 1360 spin_unlock_irqrestore(&wl->lock, irqflag);
1362 pr_debug("%s: -> \n", __func__); 1361 pr_debug("%s: ->\n", __func__);
1363 return ret; 1362 return ret;
1364} 1363}
1365/* SIOC{S,G}IWMODE */ 1364/* SIOC{S,G}IWMODE */
@@ -1370,7 +1369,7 @@ static int gelic_wl_set_mode(struct net_device *netdev,
1370 __u32 mode = data->mode; 1369 __u32 mode = data->mode;
1371 int ret; 1370 int ret;
1372 1371
1373 pr_debug("%s: <- \n", __func__); 1372 pr_debug("%s: <-\n", __func__);
1374 if (mode == IW_MODE_INFRA) 1373 if (mode == IW_MODE_INFRA)
1375 ret = 0; 1374 ret = 0;
1376 else 1375 else
@@ -1384,7 +1383,7 @@ static int gelic_wl_get_mode(struct net_device *netdev,
1384 union iwreq_data *data, char *extra) 1383 union iwreq_data *data, char *extra)
1385{ 1384{
1386 __u32 *mode = &data->mode; 1385 __u32 *mode = &data->mode;
1387 pr_debug("%s: <- \n", __func__); 1386 pr_debug("%s: <-\n", __func__);
1388 *mode = IW_MODE_INFRA; 1387 *mode = IW_MODE_INFRA;
1389 pr_debug("%s: ->\n", __func__); 1388 pr_debug("%s: ->\n", __func__);
1390 return 0; 1389 return 0;
@@ -1992,7 +1991,7 @@ static int gelic_wl_associate_bss(struct gelic_wl_info *wl,
1992 case GELIC_WL_WPA_LEVEL_WPA2: 1991 case GELIC_WL_WPA_LEVEL_WPA2:
1993 ret = gelic_wl_do_wpa_setup(wl); 1992 ret = gelic_wl_do_wpa_setup(wl);
1994 break; 1993 break;
1995 }; 1994 }
1996 1995
1997 if (ret) { 1996 if (ret) {
1998 pr_debug("%s: WEP/WPA setup failed %d\n", __func__, 1997 pr_debug("%s: WEP/WPA setup failed %d\n", __func__,
@@ -2022,7 +2021,7 @@ static int gelic_wl_associate_bss(struct gelic_wl_info *wl,
2022 2021
2023 if (!rc) { 2022 if (!rc) {
2024 /* timeouted. Maybe key or cyrpt mode is wrong */ 2023 /* timeouted. Maybe key or cyrpt mode is wrong */
2025 pr_info("%s: connect timeout \n", __func__); 2024 pr_info("%s: connect timeout\n", __func__);
2026 cmd = gelic_eurus_sync_cmd(wl, GELIC_EURUS_CMD_DISASSOC, 2025 cmd = gelic_eurus_sync_cmd(wl, GELIC_EURUS_CMD_DISASSOC,
2027 NULL, 0); 2026 NULL, 0);
2028 kfree(cmd); 2027 kfree(cmd);
@@ -2063,7 +2062,7 @@ static void gelic_wl_connected_event(struct gelic_wl_info *wl,
2063 } 2062 }
2064 2063
2065 if (desired_event == event) { 2064 if (desired_event == event) {
2066 pr_debug("%s: completed \n", __func__); 2065 pr_debug("%s: completed\n", __func__);
2067 complete(&wl->assoc_done); 2066 complete(&wl->assoc_done);
2068 netif_carrier_on(port_to_netdev(wl_port(wl))); 2067 netif_carrier_on(port_to_netdev(wl_port(wl)));
2069 } else 2068 } else
@@ -2280,26 +2279,25 @@ void gelic_wl_interrupt(struct net_device *netdev, u64 status)
2280/* 2279/*
2281 * driver helpers 2280 * driver helpers
2282 */ 2281 */
2283#define IW_IOCTL(n) [(n) - SIOCSIWCOMMIT]
2284static const iw_handler gelic_wl_wext_handler[] = 2282static const iw_handler gelic_wl_wext_handler[] =
2285{ 2283{
2286 IW_IOCTL(SIOCGIWNAME) = gelic_wl_get_name, 2284 IW_HANDLER(SIOCGIWNAME, gelic_wl_get_name),
2287 IW_IOCTL(SIOCGIWRANGE) = gelic_wl_get_range, 2285 IW_HANDLER(SIOCGIWRANGE, gelic_wl_get_range),
2288 IW_IOCTL(SIOCSIWSCAN) = gelic_wl_set_scan, 2286 IW_HANDLER(SIOCSIWSCAN, gelic_wl_set_scan),
2289 IW_IOCTL(SIOCGIWSCAN) = gelic_wl_get_scan, 2287 IW_HANDLER(SIOCGIWSCAN, gelic_wl_get_scan),
2290 IW_IOCTL(SIOCSIWAUTH) = gelic_wl_set_auth, 2288 IW_HANDLER(SIOCSIWAUTH, gelic_wl_set_auth),
2291 IW_IOCTL(SIOCGIWAUTH) = gelic_wl_get_auth, 2289 IW_HANDLER(SIOCGIWAUTH, gelic_wl_get_auth),
2292 IW_IOCTL(SIOCSIWESSID) = gelic_wl_set_essid, 2290 IW_HANDLER(SIOCSIWESSID, gelic_wl_set_essid),
2293 IW_IOCTL(SIOCGIWESSID) = gelic_wl_get_essid, 2291 IW_HANDLER(SIOCGIWESSID, gelic_wl_get_essid),
2294 IW_IOCTL(SIOCSIWENCODE) = gelic_wl_set_encode, 2292 IW_HANDLER(SIOCSIWENCODE, gelic_wl_set_encode),
2295 IW_IOCTL(SIOCGIWENCODE) = gelic_wl_get_encode, 2293 IW_HANDLER(SIOCGIWENCODE, gelic_wl_get_encode),
2296 IW_IOCTL(SIOCSIWAP) = gelic_wl_set_ap, 2294 IW_HANDLER(SIOCSIWAP, gelic_wl_set_ap),
2297 IW_IOCTL(SIOCGIWAP) = gelic_wl_get_ap, 2295 IW_HANDLER(SIOCGIWAP, gelic_wl_get_ap),
2298 IW_IOCTL(SIOCSIWENCODEEXT) = gelic_wl_set_encodeext, 2296 IW_HANDLER(SIOCSIWENCODEEXT, gelic_wl_set_encodeext),
2299 IW_IOCTL(SIOCGIWENCODEEXT) = gelic_wl_get_encodeext, 2297 IW_HANDLER(SIOCGIWENCODEEXT, gelic_wl_get_encodeext),
2300 IW_IOCTL(SIOCSIWMODE) = gelic_wl_set_mode, 2298 IW_HANDLER(SIOCSIWMODE, gelic_wl_set_mode),
2301 IW_IOCTL(SIOCGIWMODE) = gelic_wl_get_mode, 2299 IW_HANDLER(SIOCGIWMODE, gelic_wl_get_mode),
2302 IW_IOCTL(SIOCGIWNICKN) = gelic_wl_get_nick, 2300 IW_HANDLER(SIOCGIWNICKN, gelic_wl_get_nick),
2303}; 2301};
2304 2302
2305static const struct iw_handler_def gelic_wl_wext_handler_def = { 2303static const struct iw_handler_def gelic_wl_wext_handler_def = {
@@ -2318,7 +2316,7 @@ static struct net_device * __devinit gelic_wl_alloc(struct gelic_card *card)
2318 pr_debug("%s:start\n", __func__); 2316 pr_debug("%s:start\n", __func__);
2319 netdev = alloc_etherdev(sizeof(struct gelic_port) + 2317 netdev = alloc_etherdev(sizeof(struct gelic_port) +
2320 sizeof(struct gelic_wl_info)); 2318 sizeof(struct gelic_wl_info));
2321 pr_debug("%s: netdev =%p card=%p \np", __func__, netdev, card); 2319 pr_debug("%s: netdev =%p card=%p\n", __func__, netdev, card);
2322 if (!netdev) 2320 if (!netdev)
2323 return NULL; 2321 return NULL;
2324 2322