summaryrefslogtreecommitdiffstats
path: root/bcmdhd
diff options
context:
space:
mode:
authorInsun Song <insun.song@broadcom.com>2017-05-12 21:31:14 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-05-12 21:31:14 +0000
commit08d949c6f17f59cb91b180dfb0eada3eaba1f9bb (patch)
tree1df933f69dacda9fa289b68d39f3908c46fe13e5 /bcmdhd
parentf917bd5281c63646f6bd54c93596ed09d0fec794 (diff)
parent2498b6a272e3f2e0f93cd0c11bb9de291f4dd96b (diff)
downloadhardware_replicant_wlan-08d949c6f17f59cb91b180dfb0eada3eaba1f9bb.tar.gz
hardware_replicant_wlan-08d949c6f17f59cb91b180dfb0eada3eaba1f9bb.tar.bz2
hardware_replicant_wlan-08d949c6f17f59cb91b180dfb0eada3eaba1f9bb.zip
net: wireless: bcmdhd: adding bssid count NL attribute in SWC config am: f57fbe1611 am: 79f1dd5850
am: 2498b6a272 Change-Id: Id2de1e7accb52538f2d00cde0096ed6d77a7242f
Diffstat (limited to 'bcmdhd')
-rw-r--r--bcmdhd/wifi_hal/gscan.cpp48
1 files changed, 28 insertions, 20 deletions
diff --git a/bcmdhd/wifi_hal/gscan.cpp b/bcmdhd/wifi_hal/gscan.cpp
index 47eea15..d3dc0e7 100644
--- a/bcmdhd/wifi_hal/gscan.cpp
+++ b/bcmdhd/wifi_hal/gscan.cpp
@@ -1436,30 +1436,38 @@ public:
if (result < 0) {
return result;
}
-
- struct nlattr * attr = request.attr_start(GSCAN_ATTRIBUTE_SIGNIFICANT_CHANGE_BSSIDS);
-
- for (int i = 0; i < mParams.num_bssid; i++) {
- nlattr *attr2 = request.attr_start(i);
- if (attr2 == NULL) {
+ result = request.put_u16(GSCAN_ATTRIBUTE_NUM_BSSID, mParams.num_bssid);
+ if (result < 0) {
+ return result;
+ }
+ if (mParams.num_bssid != 0) {
+ nlattr* attr = request.attr_start(GSCAN_ATTRIBUTE_SIGNIFICANT_CHANGE_BSSIDS);
+ if (attr == NULL) {
return WIFI_ERROR_OUT_OF_MEMORY;
}
- result = request.put_addr(GSCAN_ATTRIBUTE_BSSID, mParams.ap[i].bssid);
- if (result < 0) {
- return result;
- }
- result = request.put_u8(GSCAN_ATTRIBUTE_RSSI_HIGH, mParams.ap[i].high);
- if (result < 0) {
- return result;
- }
- result = request.put_u8(GSCAN_ATTRIBUTE_RSSI_LOW, mParams.ap[i].low);
- if (result < 0) {
- return result;
+
+ for (int i = 0; i < mParams.num_bssid; i++) {
+ nlattr* attr2 = request.attr_start(i);
+ if (attr2 == NULL) {
+ return WIFI_ERROR_OUT_OF_MEMORY;
+ }
+ result = request.put_addr(GSCAN_ATTRIBUTE_BSSID, mParams.ap[i].bssid);
+ if (result < 0) {
+ return result;
+ }
+ result = request.put_u8(GSCAN_ATTRIBUTE_RSSI_HIGH, mParams.ap[i].high);
+ if (result < 0) {
+ return result;
+ }
+ result = request.put_u8(GSCAN_ATTRIBUTE_RSSI_LOW, mParams.ap[i].low);
+ if (result < 0) {
+ return result;
+ }
+ request.attr_end(attr2);
}
- request.attr_end(attr2);
- }
- request.attr_end(attr);
+ request.attr_end(attr);
+ }
request.attr_end(data);
return result;