* [PATCH 0/3] staging: wlags49_h2: Improve WEXT support
@ 2011-09-19 20:08 David Kilroy
2011-09-19 20:08 ` [PATCH 1/3] staging: wlags49_h2: Remove old WIRELESS_EXT support David Kilroy
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: David Kilroy @ 2011-09-19 20:08 UTC (permalink / raw)
To: linux-kernel, greg; +Cc: pe1dnn, David Kilroy
There are reports of issues using WPA with this driver. This series of
patches fixes a few obvious issues with the WEXT support in this
driver.
The changes have not recieved any testing. YMMV.
David Kilroy (3):
staging: wlags49_h2: Remove old WIRELESS_EXT support
staging: wlags49_h2: Support standard WEXT events
staging: wlags49_h2: Declare support for WEXT 21
drivers/staging/wlags49_h2/wl_internal.h | 7 --
drivers/staging/wlags49_h2/wl_version.h | 6 +-
drivers/staging/wlags49_h2/wl_wext.c | 152 ++++--------------------------
drivers/staging/wlags49_h2/wl_wext.h | 8 --
4 files changed, 20 insertions(+), 153 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/3] staging: wlags49_h2: Remove old WIRELESS_EXT support
2011-09-19 20:08 [PATCH 0/3] staging: wlags49_h2: Improve WEXT support David Kilroy
@ 2011-09-19 20:08 ` David Kilroy
2011-09-19 20:08 ` [PATCH 2/3] staging: wlags49_h2: Support standard WEXT events David Kilroy
2011-09-19 20:08 ` [PATCH 3/3] staging: wlags49_h2: Declare support for WEXT 21 David Kilroy
2 siblings, 0 replies; 12+ messages in thread
From: David Kilroy @ 2011-09-19 20:08 UTC (permalink / raw)
To: linux-kernel, greg; +Cc: pe1dnn, David Kilroy
Since the driver is now in-kernel remove support for building
against ancient WIRELESS_EXT versions.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
---
drivers/staging/wlags49_h2/wl_internal.h | 7 --
drivers/staging/wlags49_h2/wl_version.h | 3 -
drivers/staging/wlags49_h2/wl_wext.c | 96 ------------------------------
drivers/staging/wlags49_h2/wl_wext.h | 8 ---
4 files changed, 0 insertions(+), 114 deletions(-)
diff --git a/drivers/staging/wlags49_h2/wl_internal.h b/drivers/staging/wlags49_h2/wl_internal.h
index cd129b3..1508063 100644
--- a/drivers/staging/wlags49_h2/wl_internal.h
+++ b/drivers/staging/wlags49_h2/wl_internal.h
@@ -75,15 +75,8 @@
#include <pcmcia/ds.h>
#endif // BUS_PCMCIA
-#ifdef HAS_WIRELESS_EXTENSIONS
#include <linux/wireless.h>
-#if WIRELESS_EXT > 13
#include <net/iw_handler.h>
-#endif // WIRELESS_EXT > 13
-#define USE_DBM
-#define RETURN_CURRENT_NETWORKNAME
-#define USE_FREQUENCY
-#endif // HAS_WIRELESS_EXTENSIONS/
#include <linux/list.h>
diff --git a/drivers/staging/wlags49_h2/wl_version.h b/drivers/staging/wlags49_h2/wl_version.h
index a5e604c..872d085 100644
--- a/drivers/staging/wlags49_h2/wl_version.h
+++ b/drivers/staging/wlags49_h2/wl_version.h
@@ -158,9 +158,6 @@ err: define bus type;
* There doesn't seem to be a difference for PCMCIA and PCI anymore, at least
* for PCMCIA the same defines are needed now as previously only used for PCI
*/
-#if USE_WEXT
-#define HAS_WIRELESS_EXTENSIONS
-#endif // USE_WEXT
#define NEW_MULTICAST
#define ALLOC_SKB(len) dev_alloc_skb(len+2)
diff --git a/drivers/staging/wlags49_h2/wl_wext.c b/drivers/staging/wlags49_h2/wl_wext.c
index 522a310..fc453a8 100644
--- a/drivers/staging/wlags49_h2/wl_wext.c
+++ b/drivers/staging/wlags49_h2/wl_wext.c
@@ -77,11 +77,6 @@
-/* If WIRELESS_EXT is not defined (as a result of HAS_WIRELESS_EXTENSIONS
- #including linux/wireless.h), then these functions do not need to be included
- in the build. */
-#ifdef WIRELESS_EXT
-
#define IWE_STREAM_ADD_EVENT(info, buf, end, iwe, len) \
iwe_stream_add_event(info, buf, end, iwe, len)
#define IWE_STREAM_ADD_POINT(info, buf, end, iwe, msg) \
@@ -324,16 +319,8 @@ static int wireless_get_frequency(struct net_device *dev, struct iw_request_info
if( ret == HCF_SUCCESS ) {
hcf_16 channel = CNV_LITTLE_TO_INT( lp->ltvRecord.u.u16[0] );
-#ifdef USE_FREQUENCY
-
freq->m = wl_get_freq_from_chan( channel ) * 100000;
freq->e = 1;
-#else
-
- freq->m = channel;
- freq->e = 0;
-
-#endif /* USE_FREQUENCY */
}
wl_act_int_on( lp );
@@ -460,8 +447,6 @@ retry:
/* Link quality */
-#ifdef USE_DBM
-
range->max_qual.qual = (u_char)HCF_MAX_COMM_QUALITY;
/* If the value returned in /proc/net/wireless is greater than the maximum range,
@@ -470,13 +455,6 @@ retry:
range->max_qual.level = (u_char)( dbm( HCF_MIN_SIGNAL_LEVEL ) - 1 );
range->max_qual.noise = (u_char)( dbm( HCF_MIN_NOISE_LEVEL ) - 1 );
-#else
-
- range->max_qual.qual = 100;
- range->max_qual.level = 100;
- range->max_qual.noise = 100;
-
-#endif /* USE_DBM */
/* Set available rates */
@@ -508,8 +486,6 @@ retry:
/* Encryption */
-#if WIRELESS_EXT > 8
-
/* Holding the lock too long, make a gap to allow other processes */
wl_unlock(lp, &flags);
wl_lock( lp, &flags );
@@ -526,26 +502,17 @@ retry:
range->max_encoding_tokens = MAX_KEYS;
}
-#endif /* WIRELESS_EXT > 8 */
-
/* Tx Power Info */
range->txpower_capa = IW_TXPOW_MWATT;
range->num_txpower = 1;
range->txpower[0] = RADIO_TX_POWER_MWATT;
-#if WIRELESS_EXT > 10
-
/* Wireless Extension Info */
range->we_version_compiled = WIRELESS_EXT;
range->we_version_source = WIRELESS_SUPPORT;
// Retry Limits and Lifetime - NOT SUPPORTED
-#endif
-
-
-#if WIRELESS_EXT > 11
-
/* Holding the lock too long, make a gap to allow other processes */
wl_unlock(lp, &flags);
wl_lock( lp, &flags );
@@ -555,8 +522,6 @@ retry:
range->avg_qual = lp->wstats.qual;
DBG_TRACE( DbgInfo, "wl_wireless_stats done\n" );
-#endif
-
/* Event capability (kernel + driver) */
range->event_capa[0] = (IW_EVENT_CAPA_K_0 |
IW_EVENT_CAPA_MASK(SIOCGIWAP) |
@@ -1087,7 +1052,6 @@ static int wireless_get_essid(struct net_device *dev, struct iw_request_info *in
#if 1 //;? (HCF_TYPE) & HCF_TYPE_STA
//;?should we return an error status in AP mode
-#ifdef RETURN_CURRENT_NETWORKNAME
/* if desired is null ("any"), return current or "any" */
if( pName->name[0] == '\0' ) {
@@ -1116,7 +1080,6 @@ static int wireless_get_essid(struct net_device *dev, struct iw_request_info *in
}
}
-#endif // RETURN_CURRENT_NETWORKNAME
#endif // HCF_STA
data->length--;
@@ -1170,10 +1133,7 @@ static int wireless_set_encode(struct net_device *dev, struct iw_request_info *i
struct wl_private *lp = wl_priv(dev);
unsigned long flags;
int ret = 0;
-
-#if 1 //;? #if WIRELESS_EXT > 8 - used unconditionally in the rest of the code...
hcf_8 encryption_state;
-#endif // WIRELESS_EXT > 8
/*------------------------------------------------------------------------*/
@@ -2023,11 +1983,9 @@ static int wireless_set_rts_threshold (struct net_device *dev, struct iw_request
goto out;
}
-#if WIRELESS_EXT > 8
if( rts->disabled ) {
rthr = 2347;
}
-#endif /* WIRELESS_EXT > 8 */
if(( rthr < 256 ) || ( rthr > 2347 )) {
ret = -EINVAL;
@@ -2095,12 +2053,8 @@ static int wireless_get_rts_threshold (struct net_device *dev, struct iw_request
rts->value = lp->RTSThreshold;
-#if WIRELESS_EXT > 8
-
rts->disabled = ( rts->value == 2347 );
-#endif /* WIRELESS_EXT > 8 */
-
rts->fixed = 1;
wl_act_int_on( lp );
@@ -2527,8 +2481,6 @@ out:
-#if WIRELESS_EXT > 13
-
/*******************************************************************************
* wireless_set_scan()
*******************************************************************************
@@ -2810,7 +2762,6 @@ static int wireless_get_scan(struct net_device *dev, struct iw_request_info *inf
buf = IWE_STREAM_ADD_EVENT(info, buf, buf_end, &iwe, IW_EV_FREQ_LEN);
-#if WIRELESS_EXT > 14
/* Custom info (Beacon Interval) */
memset( &iwe, 0, sizeof( iwe ));
memset( msg, 0, sizeof( msg ));
@@ -2839,7 +2790,6 @@ static int wireless_get_scan(struct net_device *dev, struct iw_request_info *inf
}
/* Add other custom info in formatted string format as needed... */
-#endif
}
data->length = buf - extra;
@@ -2856,11 +2806,8 @@ out:
} // wireless_get_scan
/*============================================================================*/
-#endif // WIRELESS_EXT > 13
-#if WIRELESS_EXT > 17
-
static int wireless_set_auth(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *data, char *extra)
@@ -3261,8 +3208,6 @@ out:
/*============================================================================*/
-#endif // WIRELESS_EXT > 17
-
/*******************************************************************************
* wl_wireless_stats()
*******************************************************************************
@@ -3316,7 +3261,6 @@ struct iw_statistics * wl_wireless_stats( struct net_device *dev )
if( status == HCF_SUCCESS ) {
pQual = (CFG_COMMS_QUALITY_STRCT *)&( lp->ltvRecord );
-#ifdef USE_DBM
pStats->qual.qual = (u_char) CNV_LITTLE_TO_INT( pQual->coms_qual );
pStats->qual.level = (u_char) dbm( CNV_LITTLE_TO_INT( pQual->signal_lvl ));
pStats->qual.noise = (u_char) dbm( CNV_LITTLE_TO_INT( pQual->noise_lvl ));
@@ -3325,23 +3269,6 @@ struct iw_statistics * wl_wireless_stats( struct net_device *dev )
IW_QUAL_LEVEL_UPDATED |
IW_QUAL_NOISE_UPDATED |
IW_QUAL_DBM);
-#else
- pStats->qual.qual = percent( CNV_LITTLE_TO_INT( pQual->coms_qual ),
- HCF_MIN_COMM_QUALITY,
- HCF_MAX_COMM_QUALITY );
-
- pStats->qual.level = percent( CNV_LITTLE_TO_INT( pQual->signal_lvl ),
- HCF_MIN_SIGNAL_LEVEL,
- HCF_MAX_SIGNAL_LEVEL );
-
- pStats->qual.noise = percent( CNV_LITTLE_TO_INT( pQual->noise_lvl ),
- HCF_MIN_NOISE_LEVEL,
- HCF_MAX_NOISE_LEVEL );
-
- pStats->qual.updated |= (IW_QUAL_QUAL_UPDATED |
- IW_QUAL_LEVEL_UPDATED |
- IW_QUAL_NOISE_UPDATED);
-#endif /* USE_DBM */
} else {
memset( &( pStats->qual ), 0, sizeof( pStats->qual ));
}
@@ -3512,7 +3439,6 @@ inline void wl_spy_gather( struct net_device *dev, u_char *mac )
******************************************************************************/
void wl_wext_event_freq( struct net_device *dev )
{
-#if WIRELESS_EXT > 13
union iwreq_data wrqu;
struct wl_private *lp = wl_priv(dev);
/*------------------------------------------------------------------------*/
@@ -3524,7 +3450,6 @@ void wl_wext_event_freq( struct net_device *dev )
wrqu.freq.e = 0;
wireless_send_event( dev, SIOCSIWFREQ, &wrqu, NULL );
-#endif /* WIRELESS_EXT > 13 */
return;
} // wl_wext_event_freq
@@ -3554,7 +3479,6 @@ void wl_wext_event_freq( struct net_device *dev )
******************************************************************************/
void wl_wext_event_mode( struct net_device *dev )
{
-#if WIRELESS_EXT > 13
union iwreq_data wrqu;
struct wl_private *lp = wl_priv(dev);
/*------------------------------------------------------------------------*/
@@ -3569,7 +3493,6 @@ void wl_wext_event_mode( struct net_device *dev )
}
wireless_send_event( dev, SIOCSIWMODE, &wrqu, NULL );
-#endif /* WIRELESS_EXT > 13 */
return;
} // wl_wext_event_mode
@@ -3599,7 +3522,6 @@ void wl_wext_event_mode( struct net_device *dev )
******************************************************************************/
void wl_wext_event_essid( struct net_device *dev )
{
-#if WIRELESS_EXT > 13
union iwreq_data wrqu;
struct wl_private *lp = wl_priv(dev);
/*------------------------------------------------------------------------*/
@@ -3616,7 +3538,6 @@ void wl_wext_event_essid( struct net_device *dev )
wrqu.essid.flags = 1;
wireless_send_event( dev, SIOCSIWESSID, &wrqu, lp->NetworkName );
-#endif /* WIRELESS_EXT > 13 */
return;
} // wl_wext_event_essid
@@ -3646,7 +3567,6 @@ void wl_wext_event_essid( struct net_device *dev )
******************************************************************************/
void wl_wext_event_encode( struct net_device *dev )
{
-#if WIRELESS_EXT > 13
union iwreq_data wrqu;
struct wl_private *lp = wl_priv(dev);
int index = 0;
@@ -3688,7 +3608,6 @@ void wl_wext_event_encode( struct net_device *dev )
wireless_send_event( dev, SIOCSIWENCODE, &wrqu,
lp->DefaultKeys.key[index].key );
-#endif /* WIRELESS_EXT > 13 */
return;
} // wl_wext_event_encode
@@ -3718,7 +3637,6 @@ void wl_wext_event_encode( struct net_device *dev )
******************************************************************************/
void wl_wext_event_ap( struct net_device *dev )
{
-#if WIRELESS_EXT > 13
union iwreq_data wrqu;
struct wl_private *lp = wl_priv(dev);
int status;
@@ -3747,8 +3665,6 @@ void wl_wext_event_ap( struct net_device *dev )
wireless_send_event( dev, SIOCGIWAP, &wrqu, NULL );
}
-#endif /* WIRELESS_EXT > 13 */
-
return;
} // wl_wext_event_ap
/*============================================================================*/
@@ -3776,7 +3692,6 @@ void wl_wext_event_ap( struct net_device *dev )
******************************************************************************/
void wl_wext_event_scan_complete( struct net_device *dev )
{
-#if WIRELESS_EXT > 13
union iwreq_data wrqu;
/*------------------------------------------------------------------------*/
@@ -3785,7 +3700,6 @@ void wl_wext_event_scan_complete( struct net_device *dev )
wrqu.addr.sa_family = ARPHRD_ETHER;
wireless_send_event( dev, SIOCGIWSCAN, &wrqu, NULL );
-#endif /* WIRELESS_EXT > 13 */
return;
} // wl_wext_event_scan_complete
@@ -3815,7 +3729,6 @@ void wl_wext_event_scan_complete( struct net_device *dev )
******************************************************************************/
void wl_wext_event_new_sta( struct net_device *dev )
{
-#if WIRELESS_EXT > 14
union iwreq_data wrqu;
/*------------------------------------------------------------------------*/
@@ -3826,7 +3739,6 @@ void wl_wext_event_new_sta( struct net_device *dev )
memcpy( wrqu.addr.sa_data, dev->dev_addr, ETH_ALEN );
wrqu.addr.sa_family = ARPHRD_ETHER;
wireless_send_event( dev, IWEVREGISTERED, &wrqu, NULL );
-#endif /* WIRELESS_EXT > 14 */
return;
} // wl_wext_event_new_sta
@@ -3856,7 +3768,6 @@ void wl_wext_event_new_sta( struct net_device *dev )
******************************************************************************/
void wl_wext_event_expired_sta( struct net_device *dev )
{
-#if WIRELESS_EXT > 14
union iwreq_data wrqu;
/*------------------------------------------------------------------------*/
@@ -3866,7 +3777,6 @@ void wl_wext_event_expired_sta( struct net_device *dev )
memcpy( wrqu.addr.sa_data, dev->dev_addr, ETH_ALEN );
wrqu.addr.sa_family = ARPHRD_ETHER;
wireless_send_event( dev, IWEVEXPIRED, &wrqu, NULL );
-#endif /* WIRELESS_EXT > 14 */
return;
} // wl_wext_event_expired_sta
@@ -3895,7 +3805,6 @@ void wl_wext_event_expired_sta( struct net_device *dev )
******************************************************************************/
void wl_wext_event_mic_failed( struct net_device *dev )
{
-#if WIRELESS_EXT > 14
char msg[512];
union iwreq_data wrqu;
struct wl_private *lp = wl_priv(dev);
@@ -3944,7 +3853,6 @@ void wl_wext_event_mic_failed( struct net_device *dev )
#endif
wrqu.data.length = strlen( msg );
wireless_send_event( dev, IWEVCUSTOM, &wrqu, msg );
-#endif /* WIRELESS_EXT > 14 */
return;
} // wl_wext_event_mic_failed
@@ -3974,7 +3882,6 @@ void wl_wext_event_mic_failed( struct net_device *dev )
******************************************************************************/
void wl_wext_event_assoc_ie( struct net_device *dev )
{
-#if WIRELESS_EXT > 14
char msg[512];
union iwreq_data wrqu;
struct wl_private *lp = wl_priv(dev);
@@ -4016,7 +3923,6 @@ void wl_wext_event_assoc_ie( struct net_device *dev )
wireless_send_event( dev, IWEVCUSTOM, &wrqu, msg );
}
}
-#endif /* WIRELESS_EXT > 14 */
return;
} // wl_wext_event_assoc_ie
@@ -4120,5 +4026,3 @@ const struct iw_handler_def wl_iw_handler_def =
.standard = (iw_handler *) wl_handler,
.get_wireless_stats = wl_get_wireless_stats,
};
-
-#endif // WIRELESS_EXT
diff --git a/drivers/staging/wlags49_h2/wl_wext.h b/drivers/staging/wlags49_h2/wl_wext.h
index 39d39a4..a713058 100644
--- a/drivers/staging/wlags49_h2/wl_wext.h
+++ b/drivers/staging/wlags49_h2/wl_wext.h
@@ -62,9 +62,6 @@
#define __WL_WEXT_H__
-#ifdef WIRELESS_EXT
-
-
/*******************************************************************************
* function protoypes
******************************************************************************/
@@ -88,9 +85,4 @@ void wl_wext_event_assoc_ie( struct net_device *dev );
extern const struct iw_handler_def wl_iw_handler_def;
-#else
-#error WIRELESS_EXT
-#endif // WIRELESS_EXT
-
-
#endif // __WL_WEXT_H__
--
1.7.4.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/3] staging: wlags49_h2: Support standard WEXT events
2011-09-19 20:08 [PATCH 0/3] staging: wlags49_h2: Improve WEXT support David Kilroy
2011-09-19 20:08 ` [PATCH 1/3] staging: wlags49_h2: Remove old WIRELESS_EXT support David Kilroy
@ 2011-09-19 20:08 ` David Kilroy
2011-09-19 20:08 ` [PATCH 3/3] staging: wlags49_h2: Declare support for WEXT 21 David Kilroy
2 siblings, 0 replies; 12+ messages in thread
From: David Kilroy @ 2011-09-19 20:08 UTC (permalink / raw)
To: linux-kernel, greg; +Cc: pe1dnn, David Kilroy
... instead of using IWEVCUSTOM. Use the defined events for
michael mic failure, association request info and association
response info.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
---
drivers/staging/wlags49_h2/wl_wext.c | 56 +++++++++++-----------------------
1 files changed, 18 insertions(+), 38 deletions(-)
diff --git a/drivers/staging/wlags49_h2/wl_wext.c b/drivers/staging/wlags49_h2/wl_wext.c
index fc453a8..917c949 100644
--- a/drivers/staging/wlags49_h2/wl_wext.c
+++ b/drivers/staging/wlags49_h2/wl_wext.c
@@ -3805,9 +3805,9 @@ void wl_wext_event_expired_sta( struct net_device *dev )
******************************************************************************/
void wl_wext_event_mic_failed( struct net_device *dev )
{
- char msg[512];
union iwreq_data wrqu;
struct wl_private *lp = wl_priv(dev);
+ struct iw_michaelmicfailure wxmic;
int key_idx;
char *addr1;
char *addr2;
@@ -3829,30 +3829,17 @@ void wl_wext_event_mic_failed( struct net_device *dev )
DBG_PRINT( "MIC FAIL - KEY USED : %d, STATUS : 0x%04x\n", key_idx,
hdr->status );
- memset( &wrqu, 0, sizeof( wrqu ));
- memset( msg, 0, sizeof( msg ));
-
+ memset(&wrqu, 0, sizeof(wrqu));
+ memset(&wxmic, 0, sizeof(wxmic));
- /* Because MIC failures are not part of the Wireless Extensions yet, they
- must be passed as a string using an IWEVCUSTOM event. In order for the
- event to be effective, the string format must be known by both the
- driver and the supplicant. The following is the string format used by the
- hostap project's WPA supplicant, and will be used here until the Wireless
- Extensions interface adds this support:
+ wxmic.flags = key_idx & IW_MICFAILURE_KEY_ID;
+ wxmic.flags |= (addr1[0] & 1) ?
+ IW_MICFAILURE_GROUP : IW_MICFAILURE_PAIRWISE;
+ wxmic.src_addr.sa_family = ARPHRD_ETHER;
+ memcpy(wxmic.src_addr.sa_data, addr2, ETH_ALEN);
- MLME-MICHAELMICFAILURE.indication(keyid=# broadcast/unicast addr=addr2)
- */
-
- /* NOTE: Format of MAC address (using colons to separate bytes) may cause
- 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=%pM)", key_idx, addr1[0] & 0x01 ? "broad" : "uni",
- addr2);
-#endif
- wrqu.data.length = strlen( msg );
- wireless_send_event( dev, IWEVCUSTOM, &wrqu, msg );
+ wrqu.data.length = sizeof(wxmic);
+ wireless_send_event(dev, IWEVMICHAELMICFAILURE, &wrqu, (char *)&wxmic);
return;
} // wl_wext_event_mic_failed
@@ -3882,7 +3869,6 @@ void wl_wext_event_mic_failed( struct net_device *dev )
******************************************************************************/
void wl_wext_event_assoc_ie( struct net_device *dev )
{
- char msg[512];
union iwreq_data wrqu;
struct wl_private *lp = wl_priv(dev);
int status;
@@ -3893,7 +3879,6 @@ void wl_wext_event_assoc_ie( struct net_device *dev )
memset( &wrqu, 0, sizeof( wrqu ));
- memset( msg, 0, sizeof( msg ));
/* Retrieve the Association Request IE */
lp->ltvRecord.len = 45;
@@ -3906,21 +3891,16 @@ void wl_wext_event_assoc_ie( struct net_device *dev )
memcpy( &data.rawData, &( lp->ltvRecord.u.u8[1] ), 88 );
wpa_ie = wl_parse_wpa_ie( &data, &length );
- /* Because this event (Association WPA-IE) is not part of the Wireless
- Extensions yet, it must be passed as a string using an IWEVCUSTOM event.
- In order for the event to be effective, the string format must be known
- by both the driver and the supplicant. The following is the string format
- used by the hostap project's WPA supplicant, and will be used here until
- the Wireless Extensions interface adds this support:
-
- ASSOCINFO(ReqIEs=WPA-IE RespIEs=WPA-IE)
- */
-
if( length != 0 )
{
- sprintf( msg, "ASSOCINFO(ReqIEs=%s)", wl_print_wpa_ie( wpa_ie, length ));
- wrqu.data.length = strlen( msg );
- wireless_send_event( dev, IWEVCUSTOM, &wrqu, msg );
+ wrqu.data.length = wpa_ie[1] + 2;
+ wireless_send_event(dev, IWEVASSOCREQIE,
+ &wrqu, wpa_ie);
+
+ /* This bit is a hack. We send the respie
+ * event at the same time */
+ wireless_send_event(dev, IWEVASSOCRESPIE,
+ &wrqu, wpa_ie);
}
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/3] staging: wlags49_h2: Declare support for WEXT 21
2011-09-19 20:08 [PATCH 0/3] staging: wlags49_h2: Improve WEXT support David Kilroy
2011-09-19 20:08 ` [PATCH 1/3] staging: wlags49_h2: Remove old WIRELESS_EXT support David Kilroy
2011-09-19 20:08 ` [PATCH 2/3] staging: wlags49_h2: Support standard WEXT events David Kilroy
@ 2011-09-19 20:08 ` David Kilroy
2011-09-19 20:22 ` Valdis.Kletnieks
2 siblings, 1 reply; 12+ messages in thread
From: David Kilroy @ 2011-09-19 20:08 UTC (permalink / raw)
To: linux-kernel, greg; +Cc: pe1dnn, David Kilroy
There may be a few areas where we don't actually support WE21,
but by doing this it will make it easier to find those places.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
---
drivers/staging/wlags49_h2/wl_version.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/wlags49_h2/wl_version.h b/drivers/staging/wlags49_h2/wl_version.h
index 872d085..a68159a 100644
--- a/drivers/staging/wlags49_h2/wl_version.h
+++ b/drivers/staging/wlags49_h2/wl_version.h
@@ -144,7 +144,8 @@ err: define bus type;
" for " BUS_TYPE ", " \
MODULE_DATE " by " VENDOR_NAME
-#define WIRELESS_SUPPORT 15 // The version of wireless extensions we support
+/* The version of wireless extensions we support */
+#define WIRELESS_SUPPORT 21
//#define DBG_MOD_NAME DRIVER_NAME ":" BUS_TYPE ":" HW_TYPE ":" FW_TYPE
#define DBG_MOD_NAME MODULE_NAME
--
1.7.4.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] staging: wlags49_h2: Declare support for WEXT 21
2011-09-19 20:08 ` [PATCH 3/3] staging: wlags49_h2: Declare support for WEXT 21 David Kilroy
@ 2011-09-19 20:22 ` Valdis.Kletnieks
2011-09-19 20:44 ` Dave Kilroy
0 siblings, 1 reply; 12+ messages in thread
From: Valdis.Kletnieks @ 2011-09-19 20:22 UTC (permalink / raw)
To: David Kilroy; +Cc: linux-kernel, greg, pe1dnn
[-- Attachment #1: Type: text/plain, Size: 795 bytes --]
On Mon, 19 Sep 2011 21:08:16 BST, David Kilroy said:
> There may be a few areas where we don't actually support WE21,
> but by doing this it will make it easier to find those places.
I'll bite - what happens when we find such a place? Kernel fails to build, or
user has a suboptimal usage experience, or?
What are the expected chances that sticking this in linux-next for a cycle will
result in most/all of the places being found before this all appears in an
official release? I'm thinking this should probably go in linux-next right after
the next merge window closes, to maximize the chances we'll shake it
all out during almost 2 cycles before it hits the streets. (And yes, I know
it's a staging/ driver - if somebody else says "one cycle is more than enough"
I'm OK with that too...)
[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] staging: wlags49_h2: Declare support for WEXT 21
2011-09-19 20:22 ` Valdis.Kletnieks
@ 2011-09-19 20:44 ` Dave Kilroy
2011-09-20 19:52 ` Greg KH
0 siblings, 1 reply; 12+ messages in thread
From: Dave Kilroy @ 2011-09-19 20:44 UTC (permalink / raw)
To: Valdis.Kletnieks; +Cc: linux-kernel, greg, pe1dnn
On 19/09/2011 21:22, Valdis.Kletnieks@vt.edu wrote:
> On Mon, 19 Sep 2011 21:08:16 BST, David Kilroy said:
>> There may be a few areas where we don't actually support WE21,
>> but by doing this it will make it easier to find those places.
>
> I'll bite - what happens when we find such a place? Kernel fails to build, or
> user has a suboptimal usage experience, or?
The user would have a sub-optimal experience. iwconfig may not display a
few things correctly (ESSID?) in particular scenarios.
The reason I included this patch was that I'm not sure whether
wpa-supplicant requires WEXT version to be above a certain threshold to
use the events in the previous patch. I'm happy to drop this one if it
just works.
> What are the expected chances that sticking this in linux-next for a cycle will
> result in most/all of the places being found before this all appears in an
> official release? I'm thinking this should probably go in linux-next right after
> the next merge window closes, to maximize the chances we'll shake it
> all out during almost 2 cycles before it hits the streets. (And yes, I know
> it's a staging/ driver - if somebody else says "one cycle is more than enough"
> I'm OK with that too...)
This hardware is old, and as far as I can tell quite rare. I'd hope we
can get some feedback from Henk on the series before applying this patch.
Thanks,
Dave.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] staging: wlags49_h2: Declare support for WEXT 21
2011-09-19 20:44 ` Dave Kilroy
@ 2011-09-20 19:52 ` Greg KH
2011-09-20 20:15 ` Henk de Groot
0 siblings, 1 reply; 12+ messages in thread
From: Greg KH @ 2011-09-20 19:52 UTC (permalink / raw)
To: Dave Kilroy; +Cc: Valdis.Kletnieks, linux-kernel, pe1dnn
On Mon, Sep 19, 2011 at 09:44:33PM +0100, Dave Kilroy wrote:
> On 19/09/2011 21:22, Valdis.Kletnieks@vt.edu wrote:
> >On Mon, 19 Sep 2011 21:08:16 BST, David Kilroy said:
> >>There may be a few areas where we don't actually support WE21,
> >>but by doing this it will make it easier to find those places.
> >
> >I'll bite - what happens when we find such a place? Kernel fails to build, or
> >user has a suboptimal usage experience, or?
>
> The user would have a sub-optimal experience. iwconfig may not
> display a few things correctly (ESSID?) in particular scenarios.
>
> The reason I included this patch was that I'm not sure whether
> wpa-supplicant requires WEXT version to be above a certain threshold
> to use the events in the previous patch. I'm happy to drop this one
> if it just works.
>
> >What are the expected chances that sticking this in linux-next for a cycle will
> >result in most/all of the places being found before this all appears in an
> >official release? I'm thinking this should probably go in linux-next right after
> >the next merge window closes, to maximize the chances we'll shake it
> >all out during almost 2 cycles before it hits the streets. (And yes, I know
> >it's a staging/ driver - if somebody else says "one cycle is more than enough"
> >I'm OK with that too...)
>
> This hardware is old, and as far as I can tell quite rare. I'd hope
> we can get some feedback from Henk on the series before applying
> this patch.
I've applied the first 2 of these, if you want me to apply the third
one, please resend it after it's been tested by someone.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] staging: wlags49_h2: Declare support for WEXT 21
2011-09-20 19:52 ` Greg KH
@ 2011-09-20 20:15 ` Henk de Groot
2011-09-20 21:02 ` Greg KH
0 siblings, 1 reply; 12+ messages in thread
From: Henk de Groot @ 2011-09-20 20:15 UTC (permalink / raw)
To: Greg KH; +Cc: Dave Kilroy, Valdis.Kletnieks, linux-kernel, pe1dnn
Hello Greg,
Op 20-9-2011 21:52, Greg KH schreef:
> I've applied the first 2 of these, if you want me to apply the third
> one, please resend it after it's been tested by someone.
>
> thanks,
>
> greg k-h
>
I have the patched driver running on the 2.6.38-11-generic #48 Ubuntu
11.04 Natty Narwhal kernel, which, as far as I could determine, uses WEXT
version 22. The patch didn't improve anything other than the code itself,
but didn't break anything either. Tested with WEP accesspoint, WPA still
not functional. The still appears to be stable.
Henk.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] staging: wlags49_h2: Declare support for WEXT 21
2011-09-20 20:15 ` Henk de Groot
@ 2011-09-20 21:02 ` Greg KH
2011-09-21 17:58 ` Henk de Groot
0 siblings, 1 reply; 12+ messages in thread
From: Greg KH @ 2011-09-20 21:02 UTC (permalink / raw)
To: Henk de Groot; +Cc: Dave Kilroy, Valdis.Kletnieks, linux-kernel, pe1dnn
On Tue, Sep 20, 2011 at 10:15:55PM +0200, Henk de Groot wrote:
> Hello Greg,
>
> Op 20-9-2011 21:52, Greg KH schreef:
> >I've applied the first 2 of these, if you want me to apply the third
> >one, please resend it after it's been tested by someone.
> >
> >thanks,
> >
> >greg k-h
> >
>
> I have the patched driver running on the 2.6.38-11-generic #48
> Ubuntu 11.04 Natty Narwhal kernel, which, as far as I could
> determine, uses WEXT version 22. The patch didn't improve anything
> other than the code itself, but didn't break anything either. Tested
> with WEP accesspoint, WPA still not functional. The still appears to
> be stable.
So, should I apply this patch or not?
confused,
greg k-h
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] staging: wlags49_h2: Declare support for WEXT 21
2011-09-20 21:02 ` Greg KH
@ 2011-09-21 17:58 ` Henk de Groot
2011-09-21 18:20 ` Greg KH
0 siblings, 1 reply; 12+ messages in thread
From: Henk de Groot @ 2011-09-21 17:58 UTC (permalink / raw)
To: Greg KH; +Cc: Dave Kilroy, Valdis.Kletnieks, linux-kernel
Op 20-9-2011 23:02, Greg KH schreef:
> So, should I apply this patch or not?
>
> confused,
>
> greg k-h
It doesn't break anything and is was there to make sure the previous
patches work, so yes, why not.
Henk.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] staging: wlags49_h2: Declare support for WEXT 21
2011-09-21 17:58 ` Henk de Groot
@ 2011-09-21 18:20 ` Greg KH
2011-09-21 18:26 ` Dave Kilroy
0 siblings, 1 reply; 12+ messages in thread
From: Greg KH @ 2011-09-21 18:20 UTC (permalink / raw)
To: Henk de Groot; +Cc: Dave Kilroy, Valdis.Kletnieks, linux-kernel
On Wed, Sep 21, 2011 at 07:58:02PM +0200, Henk de Groot wrote:
> Op 20-9-2011 23:02, Greg KH schreef:
> >So, should I apply this patch or not?
> >
> >confused,
> >
> >greg k-h
>
> It doesn't break anything and is was there to make sure the previous
> patches work, so yes, why not.
Ok, can someone please resend it then, it's long-gone from my patch
queue at this point in time.
greg k-h
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] staging: wlags49_h2: Declare support for WEXT 21
2011-09-21 18:20 ` Greg KH
@ 2011-09-21 18:26 ` Dave Kilroy
0 siblings, 0 replies; 12+ messages in thread
From: Dave Kilroy @ 2011-09-21 18:26 UTC (permalink / raw)
To: Greg KH; +Cc: Henk de Groot, Valdis.Kletnieks, linux-kernel
On 21/09/2011 19:20, Greg KH wrote:
> On Wed, Sep 21, 2011 at 07:58:02PM +0200, Henk de Groot wrote:
>> Op 20-9-2011 23:02, Greg KH schreef:
>>> So, should I apply this patch or not?
>>>
>>> confused,
>>>
>>> greg k-h
>>
>> It doesn't break anything and is was there to make sure the previous
>> patches work, so yes, why not.
>
> Ok, can someone please resend it then, it's long-gone from my patch
> queue at this point in time.
>
> greg k-h
Thanks Greg. I'll take the time to find out what's actually changed in
the WEXT versions, and resend towards the end of this week with any
necessary fixes.
Dave.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-09-21 18:26 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-19 20:08 [PATCH 0/3] staging: wlags49_h2: Improve WEXT support David Kilroy
2011-09-19 20:08 ` [PATCH 1/3] staging: wlags49_h2: Remove old WIRELESS_EXT support David Kilroy
2011-09-19 20:08 ` [PATCH 2/3] staging: wlags49_h2: Support standard WEXT events David Kilroy
2011-09-19 20:08 ` [PATCH 3/3] staging: wlags49_h2: Declare support for WEXT 21 David Kilroy
2011-09-19 20:22 ` Valdis.Kletnieks
2011-09-19 20:44 ` Dave Kilroy
2011-09-20 19:52 ` Greg KH
2011-09-20 20:15 ` Henk de Groot
2011-09-20 21:02 ` Greg KH
2011-09-21 17:58 ` Henk de Groot
2011-09-21 18:20 ` Greg KH
2011-09-21 18:26 ` Dave Kilroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).