<commit_before>#include <linux/types.h>

/*
 * WARNING: This file needs to be kept in sync with
 *  - the parser (dbparse.py)
 *  - the generator code (db2bin.py)
 */

/* spells "RGDB" */
#define REGDB_MAGIC	0x52474442

/*
 * Only supported version now, start at arbitrary number
 * to have some more magic. We still consider this to be
 * "Version 1" of the file.
 */
#define REGDB_VERSION	19

/*
 * The signature at the end of the file is an RSA-signed
 * SHA-1 hash of the file.
 */

struct regdb_file_header {
	/* must be REGDB_MAGIC */
	__be32	magic;
	/* must be REGDB_VERSION */
	__be32	version;
	/*
	 * Pointer (offset) into file where country list starts
	 * and number of countries. The country list is sorted
	 * alphabetically to allow binary searching (should it
	 * become really huge.)
	 */
	__be32	reg_country_ptr;
	__be32	reg_country_num;
	/* length (in bytes) of the signature at the end of the file */
	__be32	signature_length;
};

struct regdb_file_freq_range {
	__be32	start_freq,
		end_freq,
		max_bandwidth;
};

/*
 * Values of zero mean "not applicable", i.e. the regulatory
 * does not limit a certain value.
 */
struct regdb_file_power_rule {
	/* antenna gain is in mBi (100 * dBi) */
	__be32	max_antenna_gain;
	/* this is in mBm (100 * dBm) */
	__be32	max_eirp;
};

enum reg_rule_flags {
	RRF_NO_OFDM		= 1<<0,
	RRF_NO_CCK		= 1<<1,
	RRF_NO_INDOOR		= 1<<2,
	RRF_NO_OUTDOOR		= 1<<3,
	RRF_DFS			= 1<<4,
	RRF_PTP_ONLY		= 1<<5,
	RRF_PTMP_ONLY		= 1<<6,
	RRF_PASSIVE_SCAN	= 1<<7,
	RRF_NO_IBSS		= 1<<8,
	/* hole at 9 */
	RRF_NO_HT40		= 1<<10,
};

struct regdb_file_reg_rule {
	/* pointers (offsets) into the file */
	__be32	freq_range_ptr,
		power_rule_ptr;
	/* rule flags */
	__be32 flags;<commit_msg>No need for NO-HT20 or NO-HT40, remove them as this code isn't used yet in userspace anywhere and kernel support hasn't been merged yet.<commit_after>#include <linux/types.h>

/*
 * WARNING: This file needs to be kept in sync with
 *  - the parser (dbparse.py)
 *  - the generator code (db2bin.py)
 */

/* spells "RGDB" */
#define REGDB_MAGIC	0x52474442

/*
 * Only supported version now, start at arbitrary number
 * to have some more magic. We still consider this to be
 * "Version 1" of the file.
 */
#define REGDB_VERSION	19

/*
 * The signature at the end of the file is an RSA-signed
 * SHA-1 hash of the file.
 */

struct regdb_file_header {
	/* must be REGDB_MAGIC */
	__be32	magic;
	/* must be REGDB_VERSION */
	__be32	version;
	/*
	 * Pointer (offset) into file where country list starts
	 * and number of countries. The country list is sorted
	 * alphabetically to allow binary searching (should it
	 * become really huge.)
	 */
	__be32	reg_country_ptr;
	__be32	reg_country_num;
	/* length (in bytes) of the signature at the end of the file */
	__be32	signature_length;
};

struct regdb_file_freq_range {
	__be32	start_freq,
		end_freq,
		max_bandwidth;
};

/*
 * Values of zero mean "not applicable", i.e. the regulatory
 * does not limit a certain value.
 */
struct regdb_file_power_rule {
	/* antenna gain is in mBi (100 * dBi) */
	__be32	max_antenna_gain;
	/* this is in mBm (100 * dBm) */
	__be32	max_eirp;
};

enum reg_rule_flags {
	RRF_NO_OFDM		= 1<<0,
	RRF_NO_CCK		= 1<<1,
	RRF_NO_INDOOR		= 1<<2,
	RRF_NO_OUTDOOR		= 1<<3,
	RRF_DFS			= 1<<4,
	RRF_PTP_ONLY		= 1<<5,
	RRF_PTMP_ONLY		= 1<<6,
	RRF_PASSIVE_SCAN	= 1<<7,
	RRF_NO_IBSS		= 1<<8,
};

struct regdb_file_reg_rule {
	/* pointers (offsets) into the file */
	__be32	freq_range_ptr,
		power_rule_ptr;
	/* rule flags */
	__be32 flags;
{'fraction_non_alphanumeric': 0.10565180346492474, 'fraction_numerical': 0.03578528827037773, 'mean_word_length': 3.4246231155778895, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2284963', 'n_tokens_mistral': 1477, 'n_tokens_neox': 1379, 'n_words': 423}