|
@@ -76,70 +76,6 @@ enum essid_bcast_type {
|
|
|
};
|
|
|
|
|
|
#ifndef NAPIER_SCAN
|
|
|
-/**
|
|
|
- * hdd_scan_info_t - HDD scan info
|
|
|
- * @dev: Pointer to net device
|
|
|
- * @info: Pointer to request info
|
|
|
- * @start: Start pointer
|
|
|
- * @end: End pointer
|
|
|
- */
|
|
|
-struct hdd_scan_info {
|
|
|
- struct net_device *dev;
|
|
|
- struct iw_request_info *info;
|
|
|
- char *start;
|
|
|
- char *end;
|
|
|
-};
|
|
|
-
|
|
|
-/**
|
|
|
- * hdd_translate_abg_rate_to_mbps_rate() - translate abg rate to Mbps rate
|
|
|
- * @pFcRate: Rate pointer
|
|
|
- *
|
|
|
- * Return: Mbps rate in integer
|
|
|
- */
|
|
|
-static int32_t hdd_translate_abg_rate_to_mbps_rate(uint8_t *pFcRate)
|
|
|
-{
|
|
|
- /* Slightly more sophisticated processing has to take place here.
|
|
|
- * Basic rates are rounded DOWN. HT rates are rounded UP
|
|
|
- */
|
|
|
- return ((((int32_t) *pFcRate) & 0x007f) * 1000000) / 2;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * hdd_add_iw_stream_event() - add iw stream event
|
|
|
- * @cmd: Command
|
|
|
- * @length: Length
|
|
|
- * @data: Pointer to data
|
|
|
- * @pscanInfo: Pointer to scan info
|
|
|
- * @last_event: Pointer to pointer to last event
|
|
|
- * @current_event: Pointer to pointer to current event
|
|
|
- *
|
|
|
- * Return: 0 for success, non zero for failure
|
|
|
- */
|
|
|
-static int hdd_add_iw_stream_event(int cmd, int length, char *data,
|
|
|
- struct hdd_scan_info *pscanInfo,
|
|
|
- char **last_event,
|
|
|
- char **current_event)
|
|
|
-{
|
|
|
- struct iw_event event;
|
|
|
-
|
|
|
- *last_event = *current_event;
|
|
|
- qdf_mem_zero(&event, sizeof(struct iw_event));
|
|
|
- event.cmd = cmd;
|
|
|
- event.u.data.flags = 1;
|
|
|
- event.u.data.length = length;
|
|
|
- *current_event =
|
|
|
- iwe_stream_add_point(pscanInfo->info, *current_event,
|
|
|
- pscanInfo->end, &event, data);
|
|
|
-
|
|
|
- if (*last_event == *current_event) {
|
|
|
- /* no space to add event */
|
|
|
- hdd_err("no space left to add event");
|
|
|
- return -E2BIG; /* Error code, may be E2BIG */
|
|
|
- }
|
|
|
-
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* wlan_hdd_is_scan_pending() - Utility function to check pending scans
|
|
|
* @adapter: Pointer to the adapter
|