diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-28 09:44:56 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-28 09:44:56 -0700 |
commit | e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7 (patch) | |
tree | ea51b391f7d74ca695dcb9f5e46eb02688a92ed9 /drivers/staging/wlags49_h2 | |
parent | 81280572ca6f54009edfa4deee563e8678784218 (diff) | |
parent | a4ac0d847af9dd34d5953a5e264400326144b6b2 (diff) | |
download | kernel_samsung_espresso10-e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7.zip kernel_samsung_espresso10-e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7.tar.gz kernel_samsung_espresso10-e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7.tar.bz2 |
Merge 'staging-next' to Linus's tree
This merges the staging-next tree to Linus's tree and resolves
some conflicts that were present due to changes in other trees that were
affected by files here.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/wlags49_h2')
-rw-r--r-- | drivers/staging/wlags49_h2/Makefile | 10 | ||||
-rw-r--r-- | drivers/staging/wlags49_h2/hcf.c | 1 | ||||
-rw-r--r-- | drivers/staging/wlags49_h2/hcfdef.h | 8 | ||||
-rw-r--r-- | drivers/staging/wlags49_h2/mdd.h | 2 | ||||
-rw-r--r-- | drivers/staging/wlags49_h2/wl_main.c | 88 | ||||
-rw-r--r-- | drivers/staging/wlags49_h2/wl_netdev.c | 5 | ||||
-rw-r--r-- | drivers/staging/wlags49_h2/wl_util.c | 72 | ||||
-rw-r--r-- | drivers/staging/wlags49_h2/wl_util.h | 5 | ||||
-rw-r--r-- | drivers/staging/wlags49_h2/wl_wext.c | 9 |
9 files changed, 86 insertions, 114 deletions
diff --git a/drivers/staging/wlags49_h2/Makefile b/drivers/staging/wlags49_h2/Makefile index 25d0a8a..e604ebd 100644 --- a/drivers/staging/wlags49_h2/Makefile +++ b/drivers/staging/wlags49_h2/Makefile @@ -12,8 +12,8 @@ # If you want to build AP support (untested), comment out -DSTA_ONLY INSTALLDIR := /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless -EXTRA_CFLAGS += -I$(KERNELDIR)/include -EXTRA_CFLAGS += -I$(src) \ +ccflags-y := -I$(KERNELDIR)/include +ccflags-y += -I$(src) \ -DBUS_PCMCIA \ -DUSE_WPA \ -DUSE_WEXT \ @@ -25,16 +25,16 @@ EXTRA_CFLAGS += -I$(src) \ # -DUSE_UIL \ # -DUSE_PROFILE \ -ifeq ($(findstring HERMES25,$(EXTRA_CFLAGS)),) +ifeq ($(findstring HERMES25,$(ccflags-y)),) WLNAME := wlags49_h2_cs $(WLNAME)-y := sta_h2.o -ifeq ($(findstring STA_ONLY,$(EXTRA_CFLAGS)),) +ifeq ($(findstring STA_ONLY,$(ccflags-y)),) $(WLNAME)-y += ap_h2.o endif else WLNAME=wlags49_h25_cs $(WLNAME)-y := sta_h25.o -ifeq ($(findstring STA_ONLY,$(EXTRA_CFLAGS)),) +ifeq ($(findstring STA_ONLY,$(ccflags-y)),) $(WLNAME)-y += ap_h25.o endif endif diff --git a/drivers/staging/wlags49_h2/hcf.c b/drivers/staging/wlags49_h2/hcf.c index c4fe0ec..d4bdd3e 100644 --- a/drivers/staging/wlags49_h2/hcf.c +++ b/drivers/staging/wlags49_h2/hcf.c @@ -92,6 +92,7 @@ #include "hcf.h" // HCF and MSF common include file #include "hcfdef.h" // HCF specific include file #include "mmd.h" // MoreModularDriver common include file +#include <linux/kernel.h> #if ! defined offsetof #define offsetof(s,m) ((unsigned int)&(((s *)0)->m)) diff --git a/drivers/staging/wlags49_h2/hcfdef.h b/drivers/staging/wlags49_h2/hcfdef.h index f7e74bf..4e20171 100644 --- a/drivers/staging/wlags49_h2/hcfdef.h +++ b/drivers/staging/wlags49_h2/hcfdef.h @@ -593,14 +593,6 @@ err: ; /************************************** MACROS ************************************************/ /************************************************************************************************/ -/* min and max macros */ -#if ! defined max -#define max(a,b) (((a) > (b)) ? (a) : (b)) -#endif -#if ! defined min -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#endif - #ifdef HCF_SLEEP #if defined MSF_WAIT err: MSF should no longer supply this macro; diff --git a/drivers/staging/wlags49_h2/mdd.h b/drivers/staging/wlags49_h2/mdd.h index b50b7b0..5aa9eb8 100644 --- a/drivers/staging/wlags49_h2/mdd.h +++ b/drivers/staging/wlags49_h2/mdd.h @@ -1002,7 +1002,7 @@ XX1( CFG_SCAN, SCAN_RS_STRCT, scan_result[32] ) /*Scan results * #define CFG_CONNECTION_MODE 0x0908 //controls the mode of the FW (ESS/AP/IBSS/ADHOC) #define CFG_IFB 0x0909 //byte wise copy of IFB #define CFG_MSF_TALLIES 0x090A //MSF tallies (int's, rx and tx) -#define CFG_CURRENT_LINK_STATUS 0x090B //Latest link status got trough 0xF200 LinkEvent +#define CFG_CURRENT_LINK_STATUS 0x090B //Latest link status got through 0xF200 LinkEvent /*============================================================ INFORMATION FRAMES =========================*/ #define CFG_INFO_FRAME_MIN 0xF000 //lowest value representing an Informatio Frame diff --git a/drivers/staging/wlags49_h2/wl_main.c b/drivers/staging/wlags49_h2/wl_main.c index 8e3536a..6d45ab3 100644 --- a/drivers/staging/wlags49_h2/wl_main.c +++ b/drivers/staging/wlags49_h2/wl_main.c @@ -431,7 +431,7 @@ int wl_insert( struct net_device *dev ) /* Initialize the adapter parameters. */ spin_lock_init( &( lp->slock )); - /* Intialize states */ + /* Initialize states */ //lp->lockcount = 0; //PE1DNN lp->is_handling_int = WL_NOT_HANDLING_INT; lp->firmware_present = WL_FRIMWARE_NOT_PRESENT; @@ -466,7 +466,10 @@ int wl_insert( struct net_device *dev ) //;? DBG_PARAM( DbgInfo, PARM_NAME_CREATE_IBSS, "\"%s\"", PARM_CREATE_IBSS ); //;? DBG_PARAM( DbgInfo, PARM_NAME_MULTICAST_RX, "\"%s\"", PARM_MULTICAST_RX ); //;? DBG_PARAM( DbgInfo, PARM_NAME_MAX_SLEEP, "%d", PARM_MAX_SLEEP ); -//;? DBG_PARAM( DbgInfo, PARM_NAME_NETWORK_ADDR, "\"%s\"", DbgHwAddr( PARM_NETWORK_ADDR )); +/* + DBG_PARAM(DbgInfo, PARM_NAME_NETWORK_ADDR, "\"%pM\"", + PARM_NETWORK_ADDR); + */ //;? DBG_PARAM( DbgInfo, PARM_NAME_AUTHENTICATION, "%d", PARM_AUTHENTICATION ); //;? DBG_PARAM( DbgInfo, PARM_NAME_OWN_ATIM_WINDOW, "%d", PARM_OWN_ATIM_WINDOW ); //;? DBG_PARAM( DbgInfo, PARM_NAME_PM_HOLDOVER_DURATION, "%d", PARM_PM_HOLDOVER_DURATION ); @@ -493,12 +496,18 @@ int wl_insert( struct net_device *dev ) DBG_PARAM( DbgInfo, PARM_NAME_TX_RATE4, "%d", PARM_TX_RATE4 ); DBG_PARAM( DbgInfo, PARM_NAME_TX_RATE5, "%d", PARM_TX_RATE5 ); DBG_PARAM( DbgInfo, PARM_NAME_TX_RATE6, "%d", PARM_TX_RATE6 ); - DBG_PARAM( DbgInfo, PARM_NAME_WDS_ADDRESS1, "\"%s\"", DbgHwAddr( PARM_WDS_ADDRESS1 )); - DBG_PARAM( DbgInfo, PARM_NAME_WDS_ADDRESS2, "\"%s\"", DbgHwAddr( PARM_WDS_ADDRESS2 )); - DBG_PARAM( DbgInfo, PARM_NAME_WDS_ADDRESS3, "\"%s\"", DbgHwAddr( PARM_WDS_ADDRESS3 )); - DBG_PARAM( DbgInfo, PARM_NAME_WDS_ADDRESS4, "\"%s\"", DbgHwAddr( PARM_WDS_ADDRESS4 )); - DBG_PARAM( DbgInfo, PARM_NAME_WDS_ADDRESS5, "\"%s\"", DbgHwAddr( PARM_WDS_ADDRESS5 )); - DBG_PARAM( DbgInfo, PARM_NAME_WDS_ADDRESS6, "\"%s\"", DbgHwAddr( PARM_WDS_ADDRESS6 )); + DBG_PARAM(DbgInfo, PARM_NAME_WDS_ADDRESS1, "\"%pM\"", + PARM_WDS_ADDRESS1); + DBG_PARAM(DbgInfo, PARM_NAME_WDS_ADDRESS2, "\"%pM\"", + PARM_WDS_ADDRESS2); + DBG_PARAM(DbgInfo, PARM_NAME_WDS_ADDRESS3, "\"%pM\"", + PARM_WDS_ADDRESS3); + DBG_PARAM(DbgInfo, PARM_NAME_WDS_ADDRESS4, "\"%pM\"", + PARM_WDS_ADDRESS4); + DBG_PARAM(DbgInfo, PARM_NAME_WDS_ADDRESS5, "\"%pM\"", + PARM_WDS_ADDRESS5); + DBG_PARAM(DbgInfo, PARM_NAME_WDS_ADDRESS6, "\"%pM\"", + PARM_WDS_ADDRESS6); #endif /* USE_WDS */ #endif /* HCF_AP */ @@ -1170,7 +1179,7 @@ int rc; return hcf_status; } memcpy( lp->MACAddress, &lp->ltvRecord.u.u8[0], ETH_ALEN ); - DBG_TRACE( DbgInfo, "Card MAC Address: %s\n", DbgHwAddr( lp->MACAddress )); + DBG_TRACE(DbgInfo, "Card MAC Address: %pM\n", lp->MACAddress); /* Write out configuration to the device, enable, and reconnect. However, only reconnect if in AP mode. For STA mode, need to wait for passive scan @@ -1921,8 +1930,10 @@ int wl_put_ltv( struct wl_private *lp ) } /* Own MAC Address */ - //DBG_TRACE( DbgInfo, "MAC Address : %s\n", - // DbgHwAddr( lp->MACAddress )); +/* + DBG_TRACE(DbgInfo, "MAC Address : %pM\n", + lp->MACAddress); + */ if ( WVLAN_VALID_MAC_ADDRESS( lp->MACAddress )) { /* Make the MAC address valid by: @@ -3033,8 +3044,8 @@ void wl_process_mailbox( struct wl_private *lp ) aps[num_aps].capability ); DBG_TRACE( DbgInfo, "SSID Length : 0x%04x\n", aps[num_aps].ssid_len ); - DBG_TRACE( DbgInfo, "BSSID : %s\n", - DbgHwAddr( aps[num_aps].bssid )); + DBG_TRACE(DbgInfo, "BSSID : %pM\n", + aps[num_aps].bssid); if ( aps[num_aps].ssid_len != 0 ) { DBG_TRACE( DbgInfo, "SSID : %s.\n", @@ -3093,35 +3104,44 @@ void wl_process_mailbox( struct wl_private *lp ) DBG_TRACE( DbgInfo, "(%s) durID : 0x%04x.\n", lp->dev->name, probe_rsp->durID ); - DBG_TRACE( DbgInfo, "(%s) address1 : %s\n", - lp->dev->name, DbgHwAddr( probe_rsp->address1 )); + DBG_TRACE(DbgInfo, "(%s) address1 : %pM\n", + lp->dev->name, probe_rsp->address1); - DBG_TRACE( DbgInfo, "(%s) address2 : %s\n", - lp->dev->name, DbgHwAddr( probe_rsp->address2 )); + DBG_TRACE(DbgInfo, "(%s) address2 : %pM\n", + lp->dev->name, probe_rsp->address2); - DBG_TRACE( DbgInfo, "(%s) BSSID : %s\n", - lp->dev->name, DbgHwAddr( probe_rsp->BSSID )); + DBG_TRACE(DbgInfo, "(%s) BSSID : %pM\n", + lp->dev->name, probe_rsp->BSSID); DBG_TRACE( DbgInfo, "(%s) sequence : 0x%04x.\n", lp->dev->name, probe_rsp->sequence ); - DBG_TRACE( DbgInfo, "(%s) address4 : %s\n", - lp->dev->name, DbgHwAddr( probe_rsp->address4 )); + DBG_TRACE(DbgInfo, "(%s) address4 : %pM\n", + lp->dev->name, probe_rsp->address4); DBG_TRACE( DbgInfo, "(%s) datalength : 0x%04x.\n", lp->dev->name, probe_rsp->dataLength ); - DBG_TRACE( DbgInfo, "(%s) DA : %s\n", - lp->dev->name, DbgHwAddr( probe_rsp->DA )); + DBG_TRACE(DbgInfo, "(%s) DA : %pM\n", + lp->dev->name, probe_rsp->DA); - DBG_TRACE( DbgInfo, "(%s) SA : %s\n", - lp->dev->name, DbgHwAddr( probe_rsp->SA )); + DBG_TRACE(DbgInfo, "(%s) SA : %pM\n", + lp->dev->name, probe_rsp->SA); //DBG_TRACE( DbgInfo, "(%s) lenType : 0x%04x.\n", // lp->dev->name, probe_rsp->lenType ); - DBG_TRACE( DbgInfo, "(%s) timeStamp : %s\n", - lp->dev->name, DbgHwAddr( probe_rsp->timeStamp )); + DBG_TRACE(DbgInfo, "(%s) timeStamp : " + "%d.%d.%d.%d.%d.%d.%d.%d\n", + lp->dev->name, + probe_rsp->timeStamp[0], + probe_rsp->timeStamp[1], + probe_rsp->timeStamp[2], + probe_rsp->timeStamp[3], + probe_rsp->timeStamp[4], + probe_rsp->timeStamp[5], + probe_rsp->timeStamp[6], + probe_rsp->timeStamp[7]); DBG_TRACE( DbgInfo, "(%s) beaconInt : 0x%04x.\n", lp->dev->name, probe_rsp->beaconInterval ); @@ -3274,12 +3294,12 @@ void wl_process_mailbox( struct wl_private *lp ) break; } - DBG_TRACE( DbgInfo, "STA Address : %s\n", - DbgHwAddr( as->staAddr )); + DBG_TRACE(DbgInfo, "STA Address : %pM\n", + as->staAddr); if (( as->assocStatus == 2 ) && ( as->len == 8 )) { - DBG_TRACE( DbgInfo, "Old AP Address : %s\n", - DbgHwAddr( as->oldApAddr )); + DBG_TRACE(DbgInfo, "Old AP Address : %pM\n", + as->oldApAddr); } } @@ -3318,9 +3338,11 @@ void wl_process_mailbox( struct wl_private *lp ) break; } - DBG_TRACE( DbgInfo, "STA Address : %s\n", DbgHwAddr( ss->staAddr )); + DBG_TRACE(DbgInfo, "STA Address : %pM\n", + ss->staAddr); - DBG_TRACE( DbgInfo, "Reason : 0x%04x \n", ss->reason ); + DBG_TRACE(DbgInfo, "Reason : 0x%04x\n", + ss->reason); } break; diff --git a/drivers/staging/wlags49_h2/wl_netdev.c b/drivers/staging/wlags49_h2/wl_netdev.c index e2a7ad0..cf917e6 100644 --- a/drivers/staging/wlags49_h2/wl_netdev.c +++ b/drivers/staging/wlags49_h2/wl_netdev.c @@ -1071,8 +1071,7 @@ void wl_multicast( struct net_device *dev ) DBG_PRINT( " mc_count: %d\n", netdev_mc_count(dev)); netdev_for_each_mc_addr(ha, dev) - DBG_PRINT(" %s (%d)\n", DbgHwAddr(ha->addr), - dev->addr_len); + DBG_PRINT(" %pM (%d)\n", ha->addr, dev->addr_len); } #endif /* DBG */ @@ -1586,7 +1585,7 @@ void wl_wds_device_dealloc( struct wl_private *lp ) dev_wds->flags &= ~( IFF_UP | IFF_RUNNING ); } - kfree( dev_wds ); + free_netdev(dev_wds); lp->wds_port[count].dev = NULL; } } diff --git a/drivers/staging/wlags49_h2/wl_util.c b/drivers/staging/wlags49_h2/wl_util.c index ce8ed41..3b6f5a5 100644 --- a/drivers/staging/wlags49_h2/wl_util.c +++ b/drivers/staging/wlags49_h2/wl_util.c @@ -315,42 +315,6 @@ void key_string2key( char *ks, KEY_STRCT *key ) -#if DBG -/******************************************************************************* - * DbgHwAddr() - ******************************************************************************* - * - * DESCRIPTION: - * - * Convert a hardware ethernet address to a character string - * - * PARAMETERS: - * - * hwAddr - an ethernet address - * - * RETURNS: - * - * a pointer to a string representing the ethernet address - * - ******************************************************************************/ -const char *DbgHwAddr(unsigned char *hwAddr) -{ - static char buffer[18]; - /*------------------------------------------------------------------------*/ - - - sprintf( buffer, "%02X:%02X:%02X:%02X:%02X:%02X", - hwAddr[0], hwAddr[1], hwAddr[2], hwAddr[3], hwAddr[4], hwAddr[5] ); - - return buffer; -} // DbgHwAddr -/*============================================================================*/ - -#endif /* DBG */ - - - - /******************************************************************************* * wl_has_wep() ******************************************************************************* @@ -1134,29 +1098,29 @@ void wl_process_probe_response( struct wl_private *lp ) DBG_TRACE( DbgInfo, "(%s) durID : 0x%04x.\n", lp->dev->name, probe_rsp->durID ); - DBG_TRACE( DbgInfo, "(%s) address1 : %s\n", lp->dev->name, - DbgHwAddr( probe_rsp->address1 )); + DBG_TRACE(DbgInfo, "(%s) address1 : %pM\n", lp->dev->name, + probe_rsp->address1); - DBG_TRACE( DbgInfo, "(%s) address2 : %s\n", lp->dev->name, - DbgHwAddr( probe_rsp->address2 )); + DBG_TRACE(DbgInfo, "(%s) address2 : %pM\n", lp->dev->name, + probe_rsp->address2); - DBG_TRACE( DbgInfo, "(%s) BSSID : %s\n", lp->dev->name, - DbgHwAddr( probe_rsp->BSSID )); + DBG_TRACE(DbgInfo, "(%s) BSSID : %pM\n", lp->dev->name, + probe_rsp->BSSID); DBG_TRACE( DbgInfo, "(%s) sequence : 0x%04x.\n", lp->dev->name, probe_rsp->sequence ); - DBG_TRACE( DbgInfo, "(%s) address4 : %s\n", lp->dev->name, - DbgHwAddr( probe_rsp->address4 )); + DBG_TRACE(DbgInfo, "(%s) address4 : %pM\n", lp->dev->name, + probe_rsp->address4); DBG_TRACE( DbgInfo, "(%s) datalength : 0x%04x.\n", lp->dev->name, probe_rsp->dataLength ); - DBG_TRACE( DbgInfo, "(%s) DA : %s\n", lp->dev->name, - DbgHwAddr( probe_rsp->DA )); + DBG_TRACE(DbgInfo, "(%s) DA : %pM\n", lp->dev->name, + probe_rsp->DA); - DBG_TRACE( DbgInfo, "(%s) SA : %s\n", lp->dev->name, - DbgHwAddr( probe_rsp->SA )); + DBG_TRACE(DbgInfo, "(%s) SA : %pM\n", lp->dev->name, + probe_rsp->SA); #ifdef WARP @@ -1384,12 +1348,11 @@ void wl_process_assoc_status( struct wl_private *lp ) break; } - DBG_TRACE( DbgInfo, "STA Address : %s\n", - DbgHwAddr( assoc_stat->staAddr )); + DBG_TRACE(DbgInfo, "STA Address : %pM\n", assoc_stat->staAddr); if(( assoc_stat->assocStatus == 2 ) && ( assoc_stat->len == 8 )) { - DBG_TRACE( DbgInfo, "Old AP Address : %s\n", - DbgHwAddr( assoc_stat->oldApAddr )); + DBG_TRACE(DbgInfo, "Old AP Address : %pM\n", + assoc_stat->oldApAddr); } } @@ -1460,9 +1423,8 @@ void wl_process_security_status( struct wl_private *lp ) break; } - DBG_TRACE( DbgInfo, "STA Address : %s\n", - DbgHwAddr( sec_stat->staAddr )); - DBG_TRACE( DbgInfo, "Reason : 0x%04x \n", sec_stat->reason ); + DBG_TRACE(DbgInfo, "STA Address : %pM\n", sec_stat->staAddr); + DBG_TRACE(DbgInfo, "Reason : 0x%04x\n", sec_stat->reason); } diff --git a/drivers/staging/wlags49_h2/wl_util.h b/drivers/staging/wlags49_h2/wl_util.h index ba537a6..2661bcd 100644 --- a/drivers/staging/wlags49_h2/wl_util.h +++ b/drivers/staging/wlags49_h2/wl_util.h @@ -77,11 +77,6 @@ void wl_endian_translate_event( ltv_t *pLtv ); int wl_has_wep( IFBP ifbp ); - -#if DBG -const char *DbgHwAddr( unsigned char *hwAddr ); -#endif // DBG - hcf_8 wl_parse_ds_ie( PROBE_RESP *probe_rsp ); hcf_8 * wl_parse_wpa_ie( PROBE_RESP *probe_rsp, hcf_16 *length ); hcf_8 * wl_print_wpa_ie( hcf_8 *buffer, int length ); diff --git a/drivers/staging/wlags49_h2/wl_wext.c b/drivers/staging/wlags49_h2/wl_wext.c index 06467f1..9e5da08 100644 --- a/drivers/staging/wlags49_h2/wl_wext.c +++ b/drivers/staging/wlags49_h2/wl_wext.c @@ -789,7 +789,8 @@ static int wireless_get_ap_list (struct net_device *dev, struct iw_request_info memcpy( hwa[count].sa_data, (*p)/*lp->scan_results*/.APTable[count].bssid, ETH_ALEN ); #else //;?why use BSSID and bssid as names in seemingly very comparable situations - DBG_PRINT( "BSSID: %s\n", DbgHwAddr( (*p)/*lp->probe_results*/.ProbeTable[count].BSSID )); + DBG_PRINT("BSSID: %pM\n", + (*p).ProbeTable[count].BSSID); memcpy( hwa[count].sa_data, (*p)/*lp->probe_results*/.ProbeTable[count].BSSID, ETH_ALEN ); #endif // WARP @@ -3937,9 +3938,9 @@ void wl_wext_event_mic_failed( struct net_device *dev ) a problem in future versions of the supplicant, if they ever actually parse these parameters */ #if DBG - sprintf( msg, "MLME-MICHAELMICFAILURE.indication(keyid=%d %scast addr=" - "%s)", key_idx, addr1[0] & 0x01 ? "broad" : "uni", - DbgHwAddr( addr2 )); + sprintf(msg, "MLME-MICHAELMICFAILURE.indication(keyid=%d %scast " + "addr=%pM)", key_idx, addr1[0] & 0x01 ? "broad" : "uni", + addr2); #endif wrqu.data.length = strlen( msg ); wireless_send_event( dev, IWEVCUSTOM, &wrqu, msg ); |