Commit 6cf26021 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman
Browse files

staging: rtl*/security: Use static const in array declarations

parent 4eab532d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -734,7 +734,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
/******** SBOX Table *********/
/*****************************/

static  u8 sbox_table[256] = {
static const u8 sbox_table[256] = {
	0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5,
	0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
	0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,
@@ -817,7 +817,7 @@ static void next_key(u8 *key, int round)
{
	u8 rcon;
	u8 sbox_key[4];
	u8 rcon_table[12] = {
	static const u8 rcon_table[12] = {
		0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
		0x1b, 0x36, 0x36, 0x36
	};
+1 −1
Original line number Diff line number Diff line
@@ -762,7 +762,7 @@ static void next_key(u8 *key, sint round)
{
	u8 rcon;
	u8 sbox_key[4];
	u8 rcon_table[12] = {
	static const u8 rcon_table[12] = {
		0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
		0x1b, 0x36, 0x36, 0x36
	};
+3 −3
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
#include <drv_types.h>
#include <rtw_debug.h>

static const char *_security_type_str[] = {
static const char * const _security_type_str[] = {
	"N/A",
	"WEP40",
	"TKIP",
@@ -842,7 +842,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
/******** SBOX Table *********/
/*****************************/

	static  u8 sbox_table[256] = {
	static const u8 sbox_table[256] = {
			0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5,
			0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
			0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,
@@ -957,7 +957,7 @@ static void next_key(u8 *key, sint round)
{
		u8 rcon;
		u8 sbox_key[4];
		u8 rcon_table[12] = {
		static const u8 rcon_table[12] = {
			0x01, 0x02, 0x04, 0x08,
			0x10, 0x20, 0x40, 0x80,
			0x1b, 0x36, 0x36, 0x36