aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/libertas/main.c71
1 files changed, 36 insertions, 35 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 589c583ddbeb..26948595d952 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -256,7 +256,7 @@ static int pre_open_check(struct net_device *dev)
256 * @param dev A pointer to net_device structure 256 * @param dev A pointer to net_device structure
257 * @return 0 257 * @return 0
258 */ 258 */
259static int wlan_dev_open(struct net_device *dev) 259static int libertas_dev_open(struct net_device *dev)
260{ 260{
261 wlan_private *priv = (wlan_private *) dev->priv; 261 wlan_private *priv = (wlan_private *) dev->priv;
262 wlan_adapter *adapter = priv->adapter; 262 wlan_adapter *adapter = priv->adapter;
@@ -282,7 +282,7 @@ static int wlan_dev_open(struct net_device *dev)
282 * @param dev A pointer to net_device structure 282 * @param dev A pointer to net_device structure
283 * @return 0 283 * @return 0
284 */ 284 */
285static int mesh_open(struct net_device *dev) 285static int libertas_mesh_open(struct net_device *dev)
286{ 286{
287 wlan_private *priv = (wlan_private *) dev->priv ; 287 wlan_private *priv = (wlan_private *) dev->priv ;
288 288
@@ -291,7 +291,7 @@ static int mesh_open(struct net_device *dev)
291 priv->mesh_open = 1 ; 291 priv->mesh_open = 1 ;
292 netif_wake_queue(priv->mesh_dev); 292 netif_wake_queue(priv->mesh_dev);
293 if (priv->infra_open == 0) 293 if (priv->infra_open == 0)
294 return wlan_dev_open(priv->dev) ; 294 return libertas_dev_open(priv->dev) ;
295 return 0; 295 return 0;
296} 296}
297 297
@@ -301,7 +301,7 @@ static int mesh_open(struct net_device *dev)
301 * @param dev A pointer to net_device structure 301 * @param dev A pointer to net_device structure
302 * @return 0 302 * @return 0
303 */ 303 */
304static int wlan_open(struct net_device *dev) 304static int libertas_open(struct net_device *dev)
305{ 305{
306 wlan_private *priv = (wlan_private *) dev->priv ; 306 wlan_private *priv = (wlan_private *) dev->priv ;
307 307
@@ -310,11 +310,11 @@ static int wlan_open(struct net_device *dev)
310 priv->infra_open = 1 ; 310 priv->infra_open = 1 ;
311 netif_wake_queue(priv->dev); 311 netif_wake_queue(priv->dev);
312 if (priv->open == 0) 312 if (priv->open == 0)
313 return wlan_dev_open(priv->dev) ; 313 return libertas_dev_open(priv->dev) ;
314 return 0; 314 return 0;
315} 315}
316 316
317static int wlan_dev_close(struct net_device *dev) 317static int libertas_dev_close(struct net_device *dev)
318{ 318{
319 wlan_private *priv = dev->priv; 319 wlan_private *priv = dev->priv;
320 320
@@ -333,14 +333,14 @@ static int wlan_dev_close(struct net_device *dev)
333 * @param dev A pointer to net_device structure 333 * @param dev A pointer to net_device structure
334 * @return 0 334 * @return 0
335 */ 335 */
336static int mesh_close(struct net_device *dev) 336static int libertas_mesh_close(struct net_device *dev)
337{ 337{
338 wlan_private *priv = (wlan_private *) (dev->priv); 338 wlan_private *priv = (wlan_private *) (dev->priv);
339 339
340 priv->mesh_open = 0; 340 priv->mesh_open = 0;
341 netif_stop_queue(priv->mesh_dev); 341 netif_stop_queue(priv->mesh_dev);
342 if (priv->infra_open == 0) 342 if (priv->infra_open == 0)
343 return wlan_dev_close(dev); 343 return libertas_dev_close(dev);
344 else 344 else
345 return 0; 345 return 0;
346} 346}
@@ -351,20 +351,20 @@ static int mesh_close(struct net_device *dev)
351 * @param dev A pointer to net_device structure 351 * @param dev A pointer to net_device structure
352 * @return 0 352 * @return 0
353 */ 353 */
354static int wlan_close(struct net_device *dev) 354static int libertas_close(struct net_device *dev)
355{ 355{
356 wlan_private *priv = (wlan_private *) dev->priv; 356 wlan_private *priv = (wlan_private *) dev->priv;
357 357
358 netif_stop_queue(dev); 358 netif_stop_queue(dev);
359 priv->infra_open = 0; 359 priv->infra_open = 0;
360 if (priv->mesh_open == 0) 360 if (priv->mesh_open == 0)
361 return wlan_dev_close(dev); 361 return libertas_dev_close(dev);
362 else 362 else
363 return 0; 363 return 0;
364} 364}
365 365
366 366
367static int wlan_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) 367static int libertas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
368{ 368{
369 int ret = 0; 369 int ret = 0;
370 wlan_private *priv = dev->priv; 370 wlan_private *priv = dev->priv;
@@ -387,10 +387,11 @@ done:
387} 387}
388 388
389/** 389/**
390 * @brief Mark mesh packets and handover them to wlan_hard_start_xmit 390 * @brief Mark mesh packets and handover them to libertas_hard_start_xmit
391 * 391 *
392 */ 392 */
393static int mesh_pre_start_xmit(struct sk_buff *skb, struct net_device *dev) 393static int libertas_mesh_pre_start_xmit(struct sk_buff *skb,
394 struct net_device *dev)
394{ 395{
395 wlan_private *priv = dev->priv; 396 wlan_private *priv = dev->priv;
396 int ret; 397 int ret;
@@ -399,16 +400,16 @@ static int mesh_pre_start_xmit(struct sk_buff *skb, struct net_device *dev)
399 400
400 SET_MESH_FRAME(skb); 401 SET_MESH_FRAME(skb);
401 402
402 ret = wlan_hard_start_xmit(skb, priv->dev); 403 ret = libertas_hard_start_xmit(skb, priv->dev);
403 lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret); 404 lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
404 return ret; 405 return ret;
405} 406}
406 407
407/** 408/**
408 * @brief Mark non-mesh packets and handover them to wlan_hard_start_xmit 409 * @brief Mark non-mesh packets and handover them to libertas_hard_start_xmit
409 * 410 *
410 */ 411 */
411static int wlan_pre_start_xmit(struct sk_buff *skb, struct net_device *dev) 412static int libertas_pre_start_xmit(struct sk_buff *skb, struct net_device *dev)
412{ 413{
413 int ret; 414 int ret;
414 415
@@ -416,12 +417,12 @@ static int wlan_pre_start_xmit(struct sk_buff *skb, struct net_device *dev)
416 417
417 UNSET_MESH_FRAME(skb); 418 UNSET_MESH_FRAME(skb);
418 419
419 ret = wlan_hard_start_xmit(skb, dev); 420 ret = libertas_hard_start_xmit(skb, dev);
420 lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret); 421 lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret);
421 return ret; 422 return ret;
422} 423}
423 424
424static void wlan_tx_timeout(struct net_device *dev) 425static void libertas_tx_timeout(struct net_device *dev)
425{ 426{
426 wlan_private *priv = (wlan_private *) dev->priv; 427 wlan_private *priv = (wlan_private *) dev->priv;
427 428
@@ -454,14 +455,14 @@ static void wlan_tx_timeout(struct net_device *dev)
454 * @param dev A pointer to wlan_private structure 455 * @param dev A pointer to wlan_private structure
455 * @return A pointer to net_device_stats structure 456 * @return A pointer to net_device_stats structure
456 */ 457 */
457static struct net_device_stats *wlan_get_stats(struct net_device *dev) 458static struct net_device_stats *libertas_get_stats(struct net_device *dev)
458{ 459{
459 wlan_private *priv = (wlan_private *) dev->priv; 460 wlan_private *priv = (wlan_private *) dev->priv;
460 461
461 return &priv->stats; 462 return &priv->stats;
462} 463}
463 464
464static int wlan_set_mac_address(struct net_device *dev, void *addr) 465static int libertas_set_mac_address(struct net_device *dev, void *addr)
465{ 466{
466 int ret = 0; 467 int ret = 0;
467 wlan_private *priv = (wlan_private *) dev->priv; 468 wlan_private *priv = (wlan_private *) dev->priv;
@@ -501,7 +502,7 @@ done:
501 return ret; 502 return ret;
502} 503}
503 504
504static int wlan_copy_multicast_address(wlan_adapter * adapter, 505static int libertas_copy_multicast_address(wlan_adapter * adapter,
505 struct net_device *dev) 506 struct net_device *dev)
506{ 507{
507 int i = 0; 508 int i = 0;
@@ -516,7 +517,7 @@ static int wlan_copy_multicast_address(wlan_adapter * adapter,
516 517
517} 518}
518 519
519static void wlan_set_multicast_list(struct net_device *dev) 520static void libertas_set_multicast_list(struct net_device *dev)
520{ 521{
521 wlan_private *priv = dev->priv; 522 wlan_private *priv = dev->priv;
522 wlan_adapter *adapter = priv->adapter; 523 wlan_adapter *adapter = priv->adapter;
@@ -561,7 +562,7 @@ static void wlan_set_multicast_list(struct net_device *dev)
561 CMD_ACT_MAC_MULTICAST_ENABLE; 562 CMD_ACT_MAC_MULTICAST_ENABLE;
562 563
563 adapter->nr_of_multicastmacaddr = 564 adapter->nr_of_multicastmacaddr =
564 wlan_copy_multicast_address(adapter, dev); 565 libertas_copy_multicast_address(adapter, dev);
565 566
566 lbs_deb_net("multicast addresses: %d\n", 567 lbs_deb_net("multicast addresses: %d\n",
567 dev->mc_count); 568 dev->mc_count);
@@ -796,12 +797,12 @@ wlan_private *libertas_add_card(void *card, struct device *dmdev)
796 SET_MODULE_OWNER(dev); 797 SET_MODULE_OWNER(dev);
797 798
798 /* Setup the OS Interface to our functions */ 799 /* Setup the OS Interface to our functions */
799 dev->open = wlan_open; 800 dev->open = libertas_open;
800 dev->hard_start_xmit = wlan_pre_start_xmit; 801 dev->hard_start_xmit = libertas_pre_start_xmit;
801 dev->stop = wlan_close; 802 dev->stop = libertas_close;
802 dev->set_mac_address = wlan_set_mac_address; 803 dev->set_mac_address = libertas_set_mac_address;
803 dev->tx_timeout = wlan_tx_timeout; 804 dev->tx_timeout = libertas_tx_timeout;
804 dev->get_stats = wlan_get_stats; 805 dev->get_stats = libertas_get_stats;
805 dev->watchdog_timeo = 5 * HZ; 806 dev->watchdog_timeo = 5 * HZ;
806 dev->ethtool_ops = &libertas_ethtool_ops; 807 dev->ethtool_ops = &libertas_ethtool_ops;
807#ifdef WIRELESS_EXT 808#ifdef WIRELESS_EXT
@@ -810,7 +811,7 @@ wlan_private *libertas_add_card(void *card, struct device *dmdev)
810#define NETIF_F_DYNALLOC 16 811#define NETIF_F_DYNALLOC 16
811 dev->features |= NETIF_F_DYNALLOC; 812 dev->features |= NETIF_F_DYNALLOC;
812 dev->flags |= IFF_BROADCAST | IFF_MULTICAST; 813 dev->flags |= IFF_BROADCAST | IFF_MULTICAST;
813 dev->set_multicast_list = wlan_set_multicast_list; 814 dev->set_multicast_list = libertas_set_multicast_list;
814 815
815 SET_NETDEV_DEV(dev, dmdev); 816 SET_NETDEV_DEV(dev, dmdev);
816 817
@@ -917,11 +918,11 @@ int libertas_add_mesh(wlan_private *priv, struct device *dev)
917 918
918 SET_MODULE_OWNER(mesh_dev); 919 SET_MODULE_OWNER(mesh_dev);
919 920
920 mesh_dev->open = mesh_open; 921 mesh_dev->open = libertas_mesh_open;
921 mesh_dev->hard_start_xmit = mesh_pre_start_xmit; 922 mesh_dev->hard_start_xmit = libertas_mesh_pre_start_xmit;
922 mesh_dev->stop = mesh_close; 923 mesh_dev->stop = libertas_mesh_close;
923 mesh_dev->get_stats = wlan_get_stats; 924 mesh_dev->get_stats = libertas_get_stats;
924 mesh_dev->set_mac_address = wlan_set_mac_address; 925 mesh_dev->set_mac_address = libertas_set_mac_address;
925 mesh_dev->ethtool_ops = &libertas_ethtool_ops; 926 mesh_dev->ethtool_ops = &libertas_ethtool_ops;
926 memcpy(mesh_dev->dev_addr, priv->dev->dev_addr, 927 memcpy(mesh_dev->dev_addr, priv->dev->dev_addr,
927 sizeof(priv->dev->dev_addr)); 928 sizeof(priv->dev->dev_addr));