Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66486
b: refs/heads/master
c: a2235ed
h: refs/heads/master
v: v3
  • Loading branch information
Holger Schurig authored and David S. Miller committed Oct 10, 2007
1 parent 9836d30 commit a2760e9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 76 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4f2fdaaf0e4209bff3b18dc14c915b61f5fa5cd2
refs/heads/master: a2235ed40210081e51bec4bb1be64e4b3511501e
7 changes: 3 additions & 4 deletions trunk/drivers/net/wireless/libertas/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static ssize_t libertas_getscantable(struct file *file, char __user *userbuf,
struct bss_descriptor * iter_bss;

pos += snprintf(buf+pos, len-pos,
"# | ch | ss | bssid | cap | TSF | Qual | SSID \n");
"# | ch | rssi | bssid | cap | Qual | SSID \n");

mutex_lock(&priv->adapter->lock);
list_for_each_entry (iter_bss, &priv->adapter->network_list, list) {
Expand All @@ -75,15 +75,14 @@ static ssize_t libertas_getscantable(struct file *file, char __user *userbuf,
u16 spectrum_mgmt = (iter_bss->capability & WLAN_CAPABILITY_SPECTRUM_MGMT);

pos += snprintf(buf+pos, len-pos,
"%02u| %03d | %03ld | " MAC_FMT " |",
"%02u| %03d | %04ld | " MAC_FMT " |",
numscansdone, iter_bss->channel, iter_bss->rssi,
MAC_ARG(iter_bss->bssid));
pos += snprintf(buf+pos, len-pos, " %04x-", iter_bss->capability);
pos += snprintf(buf+pos, len-pos, "%c%c%c |",
ibss ? 'A' : 'I', privacy ? 'P' : ' ',
spectrum_mgmt ? 'S' : ' ');
pos += snprintf(buf+pos, len-pos, " %08llx |", iter_bss->networktsf);
pos += snprintf(buf+pos, len-pos, " %d |", SCAN_RSSI(iter_bss->rssi));
pos += snprintf(buf+pos, len-pos, " %04d |", SCAN_RSSI(iter_bss->rssi));
pos += snprintf(buf+pos, len-pos, " %s\n",
escape_essid(iter_bss->ssid, iter_bss->ssid_len));

Expand Down
69 changes: 0 additions & 69 deletions trunk/drivers/net/wireless/libertas/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,58 +836,6 @@ int wlan_scan_networks(wlan_private * priv,
return ret;
}

/**
* @brief Inspect the scan response buffer for pointers to expected TLVs
*
* TLVs can be included at the end of the scan response BSS information.
* Parse the data in the buffer for pointers to TLVs that can potentially
* be passed back in the response
*
* @param ptlv Pointer to the start of the TLV buffer to parse
* @param tlvbufsize size of the TLV buffer
* @param ptsftlv Output parameter: Pointer to the TSF TLV if found
*
* @return void
*/
static
void wlan_ret_802_11_scan_get_tlv_ptrs(struct mrvlietypes_data * ptlv,
int tlvbufsize,
struct mrvlietypes_tsftimestamp ** ptsftlv)
{
struct mrvlietypes_data *pcurrenttlv;
int tlvbufleft;
u16 tlvtype;
u16 tlvlen;

pcurrenttlv = ptlv;
tlvbufleft = tlvbufsize;
*ptsftlv = NULL;

lbs_deb_scan("SCAN_RESP: tlvbufsize = %d\n", tlvbufsize);
lbs_deb_hex(LBS_DEB_SCAN, "SCAN_RESP: TLV Buf", (u8 *) ptlv, tlvbufsize);

while (tlvbufleft >= sizeof(struct mrvlietypesheader)) {
tlvtype = le16_to_cpu(pcurrenttlv->header.type);
tlvlen = le16_to_cpu(pcurrenttlv->header.len);

switch (tlvtype) {
case TLV_TYPE_TSFTIMESTAMP:
*ptsftlv = (struct mrvlietypes_tsftimestamp *) pcurrenttlv;
break;

default:
lbs_deb_scan("SCAN_RESP: Unhandled TLV = %d\n",
tlvtype);
/* Give up, this seems corrupted */
return;
} /* switch */

tlvbufleft -= (sizeof(ptlv->header) + tlvlen);
pcurrenttlv =
(struct mrvlietypes_data *) (pcurrenttlv->Data + tlvlen);
} /* while */
}

/**
* @brief Interpret a BSS scan response returned from the firmware
*
Expand Down Expand Up @@ -1684,8 +1632,6 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
{
wlan_adapter *adapter = priv->adapter;
struct cmd_ds_802_11_scan_rsp *pscan;
struct mrvlietypes_data *ptlv;
struct mrvlietypes_tsftimestamp *ptsftlv;
struct bss_descriptor * iter_bss;
struct bss_descriptor * safe;
u8 *pbssinfo;
Expand Down Expand Up @@ -1734,11 +1680,6 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
+ sizeof(pscan->nr_sets)
+ S_DS_GEN);

ptlv = (struct mrvlietypes_data *) (pscan->bssdesc_and_tlvbuffer + bytesleft);

/* Search the TLV buffer space in the scan response for any valid TLVs */
wlan_ret_802_11_scan_get_tlv_ptrs(ptlv, tlvbufsize, &ptsftlv);

/*
* Process each scan response returned (pscan->nr_sets). Save
* the information in the newbssentry and then insert into the
Expand Down Expand Up @@ -1791,16 +1732,6 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
new.bssid[0], new.bssid[1], new.bssid[2],
new.bssid[3], new.bssid[4], new.bssid[5]);

/*
* If the TSF TLV was appended to the scan results, save the
* this entries TSF value in the networktsf field. The
* networktsf is the firmware's TSF value at the time the
* beacon or probe response was received.
*/
if (ptsftlv) {
new.networktsf = le64_to_cpup(&ptsftlv->tsftable[idx]);
}

/* Copy the locally created newbssentry to the scan table */
memcpy(found, &new, offsetof(struct bss_descriptor, list));
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/libertas/scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ struct bss_descriptor {

u32 atimwindow;

/* IW_MODE_AUTO, IW_MODE_ADHOC, IW_MODE_INFRA */
u8 mode;

/* zero-terminated array of supported data rates */
u8 rates[MAX_RATES + 1];

Expand All @@ -161,8 +163,6 @@ struct bss_descriptor {
union ieeetypes_phyparamset phyparamset;
union IEEEtypes_ssparamset ssparamset;

u64 networktsf; //!< TSF timestamp from the current firmware TSF

struct ieeetypes_countryinfofullset countryinfo;

u8 wpa_ie[MAX_WPA_IE_LEN];
Expand Down

0 comments on commit a2760e9

Please sign in to comment.