瀏覽代碼

qcacld-3.0: Remove obsolete STA support for SIOCGIWRANGE

At one time the predecessor to the current driver was managed via
wireless extensions, but now the driver is managed by cfg80211. The
STA implementation of SIOCGIWRANGE should no longer be used, so remove
it.

Change-Id: I428e350e43cae5b8a67e8edfedc156102d9d7e3c
CRs-Fixed: 2211121
Jeff Johnson 7 年之前
父節點
當前提交
980e6a1922
共有 1 個文件被更改,包括 1 次插入176 次删除
  1. 1 176
      core/hdd/src/wlan_hdd_wext.c

+ 1 - 176
core/hdd/src/wlan_hdd_wext.c

@@ -4513,181 +4513,6 @@ static int iw_get_name(struct net_device *dev,
 	return ret;
 }
 
-/**
- * __iw_get_range() - SIOCGIWRANGE ioctl handler
- * @dev: device upon which the ioctl was received
- * @info: ioctl request information
- * @wrqu: ioctl request data
- * @extra: ioctl extra data
- *
- * Return: 0 on success, non-zero on error
- */
-static int __iw_get_range(struct net_device *dev, struct iw_request_info *info,
-			  union iwreq_data *wrqu, char *extra)
-{
-	struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
-	tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter);
-	struct iw_range *range = (struct iw_range *)extra;
-
-	uint8_t channels[WNI_CFG_VALID_CHANNEL_LIST_LEN];
-
-	uint32_t num_channels = sizeof(channels);
-	uint8_t supp_rates[WNI_CFG_SUPPORTED_RATES_11A_LEN];
-	uint32_t a_len;
-	uint32_t b_len;
-	uint32_t active_phy_mode = 0;
-	uint8_t index = 0, i;
-	struct hdd_context *hdd_ctx;
-	int ret;
-
-	hdd_enter_dev(dev);
-
-	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-	ret =  wlan_hdd_validate_context(hdd_ctx);
-	if (0 != ret)
-		return ret;
-
-	ret = hdd_check_standard_wext_control(hdd_ctx, info);
-	if (0 != ret)
-		return ret;
-
-	wrqu->data.length = sizeof(struct iw_range);
-	memset(range, 0, sizeof(struct iw_range));
-
-
-	/*Get the phy mode */
-	if (sme_cfg_get_int(hHal,
-			    WNI_CFG_DOT11_MODE,
-			    &active_phy_mode) == QDF_STATUS_SUCCESS) {
-		hdd_debug("active_phy_mode = %d", active_phy_mode);
-
-		if (active_phy_mode == WNI_CFG_DOT11_MODE_11A
-		    || active_phy_mode == WNI_CFG_DOT11_MODE_11G) {
-			/*Get the supported rates for 11G band */
-			a_len = WNI_CFG_SUPPORTED_RATES_11A_LEN;
-			if (sme_cfg_get_str(hHal,
-					    WNI_CFG_SUPPORTED_RATES_11A,
-					    supp_rates,
-					    &a_len) == QDF_STATUS_SUCCESS) {
-				if (a_len > WNI_CFG_SUPPORTED_RATES_11A_LEN)
-					a_len = WNI_CFG_SUPPORTED_RATES_11A_LEN;
-
-				for (i = 0; i < a_len; i++) {
-					range->bitrate[i] =
-						((supp_rates[i] & 0x7F) / 2) *
-						1000000;
-				}
-				range->num_bitrates = a_len;
-			} else {
-				return -EIO;
-			}
-		} else if (active_phy_mode == WNI_CFG_DOT11_MODE_11B) {
-			/*Get the supported rates for 11B band */
-			b_len = WNI_CFG_SUPPORTED_RATES_11B_LEN;
-			if (sme_cfg_get_str(hHal,
-					    WNI_CFG_SUPPORTED_RATES_11B,
-					    supp_rates,
-					    &b_len) == QDF_STATUS_SUCCESS) {
-				if (b_len > WNI_CFG_SUPPORTED_RATES_11B_LEN)
-					b_len = WNI_CFG_SUPPORTED_RATES_11B_LEN;
-
-				for (i = 0; i < b_len; i++) {
-					range->bitrate[i] =
-						((supp_rates[i] & 0x7F) / 2) *
-						1000000;
-				}
-				range->num_bitrates = b_len;
-			} else {
-				return -EIO;
-			}
-		}
-	}
-
-	range->max_rts = WNI_CFG_RTS_THRESHOLD_STAMAX;
-	range->min_frag = WNI_CFG_FRAGMENTATION_THRESHOLD_STAMIN;
-	range->max_frag = WNI_CFG_FRAGMENTATION_THRESHOLD_STAMAX;
-
-	range->encoding_size[0] = 5;
-	range->encoding_size[1] = 13;
-	range->num_encoding_sizes = 2;
-	range->max_encoding_tokens = MAX_WEP_KEYS;
-
-	/* we support through Wireless Extensions 22 */
-	range->we_version_compiled = WIRELESS_EXT;
-	range->we_version_source = 22;
-
-	/*Supported Channels and Frequencies */
-	if (sme_cfg_get_str
-		    ((hHal), WNI_CFG_VALID_CHANNEL_LIST, channels,
-		    &num_channels) != QDF_STATUS_SUCCESS) {
-		hdd_err("Failed to get ini parameter, WNI_CFG_VALID_CHANNEL_LIST");
-		return -EIO;
-	}
-	if (num_channels > IW_MAX_FREQUENCIES)
-		num_channels = IW_MAX_FREQUENCIES;
-
-	range->num_channels = num_channels;
-	range->num_frequency = num_channels;
-
-	for (index = 0; index < num_channels; index++) {
-		uint32_t frq_indx = 0;
-
-		range->freq[index].i = channels[index];
-		while (frq_indx < FREQ_CHAN_MAP_TABLE_SIZE) {
-			if (channels[index] == freq_chan_map[frq_indx].chan) {
-				range->freq[index].m =
-					freq_chan_map[frq_indx].freq * 100000;
-				range->freq[index].e = 1;
-				break;
-			}
-			frq_indx++;
-		}
-	}
-
-	/* Event capability (kernel + driver) */
-	range->event_capa[0] = (IW_EVENT_CAPA_K_0 |
-				IW_EVENT_CAPA_MASK(SIOCGIWAP) |
-				IW_EVENT_CAPA_MASK(SIOCGIWSCAN));
-	range->event_capa[1] = IW_EVENT_CAPA_K_1;
-
-	/*Encryption capability */
-	range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 |
-			  IW_ENC_CAPA_CIPHER_TKIP | IW_ENC_CAPA_CIPHER_CCMP;
-
-	/* Txpower capability */
-	range->txpower_capa = IW_TXPOW_MWATT;
-
-	/*Scanning capability */
-#if WIRELESS_EXT >= 22
-	range->scan_capa =
-		IW_SCAN_CAPA_ESSID | IW_SCAN_CAPA_TYPE | IW_SCAN_CAPA_CHANNEL;
-#endif
-
-	hdd_exit();
-	return 0;
-}
-
-/**
- * iw_get_range() - SSR wrapper for __iw_get_range()
- * @dev: pointer to net_device
- * @info: pointer to iw_request_info
- * @wrqu: pointer to iwreq_data
- * @extra: pointer to extra ioctl payload
- *
- * Return: 0 on success, error number otherwise
- */
-static int iw_get_range(struct net_device *dev, struct iw_request_info *info,
-			union iwreq_data *wrqu, char *extra)
-{
-	int ret;
-
-	cds_ssr_protect(__func__);
-	ret = __iw_get_range(dev, info, wrqu, extra);
-	cds_ssr_unprotect(__func__);
-
-	return ret;
-}
-
 struct class_a_stats {
 	tCsrGlobalClassAStatsInfo class_a_stats;
 };
@@ -10738,7 +10563,7 @@ static const iw_handler we_handler[] = {
 	(iw_handler) NULL,      /* SIOCSIWSENS */
 	(iw_handler) NULL,      /* SIOCGIWSENS */
 	(iw_handler) NULL,      /* SIOCSIWRANGE */
-	(iw_handler) iw_get_range,      /* SIOCGIWRANGE */
+	(iw_handler) NULL,      /* SIOCGIWRANGE */
 	(iw_handler) NULL,      /* SIOCSIWPRIV */
 	(iw_handler) NULL,      /* SIOCGIWPRIV */
 	(iw_handler) NULL,      /* SIOCSIWSTATS */