summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorNingyuan Wang2016-10-11 17:33:58 -0500
committerNingyuan Wang2016-10-11 17:46:26 -0500
commite779ee36c4bbb54850e74202dc78abfe1d6da608 (patch)
tree99af9b18455a886fff444b495947886e5f273947 /net
parente5d0d670dc5a22816a2ec944e2384fd42634aa06 (diff)
downloadsystem-connectivity-wificond-e779ee36c4bbb54850e74202dc78abfe1d6da608.tar.gz
system-connectivity-wificond-e779ee36c4bbb54850e74202dc78abfe1d6da608.tar.xz
system-connectivity-wificond-e779ee36c4bbb54850e74202dc78abfe1d6da608.zip
Fix misleading wificond NL80211 logging messages
Some of them are typos, some of them are just misleading. For example SendMessageAndGetSingleResponse() failure may result from either sending failure or invalid response. It is less confusing to simply point out that a specific NL80211 command failed. Bug: None Change-Id: I195653c99f9b914959e880b79daa3352a414455b Test: Compile
Diffstat (limited to 'net')
-rw-r--r--net/netlink_utils.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/netlink_utils.cpp b/net/netlink_utils.cpp
index 674da73..52ebcd4 100644
--- a/net/netlink_utils.cpp
+++ b/net/netlink_utils.cpp
@@ -58,7 +58,7 @@ bool NetlinkUtils::GetWiphyIndex(uint32_t* out_wiphy_index) {
58 get_wiphy.AddFlag(NLM_F_DUMP); 58 get_wiphy.AddFlag(NLM_F_DUMP);
59 vector<unique_ptr<const NL80211Packet>> response; 59 vector<unique_ptr<const NL80211Packet>> response;
60 if (!netlink_manager_->SendMessageAndGetResponses(get_wiphy, &response)) { 60 if (!netlink_manager_->SendMessageAndGetResponses(get_wiphy, &response)) {
61 LOG(ERROR) << "Failed to get wiphy index"; 61 LOG(ERROR) << "NL80211_CMD_GET_WIPHY dump failed";
62 return false; 62 return false;
63 } 63 }
64 if (response.empty()) { 64 if (response.empty()) {
@@ -105,7 +105,7 @@ bool NetlinkUtils::GetInterfaceInfo(uint32_t wiphy_index,
105 get_interface.AddAttribute(wiphy); 105 get_interface.AddAttribute(wiphy);
106 vector<unique_ptr<const NL80211Packet>> response; 106 vector<unique_ptr<const NL80211Packet>> response;
107 if (!netlink_manager_->SendMessageAndGetResponses(get_interface, &response)) { 107 if (!netlink_manager_->SendMessageAndGetResponses(get_interface, &response)) {
108 LOG(ERROR) << "Failed to send GetWiphy message"; 108 LOG(ERROR) << "NL80211_CMD_GET_INTERFACE dump failed";
109 return false; 109 return false;
110 } 110 }
111 if (response.empty()) { 111 if (response.empty()) {
@@ -186,7 +186,7 @@ bool NetlinkUtils::GetWiphyInfo(
186 unique_ptr<const NL80211Packet> response; 186 unique_ptr<const NL80211Packet> response;
187 if (!netlink_manager_->SendMessageAndGetSingleResponse(get_wiphy, 187 if (!netlink_manager_->SendMessageAndGetSingleResponse(get_wiphy,
188 &response)) { 188 &response)) {
189 LOG(ERROR) << "Failed to get scan capabilities"; 189 LOG(ERROR) << "NL80211_CMD_GET_WIPHY failed";
190 return false; 190 return false;
191 } 191 }
192 if (response->GetCommand() != NL80211_CMD_NEW_WIPHY) { 192 if (response->GetCommand() != NL80211_CMD_NEW_WIPHY) {
@@ -310,7 +310,7 @@ bool NetlinkUtils::GetStationInfo(uint32_t interface_index,
310 unique_ptr<const NL80211Packet> response; 310 unique_ptr<const NL80211Packet> response;
311 if (!netlink_manager_->SendMessageAndGetSingleResponse(get_station, 311 if (!netlink_manager_->SendMessageAndGetSingleResponse(get_station,
312 &response)) { 312 &response)) {
313 LOG(ERROR) << "Failed to get packet counters"; 313 LOG(ERROR) << "NL80211_CMD_GET_STATION failed";
314 return false; 314 return false;
315 } 315 }
316 if (response->GetCommand() != NL80211_CMD_NEW_STATION) { 316 if (response->GetCommand() != NL80211_CMD_NEW_STATION) {