aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2007-08-02 13:12:45 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:50:08 -0400
commita2235ed40210081e51bec4bb1be64e4b3511501e (patch)
treed32435aca2751a696813098716e46dd5aab70015 /drivers/net/wireless
parent4f2fdaaf0e4209bff3b18dc14c915b61f5fa5cd2 (diff)
[PATCH] libertas: remove bss_descriptior->networktsf
This value was parsed out, but then nowhere used ... except in some debugfs output. I can't imagine anyone wanting to use this value for anything real (as no other driver exports it), so bye-bye. Along this, made the columns of /sys/kernel/debug/libertas_wireless/*/getscantable align again. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/libertas/debugfs.c7
-rw-r--r--drivers/net/wireless/libertas/scan.c69
-rw-r--r--drivers/net/wireless/libertas/scan.h4
3 files changed, 5 insertions, 75 deletions
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index 4b9533a66511..63e747ac49d0 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -66,7 +66,7 @@ static ssize_t libertas_getscantable(struct file *file, char __user *userbuf,
66 struct bss_descriptor * iter_bss; 66 struct bss_descriptor * iter_bss;
67 67
68 pos += snprintf(buf+pos, len-pos, 68 pos += snprintf(buf+pos, len-pos,
69 "# | ch | ss | bssid | cap | TSF | Qual | SSID \n"); 69 "# | ch | rssi | bssid | cap | Qual | SSID \n");
70 70
71 mutex_lock(&priv->adapter->lock); 71 mutex_lock(&priv->adapter->lock);
72 list_for_each_entry (iter_bss, &priv->adapter->network_list, list) { 72 list_for_each_entry (iter_bss, &priv->adapter->network_list, list) {
@@ -75,15 +75,14 @@ static ssize_t libertas_getscantable(struct file *file, char __user *userbuf,
75 u16 spectrum_mgmt = (iter_bss->capability & WLAN_CAPABILITY_SPECTRUM_MGMT); 75 u16 spectrum_mgmt = (iter_bss->capability & WLAN_CAPABILITY_SPECTRUM_MGMT);
76 76
77 pos += snprintf(buf+pos, len-pos, 77 pos += snprintf(buf+pos, len-pos,
78 "%02u| %03d | %03ld | " MAC_FMT " |", 78 "%02u| %03d | %04ld | " MAC_FMT " |",
79 numscansdone, iter_bss->channel, iter_bss->rssi, 79 numscansdone, iter_bss->channel, iter_bss->rssi,
80 MAC_ARG(iter_bss->bssid)); 80 MAC_ARG(iter_bss->bssid));
81 pos += snprintf(buf+pos, len-pos, " %04x-", iter_bss->capability); 81 pos += snprintf(buf+pos, len-pos, " %04x-", iter_bss->capability);
82 pos += snprintf(buf+pos, len-pos, "%c%c%c |", 82 pos += snprintf(buf+pos, len-pos, "%c%c%c |",
83 ibss ? 'A' : 'I', privacy ? 'P' : ' ', 83 ibss ? 'A' : 'I', privacy ? 'P' : ' ',
84 spectrum_mgmt ? 'S' : ' '); 84 spectrum_mgmt ? 'S' : ' ');
85 pos += snprintf(buf+pos, len-pos, " %08llx |", iter_bss->networktsf); 85 pos += snprintf(buf+pos, len-pos, " %04d |", SCAN_RSSI(iter_bss->rssi));
86 pos += snprintf(buf+pos, len-pos, " %d |", SCAN_RSSI(iter_bss->rssi));
87 pos += snprintf(buf+pos, len-pos, " %s\n", 86 pos += snprintf(buf+pos, len-pos, " %s\n",
88 escape_essid(iter_bss->ssid, iter_bss->ssid_len)); 87 escape_essid(iter_bss->ssid, iter_bss->ssid_len));
89 88
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index 4f621a6ec976..aea2e90b5558 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -837,58 +837,6 @@ out:
837} 837}
838 838
839/** 839/**
840 * @brief Inspect the scan response buffer for pointers to expected TLVs
841 *
842 * TLVs can be included at the end of the scan response BSS information.
843 * Parse the data in the buffer for pointers to TLVs that can potentially
844 * be passed back in the response
845 *
846 * @param ptlv Pointer to the start of the TLV buffer to parse
847 * @param tlvbufsize size of the TLV buffer
848 * @param ptsftlv Output parameter: Pointer to the TSF TLV if found
849 *
850 * @return void
851 */
852static
853void wlan_ret_802_11_scan_get_tlv_ptrs(struct mrvlietypes_data * ptlv,
854 int tlvbufsize,
855 struct mrvlietypes_tsftimestamp ** ptsftlv)
856{
857 struct mrvlietypes_data *pcurrenttlv;
858 int tlvbufleft;
859 u16 tlvtype;
860 u16 tlvlen;
861
862 pcurrenttlv = ptlv;
863 tlvbufleft = tlvbufsize;
864 *ptsftlv = NULL;
865
866 lbs_deb_scan("SCAN_RESP: tlvbufsize = %d\n", tlvbufsize);
867 lbs_deb_hex(LBS_DEB_SCAN, "SCAN_RESP: TLV Buf", (u8 *) ptlv, tlvbufsize);
868
869 while (tlvbufleft >= sizeof(struct mrvlietypesheader)) {
870 tlvtype = le16_to_cpu(pcurrenttlv->header.type);
871 tlvlen = le16_to_cpu(pcurrenttlv->header.len);
872
873 switch (tlvtype) {
874 case TLV_TYPE_TSFTIMESTAMP:
875 *ptsftlv = (struct mrvlietypes_tsftimestamp *) pcurrenttlv;
876 break;
877
878 default:
879 lbs_deb_scan("SCAN_RESP: Unhandled TLV = %d\n",
880 tlvtype);
881 /* Give up, this seems corrupted */
882 return;
883 } /* switch */
884
885 tlvbufleft -= (sizeof(ptlv->header) + tlvlen);
886 pcurrenttlv =
887 (struct mrvlietypes_data *) (pcurrenttlv->Data + tlvlen);
888 } /* while */
889}
890
891/**
892 * @brief Interpret a BSS scan response returned from the firmware 840 * @brief Interpret a BSS scan response returned from the firmware
893 * 841 *
894 * Parse the various fixed fields and IEs passed back for a a BSS probe 842 * Parse the various fixed fields and IEs passed back for a a BSS probe
@@ -1684,8 +1632,6 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
1684{ 1632{
1685 wlan_adapter *adapter = priv->adapter; 1633 wlan_adapter *adapter = priv->adapter;
1686 struct cmd_ds_802_11_scan_rsp *pscan; 1634 struct cmd_ds_802_11_scan_rsp *pscan;
1687 struct mrvlietypes_data *ptlv;
1688 struct mrvlietypes_tsftimestamp *ptsftlv;
1689 struct bss_descriptor * iter_bss; 1635 struct bss_descriptor * iter_bss;
1690 struct bss_descriptor * safe; 1636 struct bss_descriptor * safe;
1691 u8 *pbssinfo; 1637 u8 *pbssinfo;
@@ -1734,11 +1680,6 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
1734 + sizeof(pscan->nr_sets) 1680 + sizeof(pscan->nr_sets)
1735 + S_DS_GEN); 1681 + S_DS_GEN);
1736 1682
1737 ptlv = (struct mrvlietypes_data *) (pscan->bssdesc_and_tlvbuffer + bytesleft);
1738
1739 /* Search the TLV buffer space in the scan response for any valid TLVs */
1740 wlan_ret_802_11_scan_get_tlv_ptrs(ptlv, tlvbufsize, &ptsftlv);
1741
1742 /* 1683 /*
1743 * Process each scan response returned (pscan->nr_sets). Save 1684 * Process each scan response returned (pscan->nr_sets). Save
1744 * the information in the newbssentry and then insert into the 1685 * the information in the newbssentry and then insert into the
@@ -1791,16 +1732,6 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
1791 new.bssid[0], new.bssid[1], new.bssid[2], 1732 new.bssid[0], new.bssid[1], new.bssid[2],
1792 new.bssid[3], new.bssid[4], new.bssid[5]); 1733 new.bssid[3], new.bssid[4], new.bssid[5]);
1793 1734
1794 /*
1795 * If the TSF TLV was appended to the scan results, save the
1796 * this entries TSF value in the networktsf field. The
1797 * networktsf is the firmware's TSF value at the time the
1798 * beacon or probe response was received.
1799 */
1800 if (ptsftlv) {
1801 new.networktsf = le64_to_cpup(&ptsftlv->tsftable[idx]);
1802 }
1803
1804 /* Copy the locally created newbssentry to the scan table */ 1735 /* Copy the locally created newbssentry to the scan table */
1805 memcpy(found, &new, offsetof(struct bss_descriptor, list)); 1736 memcpy(found, &new, offsetof(struct bss_descriptor, list));
1806 } 1737 }
diff --git a/drivers/net/wireless/libertas/scan.h b/drivers/net/wireless/libertas/scan.h
index def0db5c4e61..28decf391531 100644
--- a/drivers/net/wireless/libertas/scan.h
+++ b/drivers/net/wireless/libertas/scan.h
@@ -151,7 +151,9 @@ struct bss_descriptor {
151 151
152 u32 atimwindow; 152 u32 atimwindow;
153 153
154 /* IW_MODE_AUTO, IW_MODE_ADHOC, IW_MODE_INFRA */
154 u8 mode; 155 u8 mode;
156
155 /* zero-terminated array of supported data rates */ 157 /* zero-terminated array of supported data rates */
156 u8 rates[MAX_RATES + 1]; 158 u8 rates[MAX_RATES + 1];
157 159
@@ -161,8 +163,6 @@ struct bss_descriptor {
161 union ieeetypes_phyparamset phyparamset; 163 union ieeetypes_phyparamset phyparamset;
162 union IEEEtypes_ssparamset ssparamset; 164 union IEEEtypes_ssparamset ssparamset;
163 165
164 u64 networktsf; //!< TSF timestamp from the current firmware TSF
165
166 struct ieeetypes_countryinfofullset countryinfo; 166 struct ieeetypes_countryinfofullset countryinfo;
167 167
168 u8 wpa_ie[MAX_WPA_IE_LEN]; 168 u8 wpa_ie[MAX_WPA_IE_LEN];