aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2007-11-28 11:29:36 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:04:57 -0500
commitdd1d12dabfeb123881b0c813d0b7d3585312bacd (patch)
treef7b9d23da8393d34a46400f7ffb36cde6bce8ce6 /drivers/net/wireless
parent01affb653077d8581552d566276b405237636e5c (diff)
libertas: remove numprobes
Remove the ability to specify number of probes via debugfs Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/libertas/README21
-rw-r--r--drivers/net/wireless/libertas/debugfs.c18
-rw-r--r--drivers/net/wireless/libertas/scan.c20
-rw-r--r--drivers/net/wireless/libertas/scan.h5
4 files changed, 11 insertions, 53 deletions
diff --git a/drivers/net/wireless/libertas/README b/drivers/net/wireless/libertas/README
index 0b133ce63805..05cfc29e43c3 100644
--- a/drivers/net/wireless/libertas/README
+++ b/drivers/net/wireless/libertas/README
@@ -201,15 +201,14 @@ setuserscan
201 ssid="[SSID]" specify a SSID filter for the scan 201 ssid="[SSID]" specify a SSID filter for the scan
202 keep=[0 or 1] keep the previous scan results (1), discard (0) 202 keep=[0 or 1] keep the previous scan results (1), discard (0)
203 dur=[scan time] time to scan for each channel in milliseconds 203 dur=[scan time] time to scan for each channel in milliseconds
204 probes=[#] number of probe requests to send on each chan
205 type=[1,2,3] BSS type: 1 (Infra), 2(Adhoc), 3(Any) 204 type=[1,2,3] BSS type: 1 (Infra), 2(Adhoc), 3(Any)
206 205
207 Any combination of the above arguments can be supplied on the command line. 206 Any combination of the above arguments can be supplied on the command
208 If the chan token is absent, a full channel scan will be completed by 207 line. If the chan token is absent, a full channel scan will be
209 the driver. If the dur or probes tokens are absent, the driver default 208 completed by the driver. If dur tokens are absent, the driver default
210 setting will be used. The bssid and ssid fields, if blank, 209 setting will be used. The bssid and ssid fields, if blank, will
211 will produce an unfiltered scan. The type field will default to 3 (Any) 210 produce an unfiltered scan. The type field will default to 3 (Any) and
212 and the keep field will default to 0 (Discard). 211 the keep field will default to 0 (Discard).
213 212
214 Examples: 213 Examples:
215 1) Perform an active scan on channels 1, 6, and 11 in the 'g' band: 214 1) Perform an active scan on channels 1, 6, and 11 in the 'g' band:
@@ -230,10 +229,10 @@ setuserscan
230 the current scan table intact, update existing or append new scan data: 229 the current scan table intact, update existing or append new scan data:
231 echo "bssid=00:50:43:20:12:82 keep=1" > setuserscan 230 echo "bssid=00:50:43:20:12:82 keep=1" > setuserscan
232 231
233 6) Scan channel 6, for all infrastructure networks, sending two probe 232 6) Scan channel 6, for all infrastructure networks.
234 requests. Keep the previous scan table intact. Update any duplicate 233 Keep the previous scan table intact. Update any duplicate BSSID/SSID
235 BSSID/SSID matches with the new scan data: 234 matches with the new scan data:
236 echo "chan=6g type=1 probes=2 keep=1" > setuserscan 235 echo "chan=6g type=1 keep=1" > setuserscan
237 236
238 All entries in the scan table (not just the new scan data when keep=1) 237 All entries in the scan table (not just the new scan data when keep=1)
239 will be displayed upon completion by use of the getscantable ioctl. 238 will be displayed upon completion by use of the getscantable ioctl.
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index de768de45848..e79236cfdbc1 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -300,23 +300,6 @@ static int lbs_parse_dur(char *buf, size_t count,
300 return val; 300 return val;
301} 301}
302 302
303static void lbs_parse_probes(char *buf, size_t count,
304 struct lbs_ioctl_user_scan_cfg *scan_cfg)
305{
306 char *hold;
307 int val;
308
309 hold = strstr(buf, "probes=");
310 if (!hold)
311 return;
312 hold += 7;
313 sscanf(hold, "%d", &val);
314
315 scan_cfg->numprobes = val;
316
317 return;
318}
319
320static void lbs_parse_type(char *buf, size_t count, 303static void lbs_parse_type(char *buf, size_t count,
321 struct lbs_ioctl_user_scan_cfg *scan_cfg) 304 struct lbs_ioctl_user_scan_cfg *scan_cfg)
322{ 305{
@@ -368,7 +351,6 @@ static ssize_t lbs_setuserscan(struct file *file,
368 scan_cfg->clear_bssid = lbs_parse_clear(buf, count, "clear_bssid="); 351 scan_cfg->clear_bssid = lbs_parse_clear(buf, count, "clear_bssid=");
369 lbs_parse_ssid(buf, count, scan_cfg); 352 lbs_parse_ssid(buf, count, scan_cfg);
370 scan_cfg->clear_ssid = lbs_parse_clear(buf, count, "clear_ssid="); 353 scan_cfg->clear_ssid = lbs_parse_clear(buf, count, "clear_ssid=");
371 lbs_parse_probes(buf, count, scan_cfg);
372 lbs_parse_type(buf, count, scan_cfg); 354 lbs_parse_type(buf, count, scan_cfg);
373 355
374 lbs_scan_networks(priv, scan_cfg, 1); 356 lbs_scan_networks(priv, scan_cfg, 1);
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index 4e465bb4fd6f..de9c548cb6a5 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -41,7 +41,6 @@
41 41
42//! Maximum memory needed for a lbs_scan_cmd_config with all TLVs at max 42//! Maximum memory needed for a lbs_scan_cmd_config with all TLVs at max
43#define MAX_SCAN_CFG_ALLOC (sizeof(struct lbs_scan_cmd_config) \ 43#define MAX_SCAN_CFG_ALLOC (sizeof(struct lbs_scan_cmd_config) \
44 + sizeof(struct mrvlietypes_numprobes) \
45 + CHAN_TLV_MAX_SIZE \ 44 + CHAN_TLV_MAX_SIZE \
46 + SSID_TLV_MAX_SIZE) 45 + SSID_TLV_MAX_SIZE)
47 46
@@ -385,7 +384,6 @@ void lbs_scan_worker(struct work_struct *work)
385 * - channel list 384 * - channel list
386 * 385 *
387 * If the SSID or BSSID filter is not present, disable/clear the filter. 386 * If the SSID or BSSID filter is not present, disable/clear the filter.
388 * If the number of probes is not set, use the adapter default setting
389 * Qualify the channel 387 * Qualify the channel
390 * 388 *
391 * @param priv A pointer to struct lbs_private structure 389 * @param priv A pointer to struct lbs_private structure
@@ -415,11 +413,9 @@ lbs_scan_setup_scan_config(struct lbs_private *priv,
415 u8 * pfilteredscan, 413 u8 * pfilteredscan,
416 u8 * pscancurrentonly) 414 u8 * pscancurrentonly)
417{ 415{
418 struct mrvlietypes_numprobes *pnumprobestlv;
419 struct mrvlietypes_ssidparamset *pssidtlv; 416 struct mrvlietypes_ssidparamset *pssidtlv;
420 struct lbs_scan_cmd_config *pscancfgout = NULL; 417 struct lbs_scan_cmd_config *pscancfgout = NULL;
421 u8 *ptlvpos; 418 u8 *ptlvpos;
422 u16 numprobes;
423 int chanidx; 419 int chanidx;
424 int scantype; 420 int scantype;
425 int scandur; 421 int scandur;
@@ -468,9 +464,6 @@ lbs_scan_setup_scan_config(struct lbs_private *priv,
468 pscancfgout->bsstype = 464 pscancfgout->bsstype =
469 puserscanin->bsstype ? puserscanin->bsstype : CMD_BSS_TYPE_ANY; 465 puserscanin->bsstype ? puserscanin->bsstype : CMD_BSS_TYPE_ANY;
470 466
471 /* Set the number of probes to send, use adapter setting if unset */
472 numprobes = puserscanin->numprobes ? puserscanin->numprobes : 0;
473
474 /* 467 /*
475 * Set the BSSID filter to the incoming configuration, 468 * Set the BSSID filter to the incoming configuration,
476 * if non-zero. If not set, it will remain disabled (all zeros). 469 * if non-zero. If not set, it will remain disabled (all zeros).
@@ -502,22 +495,11 @@ lbs_scan_setup_scan_config(struct lbs_private *priv,
502 } 495 }
503 } else { 496 } else {
504 pscancfgout->bsstype = CMD_BSS_TYPE_ANY; 497 pscancfgout->bsstype = CMD_BSS_TYPE_ANY;
505 numprobes = 0;
506 }
507
508 /* If the input config or adapter has the number of Probes set, add tlv */
509 if (numprobes) {
510 pnumprobestlv = (struct mrvlietypes_numprobes *) ptlvpos;
511 pnumprobestlv->header.type = cpu_to_le16(TLV_TYPE_NUMPROBES);
512 pnumprobestlv->header.len = cpu_to_le16(2);
513 pnumprobestlv->numprobes = cpu_to_le16(numprobes);
514
515 ptlvpos += sizeof(*pnumprobestlv);
516 } 498 }
517 499
518 /* 500 /*
519 * Set the output for the channel TLV to the address in the tlv buffer 501 * Set the output for the channel TLV to the address in the tlv buffer
520 * past any TLVs that were added in this fuction (SSID, numprobes). 502 * past any TLVs that were added in this fuction (SSID).
521 * channel TLVs will be added past this for each scan command, preserving 503 * channel TLVs will be added past this for each scan command, preserving
522 * the TLVs that were previously added. 504 * the TLVs that were previously added.
523 */ 505 */
diff --git a/drivers/net/wireless/libertas/scan.h b/drivers/net/wireless/libertas/scan.h
index b23144814677..e420cd9217cd 100644
--- a/drivers/net/wireless/libertas/scan.h
+++ b/drivers/net/wireless/libertas/scan.h
@@ -105,11 +105,6 @@ struct lbs_ioctl_user_scan_cfg {
105 */ 105 */
106 u8 bsstype; 106 u8 bsstype;
107 107
108 /**
109 * @brief Configure the number of probe requests for active chan scans
110 */
111 u8 numprobes;
112
113 /** 108 /**
114 * @brief BSSID filter sent in the firmware command to limit the results 109 * @brief BSSID filter sent in the firmware command to limit the results
115 */ 110 */