Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c49c3b77 authored by Holger Schurig's avatar Holger Schurig Committed by John W. Linville
Browse files

libertas: convert GET_LOG to a direct command



Now uses __lbs_cmd() to get the "log" (it's actually more a snapshot of
various counters, not a sequential log). Besides the "mechanical" convertion
the patch add the following logical changes:

* Removes the priv->logmsg variable, it was only used in one place anyway,
  also don't blindly get the counters when associating. Getting the
  counters then the user asks via WEXT for them is good enought.
* don't set wstats.discard.fragment with log.rxfrag, because the latter is
  a counter for successfully received packets, not for fragmented packets.

Signed-off-by: default avatarHolger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c97329e2
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -624,10 +624,6 @@ void lbs_association_worker(struct work_struct *work)
			lbs_prepare_and_send_command(priv,
				CMD_802_11_RSSI,
				0, CMD_OPTION_WAITFORRSP, 0, NULL);

			lbs_prepare_and_send_command(priv,
				CMD_802_11_GET_LOG,
				0, CMD_OPTION_WAITFORRSP, 0, NULL);
		} else {
			ret = -1;
		}
+0 −16
Original line number Diff line number Diff line
@@ -494,18 +494,6 @@ static int lbs_cmd_802_11_reset(struct lbs_private *priv,
	return 0;
}

static int lbs_cmd_802_11_get_log(struct lbs_private *priv,
				   struct cmd_ds_command *cmd)
{
	lbs_deb_enter(LBS_DEB_CMD);
	cmd->command = cpu_to_le16(CMD_802_11_GET_LOG);
	cmd->size =
		cpu_to_le16(sizeof(struct cmd_ds_802_11_get_log) + S_DS_GEN);

	lbs_deb_leave(LBS_DEB_CMD);
	return 0;
}

static int lbs_cmd_802_11_get_stat(struct lbs_private *priv,
				    struct cmd_ds_command *cmd)
{
@@ -1423,10 +1411,6 @@ int lbs_prepare_and_send_command(struct lbs_private *priv,
		ret = lbs_cmd_802_11_reset(priv, cmdptr, cmd_action);
		break;

	case CMD_802_11_GET_LOG:
		ret = lbs_cmd_802_11_get_log(priv, cmdptr);
		break;

	case CMD_802_11_AUTHENTICATE:
		ret = lbs_cmd_80211_authenticate(priv, cmdptr, pdata_buf);
		break;
+0 −18
Original line number Diff line number Diff line
@@ -303,20 +303,6 @@ static int lbs_ret_802_11_eeprom_access(struct lbs_private *priv,
	return 0;
}

static int lbs_ret_get_log(struct lbs_private *priv,
			    struct cmd_ds_command *resp)
{
	struct cmd_ds_802_11_get_log *logmessage = &resp->params.glog;

	lbs_deb_enter(LBS_DEB_CMD);

	/* Stored little-endian */
	memcpy(&priv->logmsg, logmessage, sizeof(struct cmd_ds_802_11_get_log));

	lbs_deb_leave(LBS_DEB_CMD);
	return 0;
}

static int lbs_ret_802_11_bcn_ctrl(struct lbs_private * priv,
					struct cmd_ds_command *resp)
{
@@ -352,10 +338,6 @@ static inline int handle_cmd_response(struct lbs_private *priv,
		ret = lbs_ret_reg_access(priv, respcmd, resp);
		break;

	case CMD_RET(CMD_802_11_GET_LOG):
		ret = lbs_ret_get_log(priv, resp);
		break;

	case CMD_RET_802_11_ASSOCIATE:
	case CMD_RET(CMD_802_11_ASSOCIATE):
	case CMD_RET(CMD_802_11_REASSOCIATE):
+0 −2
Original line number Diff line number Diff line
@@ -323,8 +323,6 @@ struct lbs_private {
	u8 *prdeeprom;
	struct lbs_offset_value offsetvalue;

	struct cmd_ds_802_11_get_log logmsg;

	u32 monitormode;
	u8 fw_ready;
};
+2 −1
Original line number Diff line number Diff line
@@ -195,6 +195,8 @@ struct cmd_ds_802_11_scan_rsp {
};

struct cmd_ds_802_11_get_log {
	struct cmd_header hdr;

	__le32 mcasttxframe;
	__le32 failed;
	__le32 retry;
@@ -701,7 +703,6 @@ struct cmd_ds_command {
		struct cmd_ds_802_11_ad_hoc_start ads;
		struct cmd_ds_802_11_reset reset;
		struct cmd_ds_802_11_ad_hoc_result result;
		struct cmd_ds_802_11_get_log glog;
		struct cmd_ds_802_11_authenticate auth;
		struct cmd_ds_802_11_get_stat gstat;
		struct cmd_ds_802_3_get_stat gstat_8023;
Loading