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

Commit e5209263 authored by Johannes Berg's avatar Johannes Berg Committed by Emmanuel Grumbach
Browse files

iwlwifi: make various things const



There are a number of things in the .data section that should
really be in .rodata, for example all ops structs and strings.
Mark everything const that can be, leaving the .data section
pretty much empty.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 5045388c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ extern const struct iwl_dvm_cfg iwl_dvm_6030_cfg;

struct iwl_ucode_capabilities;

extern struct ieee80211_ops iwlagn_hw_ops;
extern const struct ieee80211_ops iwlagn_hw_ops;

static inline void iwl_set_calib_hdr(struct iwl_calib_hdr *hdr, u8 cmd)
{
@@ -480,7 +480,7 @@ do { \
} while (0)
#endif				/* CONFIG_IWLWIFI_DEBUG */

extern const char *iwl_dvm_cmd_strings[REPLY_MAX];
extern const char *const iwl_dvm_cmd_strings[REPLY_MAX];

static inline const char *iwl_dvm_get_cmd_string(u8 cmd)
{
+1 −1
Original line number Diff line number Diff line
@@ -317,7 +317,7 @@ static const struct iwl_sensitivity_ranges iwl5000_sensitivity = {
	.nrg_th_cca = 62,
};

static struct iwl_sensitivity_ranges iwl5150_sensitivity = {
static const struct iwl_sensitivity_ranges iwl5150_sensitivity = {
	.min_nrg_cck = 95,
	.auto_corr_min_ofdm = 90,
	.auto_corr_min_ofdm_mrc = 170,
+1 −1
Original line number Diff line number Diff line
@@ -1564,7 +1564,7 @@ static void iwlagn_mac_sta_notify(struct ieee80211_hw *hw,
	IWL_DEBUG_MAC80211(priv, "leave\n");
}

struct ieee80211_ops iwlagn_hw_ops = {
const struct ieee80211_ops iwlagn_hw_ops = {
	.tx = iwlagn_mac_tx,
	.start = iwlagn_mac_start,
	.stop = iwlagn_mac_stop,
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@

#define IWL_CMD_ENTRY(x) [x] = #x

const char *iwl_dvm_cmd_strings[REPLY_MAX] = {
const char *const iwl_dvm_cmd_strings[REPLY_MAX] = {
	IWL_CMD_ENTRY(REPLY_ALIVE),
	IWL_CMD_ENTRY(REPLY_ERROR),
	IWL_CMD_ENTRY(REPLY_ECHO),
+1 −1
Original line number Diff line number Diff line
@@ -393,7 +393,7 @@ struct iwl_trans_config {
	bool rx_buf_size_8k;
	bool bc_table_dword;
	unsigned int queue_watchdog_timeout;
	const char **command_names;
	const char *const *command_names;
};

struct iwl_trans;
Loading